X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FSequenceAnnotationReport.java;h=95bd1cc2ca4008a1cfe4248467e7628ff5ab5429;hb=14380adc384f8a1c96f71ef2ea26607cdac22a14;hp=b0b0deeb6a578030f27377129aa588ba9d376ed3;hpb=3352c2b216fc2c4051410efe7a564b790c79ebd9;p=jalview.git diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index b0b0dee..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;