From: Jim Procter Date: Mon, 20 Sep 2021 13:54:14 +0000 (+0100) Subject: JAL-3829 ensure nulls are not wildcards when retrieving annotation by calcId/label... X-Git-Tag: Release_2_11_2_0~34^2~3^2~8 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=2eaab3084d84daa55785c0c288592d2a7f603742 JAL-3829 ensure nulls are not wildcards when retrieving annotation by calcId/label/description --- 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))))