From: Jim Procter Date: Thu, 10 May 2018 10:34:23 +0000 (+0100) Subject: JAL-2920 simplified logic and added corner cases for missing attributes (probably... X-Git-Tag: Release_2_10_4~1^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=20ca25437594cfb22689e45641c683681e400e07;p=jalview.git JAL-2920 simplified logic and added corner cases for missing attributes (probably not needed but..) --- diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java b/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java index 6102775..4c2ae24 100644 --- a/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java +++ b/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java @@ -51,13 +51,19 @@ public class UniprotFeature public String getDescription() { - return (description == null && variation == null && original == null) - ? null - : (description == null ? "" : description) - + ((variation != null) - ? "Variation: '" + variation + "' " + if (description == null && variation == null && original == null) + { + return null; + } + return (description == null ? "" : description) + + (variation != null + ? (description != null ? " " : "") + "Variation: '" + + variation + "'" : "") - + ((original != null) ? "Original: '" + original + "'" : ""); + + (original != null + ? ((description != null || variation != null) ? " " + : "") + "Original: '" + original + "'" + : ""); } public void setDescription(String d)