mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Close resources in UUIDFetcher
Resource leak by not closing the InputStreamReader
This commit is contained in:
parent
8dc955542d
commit
877ef15374
@ -49,7 +49,9 @@ public class UUIDFetcher implements Callable<Map<String, UUID>> {
|
||||
String body = array.toString();
|
||||
|
||||
writeBody(connection, body);
|
||||
JsonObject[] jsonStreamArray = gson.fromJson(new InputStreamReader(connection.getInputStream()), JsonObject[].class);
|
||||
InputStreamReader tempStream = new InputStreamReader(connection.getInputStream());
|
||||
JsonObject[] jsonStreamArray = gson.fromJson(tempStream, JsonObject[].class);
|
||||
tempStream.close();
|
||||
|
||||
for (JsonObject jsonProfile : jsonStreamArray) {
|
||||
String id = jsonProfile.get("id").getAsString();
|
||||
|
Loading…
Reference in New Issue
Block a user