JAL-3691 automatic insertion of Locale.ROOT to toUpperCase() and toLowerCase() and...
[jalview.git] / src / jalview / schemes / FeatureColour.java
index 0d36f4f..e5bda58 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.schemes;
 
+import java.util.Locale;
+
 import jalview.api.FeatureColourI;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.features.FeatureMatcher;
@@ -194,19 +196,19 @@ public class FeatureColour implements FeatureColourI
               "Expected either 'label' or a colour specification in the line: "
                       + descriptor);
     }
-    if (nextToken.toLowerCase().startsWith(LABEL))
+    if (nextToken.toLowerCase(Locale.ROOT).startsWith(LABEL))
     {
       byLabel = true;
       // get the token after the next delimiter:
       mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null);
       mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null);
     }
-    else if (nextToken.toLowerCase().startsWith(SCORE))
+    else if (nextToken.toLowerCase(Locale.ROOT).startsWith(SCORE))
     {
       mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null);
       mincol = (gcol.hasMoreTokens() ? gcol.nextToken() : null);
     }
-    else if (nextToken.toLowerCase().startsWith(ATTRIBUTE))
+    else if (nextToken.toLowerCase(Locale.ROOT).startsWith(ATTRIBUTE))
     {
       byAttribute = true;
       attName = (gcol.hasMoreTokens() ? gcol.nextToken() : null);
@@ -304,7 +306,7 @@ public class FeatureColour implements FeatureColourI
       }
 
       gcol.nextToken(); // skip next '|'
-      if (tok.toLowerCase().startsWith(ABSOLUTE))
+      if (tok.toLowerCase(Locale.ROOT).startsWith(ABSOLUTE))
       {
         minval = gcol.nextToken();
         gcol.nextToken(); // skip next '|'
@@ -380,17 +382,17 @@ public class FeatureColour implements FeatureColourI
       {
         // threshold type and possibly a threshold value
         ttype = gcol.nextToken();
-        if (ttype.toLowerCase().startsWith(BELOW))
+        if (ttype.toLowerCase(Locale.ROOT).startsWith(BELOW))
         {
           featureColour.setBelowThreshold(true);
         }
-        else if (ttype.toLowerCase().startsWith(ABOVE))
+        else if (ttype.toLowerCase(Locale.ROOT).startsWith(ABOVE))
         {
           featureColour.setAboveThreshold(true);
         }
         else
         {
-          if (!ttype.toLowerCase().startsWith("no"))
+          if (!ttype.toLowerCase(Locale.ROOT).startsWith("no"))
           {
             System.err.println(
                     "Ignoring unrecognised threshold type : " + ttype);