From: Jim Procter Date: Mon, 4 Jul 2016 11:57:01 +0000 (+0100) Subject: JAL-2137 prevent NPE when inFile is null. Not sure this is correct ? X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fspike%2Fphyre2;p=jalview.git JAL-2137 prevent NPE when inFile is null. Not sure this is correct ? --- diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 309e196..438b403 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -172,7 +172,10 @@ public class JmolParser extends StructureFile implements JmolStatusListener if (getId() == null) { - setId(inFile.getName()); + // always use resource name, not the hardwired file + // Does the value of ID get used ? Behaviour needs to be + // documented and tested + setId(getDataName()); } for (PDBChain chain : getChains()) {