From 25968adf9bc0c109749c5c59c4fdbd16e524f9d0 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 22 Mar 2006 17:04:50 +0000 Subject: [PATCH] more fixes for clientdocument/simpleclient. Testign the vamsasArchive reader and sessionfile mechanism (windows patches) git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@199 be28352e-c001-0410-b1a7-c7978e42abec --- .../vamsas/client/simpleclient/ClientDocument.java | 67 +++++++++++++++++++- .../vamsas/client/simpleclient/SessionFile.java | 30 ++++++--- .../vamsas/client/simpleclient/SimpleClient.java | 7 +- .../vamsas/client/simpleclient/VamsasArchive.java | 2 + 4 files changed, 90 insertions(+), 16 deletions(-) diff --git a/src/org/vamsas/client/simpleclient/ClientDocument.java b/src/org/vamsas/client/simpleclient/ClientDocument.java index f89f713..d360085 100644 --- a/src/org/vamsas/client/simpleclient/ClientDocument.java +++ b/src/org/vamsas/client/simpleclient/ClientDocument.java @@ -68,6 +68,10 @@ public class ClientDocument extends org.vamsas.client.ClientDocument implements * @see org.vamsas.client.IClientDocument#getObject(org.vamsas.client.VorbaId) */ public Vobject getObject(VorbaId id) { + if (objrefs==null) { + log.debug("getObject called on null objrefs list."); + return null; + } if (objrefs.containsKey(id)) return (Vobject) objrefs.get(id); log.debug("Returning null Vobject reference for id "+id.getId()); @@ -80,6 +84,10 @@ public class ClientDocument extends org.vamsas.client.ClientDocument implements * @see org.vamsas.client.IClientDocument#getObjects(org.vamsas.client.VorbaId[]) */ public Vobject[] getObjects(VorbaId[] ids) { + if (objrefs==null) { + log.debug("getObject[] called on null objrefs list."); + return null; + } Vobject[] vo = new Vobject[ids.length]; for (int i=0,j=ids.length; i