From 7b9c3dd1d42b8e8bd1caea8e2caf8f3e15e3ff8f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 26 Feb 2011 20:14:40 +0100 Subject: RecursiveLock: static field -> final; NativeLibrary: cleanup --- src/java/com/jogamp/common/os/NativeLibrary.java | 11 +++++------ src/java/com/jogamp/common/util/locks/RecursiveLock.java | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/java/com/jogamp/common') 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()); -- cgit v1.2.3