diff options
author | Sven Gothel <[email protected]> | 2011-02-26 20:14:40 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-02-26 20:14:40 +0100 |
commit | 7b9c3dd1d42b8e8bd1caea8e2caf8f3e15e3ff8f (patch) | |
tree | aab62e917f535713846bcba3b86a7ad6a8f9f6eb /src/java/com/jogamp/common | |
parent | 47e9c21909034ef2d68937ec970a1c8c3b380ada (diff) |
RecursiveLock: static field -> final; NativeLibrary: cleanup
Diffstat (limited to 'src/java/com/jogamp/common')
-rwxr-xr-x | src/java/com/jogamp/common/os/NativeLibrary.java | 11 | ||||
-rw-r--r-- | src/java/com/jogamp/common/util/locks/RecursiveLock.java | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/java/com/jogamp/common/os/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java index 2c7e596..b597635 100755 --- a/src/java/com/jogamp/common/os/NativeLibrary.java +++ b/src/java/com/jogamp/common/os/NativeLibrary.java @@ -252,14 +252,15 @@ public class NativeLibrary implements DynamicLookupHelper { ClassLoader loader) { List paths = new ArrayList(); String libName = selectName(windowsLibName, unixLibName, macOSXLibName); - if (libName == null) + if (libName == null) { return paths; + } // Allow user's full path specification to override our building of paths File file = new File(libName); if (file.isAbsolute()) { - paths.add(libName); - return paths; + paths.add(libName); + return paths; } String[] baseNames = buildNames(libName); @@ -314,9 +315,7 @@ public class NativeLibrary implements DynamicLookupHelper { if (!searchSystemPathFirst) { // Add just the library names to use the OS's search algorithm - for (int i = 0; i < baseNames.length; i++) { - paths.add(baseNames[i]); - } + paths.addAll(Arrays.asList(baseNames)); } return paths; diff --git a/src/java/com/jogamp/common/util/locks/RecursiveLock.java b/src/java/com/jogamp/common/util/locks/RecursiveLock.java index 4f8415e..2ff0d9b 100644 --- a/src/java/com/jogamp/common/util/locks/RecursiveLock.java +++ b/src/java/com/jogamp/common/util/locks/RecursiveLock.java @@ -50,7 +50,7 @@ public class RecursiveLock implements LockExt { // flag signaling unlock has woken up a waiting thread boolean signaled = false; } - private SyncData sdata = new SyncData(); // synchronized (flow/mem) mutable access + private final SyncData sdata = new SyncData(); // synchronized (flow/mem) mutable access private static final boolean TRACE_LOCK = Debug.isPropertyDefined("jogamp.debug.Lock.TraceLock", true, AccessController.getContext()); |