X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;h=f3cdae63cb5465743b18cbf6d63acaa76fc3b4ef;hb=9c98d4bd666346f6ad3892c5394b7da3be82d93e;hp=2ee45039569c5bcb6081d46f481f706ff2c10910;hpb=3027bfb4b1b13af8686abcd419888e03141bd672;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 2ee4503..f3cdae6 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -20,6 +20,8 @@ */ package jalview.datamodel; +import java.util.Locale; + import jalview.analysis.Rna; import jalview.analysis.SecStrConsensus.SimpleBP; import jalview.analysis.WUSSParseException; @@ -181,7 +183,8 @@ public class AlignmentAnnotation return rnaSecondaryStructureEquivalent(that, true); } - public boolean rnaSecondaryStructureEquivalent(AlignmentAnnotation that, boolean compareType) + public boolean rnaSecondaryStructureEquivalent(AlignmentAnnotation that, + boolean compareType) { SequenceFeature[] thisSfArray = this.getRnaSecondaryStructure(); SequenceFeature[] thatSfArray = that.getRnaSecondaryStructure(); @@ -194,21 +197,28 @@ public class AlignmentAnnotation return false; } Arrays.sort(thisSfArray, new SFSortByEnd()); // probably already sorted - // like this + // like this Arrays.sort(thatSfArray, new SFSortByEnd()); // probably already sorted - // like this - for (int i=0; i < thisSfArray.length; i++) { + // like this + for (int i = 0; i < thisSfArray.length; i++) + { SequenceFeature thisSf = thisSfArray[i]; SequenceFeature thatSf = thatSfArray[i]; - if (compareType) { - if (thisSf.getType() == null || thatSf.getType() == null) { - if (thisSf.getType() == null && thatSf.getType() == null) { + if (compareType) + { + if (thisSf.getType() == null || thatSf.getType() == null) + { + if (thisSf.getType() == null && thatSf.getType() == null) + { continue; - } else { + } + else + { return false; } } - if (! thisSf.getType().equals(thatSf.getType())) { + if (!thisSf.getType().equals(thatSf.getType())) + { return false; } } @@ -1225,7 +1235,7 @@ public class AlignmentAnnotation { if (seqname && this.sequenceRef != null) { - int i = description.toLowerCase().indexOf(""); + int i = description.toLowerCase(Locale.ROOT).indexOf(""); if (i > -1) { // move the html tag to before the sequence reference.