X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FPDBEntry.java;h=80e2de87aef0e4d145afa9065578479146550c55;hb=b74cdec4b07000bee431a7cca86a948f44d3ffbe;hp=c1dc77c1224570f11088a283ac837c458e4ea3c2;hpb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;p=jalview.git diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index c1dc77c..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); } @@ -220,7 +213,7 @@ public class PDBEntry public void setFile(String f) { - this.file = f; + this.file = f.replace('\\', '/'); } public String getFile() @@ -257,7 +250,7 @@ public class PDBEntry { if (this.properties == null) { - this.properties = new Hashtable(); + this.properties = new Hashtable<>(); } properties.put(key, value); }