From c381f882a305384c63084d2562f9aae07b2f03e8 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 8 Mar 2007 13:14:55 +0000 Subject: [PATCH] remove unnecessary existence checks. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@352 be28352e-c001-0410-b1a7-c7978e42abec --- src/uk/ac/vamsas/client/simpleclient/NativeLock.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/uk/ac/vamsas/client/simpleclient/NativeLock.java b/src/uk/ac/vamsas/client/simpleclient/NativeLock.java index 46484b1..8a0124c 100644 --- a/src/uk/ac/vamsas/client/simpleclient/NativeLock.java +++ b/src/uk/ac/vamsas/client/simpleclient/NativeLock.java @@ -31,12 +31,11 @@ public class NativeLock extends Lock { lock = null; try { - if (!lockfile.exists()) - if (!lockfile.createNewFile()) { + /*if (!lockfile.createNewFile()) { log.warn("Failed to create locked file "+lockfile); return; } - + */ rafile=new RandomAccessFile(lockfile,"rw"); if (block) lock = rafile.getChannel().lock(); @@ -56,7 +55,7 @@ public class NativeLock extends Lock { } catch (IOException e) { log.error("Error! Problems with IO when creating a lock on " + lockfile.getAbsolutePath(),e); - } + } // catch (Exception ) } public boolean isLocked() { -- 1.7.10.2