From: jprocter Date: Thu, 20 Oct 2005 09:58:13 +0000 (+0000) Subject: slackened lock_release success requirement. X-Git-Tag: Release_0.2~453 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0818a34ab0fef16d9459df1ade0112b0f72ec14f;p=vamsas.git slackened lock_release success requirement. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@67 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/org/vamsas/client/simpleclient/ClientsFile.java b/src/org/vamsas/client/simpleclient/ClientsFile.java index aa62482..2a103ed 100644 --- a/src/org/vamsas/client/simpleclient/ClientsFile.java +++ b/src/org/vamsas/client/simpleclient/ClientsFile.java @@ -68,22 +68,15 @@ public class ClientsFile { * * @return true if lock was released. */ - protected boolean unlockList() { + protected void unlockList() { if (listlock != null) { if (listlock.isLocked()) { - try { - listlock.lock.release(); - } catch (IOException e) { - // TODO Deal with unlock Lock.release exception! - e.printStackTrace(System.err); - } + listlock.release(); } listlock = null; - return true; } - return false; } /** @@ -127,8 +120,8 @@ public class ClientsFile { public ClientHandle[] retrieveClientList() { if (lockList()) { ClientHandle[] clients = retrieveClientHandles(); - if (unlockList()) - return clients; + unlockList(); + return clients; } return null; } diff --git a/src/org/vamsas/test/simpleclient/ClientsFileTest.java b/src/org/vamsas/test/simpleclient/ClientsFileTest.java index f484a63..58dcbec 100644 --- a/src/org/vamsas/test/simpleclient/ClientsFileTest.java +++ b/src/org/vamsas/test/simpleclient/ClientsFileTest.java @@ -92,10 +92,10 @@ public class ClientsFileTest { FileWatcher w=new FileWatcher(cf); while (cf.exists()) { if (w.hasChanged()) { + ClientHandle[] cl = cfhand.retrieveClientList(); System.out.println("-- Watching "+cf.getName()); //while (w.hasChanged()) // ; - ClientHandle[] cl = cfhand.retrieveClientList(); if (cl!=null) { for (int chi=0,che=cl.length; chi