mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Use finally to close the update checker stream
This commit is contained in:
parent
385f8ca0b3
commit
f81a763d6c
@ -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