فهرست منبع

Compiler throws warnings all over the place about our close methods, this one is no different.

GJ 11 سال پیش
والد
کامیت
d8f3a54f9b
1فایلهای تغییر یافته به همراه1 افزوده شده و 8 حذف شده
  1. 1 8
      src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java

+ 1 - 8
src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java

@@ -401,14 +401,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
                 e.printStackTrace();
             }
             finally {
-                // Silly inlining of tryClose() because the compiler is giving a warning when I use tryClose()
-                try {
-                    if (in != null) {
-                        in.close();
-                    }
-                }
-                catch (IOException e) {
-                }
+                tryClose(in);
             }
         }