Quellcode durchsuchen

- use finally in Natives.jar

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7418 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 vor 14 Jahren
Ursprung
Commit
5ae0340ccf
1 geänderte Dateien mit 4 neuen und 6 gelöschten Zeilen
  1. 4 6
      engine/src/desktop/com/jme3/system/Natives.java

+ 4 - 6
engine/src/desktop/com/jme3/system/Natives.java

@@ -85,16 +85,14 @@ public class Natives {
             out.close();
             out.close();
         } catch (FileNotFoundException ex) {
         } catch (FileNotFoundException ex) {
             if (ex.getMessage().contains("used by another process")) {
             if (ex.getMessage().contains("used by another process")) {
-                if (load) {
-                    System.load(targetFile.getAbsolutePath());
-                }
                 return;
                 return;
             }
             }
 
 
             throw ex;
             throw ex;
-        }
-        if (load) {
-            System.load(targetFile.getAbsolutePath());
+        } finally {
+            if (load) {
+                System.load(targetFile.getAbsolutePath());
+            }
         }
         }
         logger.log(Level.FINE, "Copied {0} to {1}", new Object[]{fullname, targetFile});
         logger.log(Level.FINE, "Copied {0} to {1}", new Object[]{fullname, targetFile});
     }
     }