Use finally to close the update checker stream

This commit is contained in:
Kane York 2013-05-30 12:33:30 -05:00 committed by GJ
parent 385f8ca0b3
commit f81a763d6c

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