mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-02 01:46:45 +01:00
Use finally to close the update checker stream
This commit is contained in:
parent
0ba4bc25c7
commit
f15d8ced57
@ -35,7 +35,6 @@ public class UpdateChecker {
|
||||
Object o = jp.parse(isr);
|
||||
|
||||
if (!(o instanceof JSONObject)) {
|
||||
isr.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -56,15 +55,16 @@ public class UpdateChecker {
|
||||
oldVer = 0;
|
||||
}
|
||||
if (oldVer < newVer) {
|
||||
isr.close();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
catch (ParseException e) {
|
||||
isr.close();
|
||||
return false;
|
||||
}
|
||||
finally {
|
||||
isr.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user