From df9ff7f340a5ab4e07efc613f5f264eeae63d4c7 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Thu, 3 Jul 2014 16:06:47 +0200
Subject: Code Clean-Up based on our Recommended Settings (jogamp-scripting
 c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)

Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)

    - Change non static accesses to static members using declaring type
    - Change indirect accesses to static members to direct accesses (accesses through subtypes)
    - Add final modifier to private fields
    - Add final modifier to method parameters
    - Add final modifier to local variables
    - Remove unnecessary casts
    - Remove unnecessary '$NON-NLS$' tags
    - Remove trailing white spaces on all lines
---
 .../com/jogamp/common/util/locks/SingletonInstance.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'src/java/com/jogamp/common/util/locks/SingletonInstance.java')

diff --git a/src/java/com/jogamp/common/util/locks/SingletonInstance.java b/src/java/com/jogamp/common/util/locks/SingletonInstance.java
index f016d4b..ee703cd 100644
--- a/src/java/com/jogamp/common/util/locks/SingletonInstance.java
+++ b/src/java/com/jogamp/common/util/locks/SingletonInstance.java
@@ -37,11 +37,11 @@ public abstract class SingletonInstance implements Lock {
 
     protected static final boolean DEBUG = true;
 
-    public static SingletonInstance createFileLock(long poll_ms, String lockFileBasename) {
+    public static SingletonInstance createFileLock(final long poll_ms, final String lockFileBasename) {
         return new SingletonInstanceFileLock(poll_ms, lockFileBasename);
     }
 
-    public static SingletonInstance createFileLock(long poll_ms, File lockFile) {
+    public static SingletonInstance createFileLock(final long poll_ms, final File lockFile) {
         return new SingletonInstanceFileLock(poll_ms, lockFile);
     }
 
@@ -58,11 +58,11 @@ public abstract class SingletonInstance implements Lock {
      * @param pollPeriod
      * @param portNumber to be used for this single instance server socket.
      */
-    public static SingletonInstance createServerSocket(long poll_ms, int portNumber) {
+    public static SingletonInstance createServerSocket(final long poll_ms, final int portNumber) {
         return new SingletonInstanceServerSocket(poll_ms, portNumber);
     }
 
-    protected SingletonInstance(long poll_ms) {
+    protected SingletonInstance(final long poll_ms) {
         this.poll_ms = Math.max(10, poll_ms);
     }
 
@@ -79,7 +79,7 @@ public abstract class SingletonInstance implements Lock {
                     return;
                 }
             } while ( true ) ;
-        } catch ( RuntimeException ie ) {
+        } catch ( final RuntimeException ie ) {
             throw new  RuntimeException(ie);
         }
     }
@@ -109,7 +109,7 @@ public abstract class SingletonInstance implements Lock {
                 maxwait -= System.currentTimeMillis()-t1;
                 i++;
             } while ( 0 < maxwait ) ;
-        } catch ( InterruptedException ie ) {
+        } catch ( final InterruptedException ie ) {
             final long t2 = System.currentTimeMillis();
             throw new RuntimeException(infoPrefix(t2)+" EEE (1) "+getName()+" - couldn't get lock within "+(t2-t0)+" ms, "+i+" attempts", ie);
         }
@@ -139,7 +139,7 @@ public abstract class SingletonInstance implements Lock {
         return locked;
     }
 
-    protected String infoPrefix(long currentMillis) {
+    protected String infoPrefix(final long currentMillis) {
         return "SLOCK [T "+Thread.currentThread().getName()+" @ "+currentMillis+" ms";
     }
     protected String infoPrefix() {
-- 
cgit v1.2.3