From c8a9b89b1f316c259eaec68309f32fdd8289e375 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 21 Sep 2012 13:59:38 +0200 Subject: SingletonInstanceServerSocket: Add unit tests; Create new server Thread @ start, otherwise we may collide w/ a failed start. Misc: Cleanup / reuse strings. --- src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java') diff --git a/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java b/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java index c8a05ed..a76f261 100644 --- a/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java +++ b/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java @@ -80,7 +80,7 @@ public class SingletonInstanceFileLock extends SingletonInstance { @Override public void run() { if(isLocked()) { - System.err.println("SLOCK "+System.currentTimeMillis()+" XXX "+getName()+" - Unlock @ JVM Shutdown"); + System.err.println(infoPrefix()+" XXX "+getName()+" - Unlock @ JVM Shutdown"); } unlock(); } @@ -97,7 +97,7 @@ public class SingletonInstanceFileLock extends SingletonInstance { return true; } } catch (Exception e) { - System.err.println("SLOCK "+System.currentTimeMillis()+" EEE "+getName()+" - Unable to create and/or lock file"); + System.err.println(infoPrefix()+" III "+getName()+" - Unable to create and/or lock file"); e.printStackTrace(); } return false; @@ -119,7 +119,7 @@ public class SingletonInstanceFileLock extends SingletonInstance { } return true; } catch (Exception e) { - System.err.println("SLOCK "+System.currentTimeMillis()+" EEE "+getName()+" - Unable to remove lock file"); + System.err.println(infoPrefix()+" EEE "+getName()+" - Unable to remove lock file"); e.printStackTrace(); } finally { fileLock = null; -- cgit v1.2.3