From f5e6905752f20e5f77d5ada2a216c3cb2b50907d Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 18 Sep 2007 10:17:53 +0000 Subject: [PATCH] note on occasional null pointer exceptions raised on JVM shutdown 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/uk/ac/vamsas/client/simpleclient/FileLock.java b/src/uk/ac/vamsas/client/simpleclient/FileLock.java index 40ee9cf..8a340c3 100644 --- a/src/uk/ac/vamsas/client/simpleclient/FileLock.java +++ b/src/uk/ac/vamsas/client/simpleclient/FileLock.java @@ -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; -- 1.7.10.2