From c16f0cbe6b789e03e064804f426fbc4399f39b44 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 28 Jan 2015 11:13:47 +0000 Subject: [PATCH] JAL-674 patch to make Mapping.compareTransferredToRefPDBAnnot test pass otherwise addAll throws an index not found exception with inspos==-1 --- src/jalview/analysis/AlignSeq.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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())); } } } -- 1.7.10.2