remove unnecessary existence checks.
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 8 Mar 2007 13:14:55 +0000 (13:14 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 8 Mar 2007 13:14:55 +0000 (13:14 +0000)
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

index 46484b1..8a0124c 100644 (file)
@@ -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() {