minimise exceptions for bad uniprot ids
authorjprocter <Jim Procter>
Thu, 4 Dec 2008 10:22:16 +0000 (10:22 +0000)
committerjprocter <Jim Procter>
Thu, 4 Dec 2008 10:22:16 +0000 (10:22 +0000)
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);