mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +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();
|
String body = array.toString();
|
||||||
|
|
||||||
writeBody(connection, body);
|
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) {
|
for (JsonObject jsonProfile : jsonStreamArray) {
|
||||||
String id = jsonProfile.get("id").getAsString();
|
String id = jsonProfile.get("id").getAsString();
|
||||||
|
Loading…
Reference in New Issue
Block a user