From: Jim Procter Date: Wed, 28 Jan 2015 11:13:47 +0000 (+0000) Subject: JAL-674 patch to make Mapping.compareTransferredToRefPDBAnnot test X-Git-Tag: Jalview_2_9~103 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c16f0cbe6b789e03e064804f426fbc4399f39b44;p=jalview.git JAL-674 patch to make Mapping.compareTransferredToRefPDBAnnot test pass otherwise addAll throws an index not found exception with inspos==-1 --- diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index ba7e520..2ef1c76 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -1155,7 +1155,8 @@ public class AlignSeq } if (sq.getAnnotation() != null && sq.getAnnotation().length > 0) { - annotations.addAll(inspos, Arrays.asList(sq.getAnnotation())); + annotations.addAll(inspos == -1 ? annotations.size() : inspos, + Arrays.asList(sq.getAnnotation())); } } }