From: jprocter Date: Thu, 8 Mar 2007 13:14:55 +0000 (+0000) Subject: remove unnecessary existence checks. X-Git-Tag: Release_0.2~168 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=c381f882a305384c63084d2562f9aae07b2f03e8;p=vamsas.git remove unnecessary existence checks. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@352 be28352e-c001-0410-b1a7-c7978e42abec --- 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() {