From 0920ff53a47805479a84980bc09886c939c77399 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 4 Jul 2016 12:57:01 +0100 Subject: [PATCH] JAL-2137 prevent NPE when inFile is null. Not sure this is correct ? --- src/jalview/ext/jmol/JmolParser.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()) { -- 1.7.10.2