minimise exceptions for bad uniprot ids
[jalview.git] / src / jalview / ws / dbsources / Uniprot.java
index ab0b10c..f7773d8 100644 (file)
@@ -116,8 +116,10 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy
       Unmarshaller unmar = new Unmarshaller(uni);
       unmar.setIgnoreExtraElements(true);
       unmar.setMapping(map);
-
-      uni = (UniprotFile) unmar.unmarshal(new FileReader(file));
+      if (file!=null)
+      {
+        uni = (UniprotFile) unmar.unmarshal(new FileReader(file));
+      }
     } catch (Exception e)
     {
       System.out.println("Error getUniprotEntries() " + e);