Fixed: Close the readers after fetching the repo api details
This commit is contained in:
parent
2e684dd561
commit
03e120d24d
1 changed files with 3 additions and 0 deletions
|
@ -54,6 +54,9 @@ public final class GithubUpdater {
|
||||||
String response = reader.readLine();
|
String response = reader.readLine();
|
||||||
JsonObject json = AdventureSerializer.getGsonSerializer().serializer().fromJson(response, JsonObject.class);
|
JsonObject json = AdventureSerializer.getGsonSerializer().serializer().fromJson(response, JsonObject.class);
|
||||||
|
|
||||||
|
reader.close();
|
||||||
|
isr.close();
|
||||||
|
|
||||||
if (json.has("tag_name")) {
|
if (json.has("tag_name")) {
|
||||||
return PEVersion.fromString(json.get("tag_name").getAsString().replaceFirst("^[vV]", ""));
|
return PEVersion.fromString(json.get("tag_name").getAsString().replaceFirst("^[vV]", ""));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue