From c0a37536d35fb247404187b367228e71f85ce373 Mon Sep 17 00:00:00 2001 From: hansonr Date: Tue, 27 Aug 2019 23:41:23 -0500 Subject: [PATCH] JAL-3253-applet JAL-3423 Windows TestNG - PDBEntry file name needs to normalize \ and /. --- src/jalview/datamodel/PDBEntry.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index 2d3690c..80e2de8 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -131,18 +131,11 @@ public class PDBEntry * CaseInsensitiveString, so we are in effect doing a * case-insensitive comparison of chain codes */ - boolean idMatches = id == o.id - || (id != null && id.equalsIgnoreCase(o.id)); - boolean fileMatches = file == o.file - || (file != null && file.equals(o.file)); - boolean typeMatches = type == o.type - || (type != null && type.equals(o.type)); - if (idMatches && fileMatches && typeMatches) - { - return properties == o.properties - || (properties != null && properties.equals(o.properties)); - } - return false; + return (id == o.id || (id != null && id.equalsIgnoreCase(o.id))) + && (file == o.file || (file != null && file.equals(o.file))) + && (type == o.type || (type != null && type.equals(o.type))) + && (properties == o.properties || (properties != null + && properties.equals(o.properties))); } /** @@ -169,7 +162,7 @@ public class PDBEntry { this.id = pdbId; this.type = entryType == null ? null : entryType.toString(); - this.file = filePath; + this.file = (filePath == null ? null : filePath.replace('\\', '/')); setChainCode(chain); } -- 1.7.10.2