X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FSequenceAnnotationReport.java;h=95bd1cc2ca4008a1cfe4248467e7628ff5ab5429;hb=62fb9a3042bdc6daaad8218d47b12cb912907354;hp=369839a8c0fbda24c239edb0dc475f67f022b19f;hpb=70a6730dba4ab0af6906fd8f874fe853c02efef0;p=jalview.git diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index 369839a..95bd1cc 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -20,12 +20,12 @@ */ package jalview.io; -import java.util.Locale; - +import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import jalview.api.FeatureColourI; @@ -536,12 +536,19 @@ public class SequenceAnnotationReport protected int appendDbRefs(final StringBuilder sb, SequenceI ds, boolean summary) { - List dbrefs = ds.getDBRefs(); - if (dbrefs == null) + List dbrefs, dbrefset = ds.getDBRefs(); + + if (dbrefset == null) { return 0; } + // PATCH for JAL-3980 defensive copy + + dbrefs = new ArrayList(); + + dbrefs.addAll(dbrefset); + // note this sorts the refs held on the sequence! dbrefs.sort(comparator); boolean ellipsis = false; @@ -586,7 +593,7 @@ public class SequenceAnnotationReport lineLength += accessionId.length() + 1; if (countForSource > 1 && summary) { - sb.append(", ").append(accessionId); + sb.append(",\n ").append(accessionId); lineLength++; } else @@ -604,11 +611,11 @@ public class SequenceAnnotationReport } if (moreSources) { - sb.append("
").append(source).append(COMMA).append(ELLIPSIS); + sb.append("
\n").append(source).append(COMMA).append(ELLIPSIS); } if (ellipsis) { - sb.append("
("); + sb.append("
\n("); sb.append(MessageManager.getString("label.output_seq_details")); sb.append(")"); }