From: gmungoc Date: Thu, 6 Oct 2016 07:52:55 +0000 (+0100) Subject: JAL-2245 checks for null added (in case EMBL fetch finds nothing) X-Git-Tag: Release_2_10_0b1~3^2~16^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=72da885aa401e932e73af4a554ea338cd5015efc;p=jalview.git JAL-2245 checks for null added (in case EMBL fetch finds nothing) --- diff --git a/src/jalview/datamodel/xdb/embl/EmblFile.java b/src/jalview/datamodel/xdb/embl/EmblFile.java index 69870b6..a95f6e5 100644 --- a/src/jalview/datamodel/xdb/embl/EmblFile.java +++ b/src/jalview/datamodel/xdb/embl/EmblFile.java @@ -152,6 +152,10 @@ public class EmblFile */ static void canonicaliseDbRefs(EmblFile record) { + if (record.getEntries() == null) + { + return; + } for (EmblEntry entry : record.getEntries()) { if (entry.getDbRefs() != null) diff --git a/src/jalview/ws/dbsources/EmblXmlSource.java b/src/jalview/ws/dbsources/EmblXmlSource.java index 2049766..f672e8b 100644 --- a/src/jalview/ws/dbsources/EmblXmlSource.java +++ b/src/jalview/ws/dbsources/EmblXmlSource.java @@ -103,7 +103,7 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy } List peptides = new ArrayList(); - if (efile != null) + if (efile != null && efile.getEntries() != null) { for (EmblEntry entry : efile.getEntries()) {