From fed436f2c7c864948aa25f59de919c5a18674c23 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 7 Mar 2018 11:27:20 +0000 Subject: [PATCH] JAL-2925 handle empty annotation when copying group consensus --- src/jalview/datamodel/SequenceGroup.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 6b797d7..944f263 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -1189,9 +1189,10 @@ public class SequenceGroup implements AnnotatedCollectionI { if (consensus.annotations[i] != null) { - if (consensus.annotations[i].description.charAt(0) == '[') + String desc = consensus.annotations[i].description; + if (desc.length() > 1 && desc.charAt(0) == '[') { - seqs.append(consensus.annotations[i].description.charAt(1)); + seqs.append(desc.charAt(1)); } else { -- 1.7.10.2