Use finally to close the update checker stream

This commit is contained in:
Kane York 2013-05-30 12:33:30 -05:00
parent 0ba4bc25c7
commit f15d8ced57

View File

@ -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();
}
}
}