more fixes for clientdocument/simpleclient. Testign the vamsasArchive reader and...
[vamsas.git] / src / org / vamsas / client / simpleclient / VamsasArchive.java
index d510d51..c485124 100644 (file)
@@ -225,6 +225,8 @@ public class VamsasArchive {
       else
         rchive = new SessionFile(archive);
       rchive.lockFile();
+      if (rchive.fileLock==null || rchive.fileLock.rafile==null)
+        throw new IOException("Lock failed for new archive"+archive);
       rchive.fileLock.rafile.setLength(0); // empty the archive.
       virginArchive = true;
     }