note on occasional null pointer exceptions raised on JVM shutdown
authorjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 18 Sep 2007 10:17:53 +0000 (10:17 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 18 Sep 2007 10:17:53 +0000 (10:17 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@470 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/client/simpleclient/FileLock.java

index 40ee9cf..8a340c3 100644 (file)
@@ -49,7 +49,10 @@ public class FileLock extends Lock {
   private void tidy() {
     if (_lock!=null) { 
       if ( advisory!=null) {
-        advisory.target.deleteOnExit(); // release will null the target
+        // TODO: fix occasional exceptions raised here (usually on JVM shutdown)
+        if (advisory.target!=null) {
+           advisory.target.deleteOnExit(); // release will null the target
+        }
         advisory.release(true);
       }
       advisory=null;