X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FEmblXmlSource.java;h=b1395745ccc8539752d2279ce038bf5f89e2ceed;hb=refs%2Fheads%2Freleases%2FRelease_2_10_0_Branch;hp=b71f032b5cf7f9abbe563561ab05d36914958a01;hpb=5071850e8470077a8ac2bdc6a53908c70ad5526d;p=jalview.git diff --git a/src/jalview/ws/dbsources/EmblXmlSource.java b/src/jalview/ws/dbsources/EmblXmlSource.java index b71f032..b139574 100644 --- a/src/jalview/ws/dbsources/EmblXmlSource.java +++ b/src/jalview/ws/dbsources/EmblXmlSource.java @@ -64,7 +64,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy { reply = dbFetch.fetchDataAsFile( emprefx.toLowerCase() + ":" + query.trim(), "display=xml", - null, ".xml"); } catch (Exception e) { @@ -103,8 +102,13 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy } } + /* + * invalid accession gets a reply with no elements, text content of + * EmbFile reads something like (e.g.) this ungrammatical phrase + * Entry: display type is either not supported or entry is not found. + */ List peptides = new ArrayList(); - if (efile != null) + if (efile != null && efile.getEntries() != null) { for (EmblEntry entry : efile.getEntries()) {