fix minor exception when syncing document with appdata references when no appdata...
[vamsas.git] / src / uk / ac / vamsas / client / simpleclient / SimpleDocBinding.java
index b65d00b..6815706 100644 (file)
@@ -118,13 +118,13 @@ public class SimpleDocBinding {
      return null;
     if (doc==null) {
      try { doc = getVamsasDocument(oReader); } 
-     catch (Exception e) { log.warn("Failed to get document from "+oReader.jfile.getName()); };
+     catch (Exception e) { log.warn("Failed to get document from "+oReader.jfileName); };
     }
     Vector docrefs = AppDataReference.getAppDataReferences(doc);
     if (docrefs==null)
       return null;
     Vector entries = oReader.getExtraEntries();
-    if (entries!=null && docrefs.size()>0) {
+    if (entries!=null && entries.size()>0 && docrefs.size()>0) {
       int i=0, j=entries.size();
       do {
         if (!docrefs.contains(entries.get(i))) {