From 2eaab3084d84daa55785c0c288592d2a7f603742 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 20 Sep 2021 14:54:14 +0100 Subject: [PATCH] JAL-3829 ensure nulls are not wildcards when retrieving annotation by calcId/label/description --- src/jalview/datamodel/Sequence.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 3bd7b4b..d52e049 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -1810,18 +1810,16 @@ public class Sequence extends ASequence implements SequenceI } private List getAlignmentAnnotations(String calcId, - String label, String description, boolean nullWildcard) + String label, String description, boolean ignoreDescription) { List result = new ArrayList<>(); if (this.annotation != null) { for (AlignmentAnnotation ann : annotation) { - if (((nullWildcard && calcId == null) - || (ann.calcId != null && ann.calcId.equals(calcId))) - && ((nullWildcard && label == null) - || (ann.label != null && ann.label.equals(label))) - && ((nullWildcard && description == null) + if ((ann.calcId != null && ann.calcId.equals(calcId)) + && (ann.label != null && ann.label.equals(label)) + && ((ignoreDescription && description == null) || (ann.description != null && ann.description.equals(description)))) -- 1.7.10.2