From f15d8ced571c0dfb7bb14abaa4acd37b7554ea9a Mon Sep 17 00:00:00 2001 From: Kane York Date: Thu, 30 May 2013 12:33:30 -0500 Subject: [PATCH] Use finally to close the update checker stream --- src/main/java/com/gmail/nossr50/util/UpdateChecker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/UpdateChecker.java b/src/main/java/com/gmail/nossr50/util/UpdateChecker.java index 3ff13d750..4fc7da0ec 100644 --- a/src/main/java/com/gmail/nossr50/util/UpdateChecker.java +++ b/src/main/java/com/gmail/nossr50/util/UpdateChecker.java @@ -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(); + } } }