JAL-3691 automatic insertion of Locale.ROOT to toUpperCase() and toLowerCase() and...
[jalview.git] / src / jalview / util / matcher / Matcher.java
index 51e1828..e43ead2 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.util.matcher;
 
+import java.util.Locale;
+
 import java.util.Objects;
 
 /**
@@ -102,7 +104,7 @@ public class Matcher implements MatcherI
       patternType = PatternType.String;
     }
 
-    uppercasePattern = pattern == null ? null : pattern.toUpperCase();
+    uppercasePattern = pattern == null ? null : pattern.toUpperCase(Locale.ROOT);
 
     // if we add regex conditions (e.g. matchesPattern), then
     // pattern should hold the raw regex, and
@@ -172,7 +174,7 @@ public class Matcher implements MatcherI
   boolean matchesString(String compareTo)
   {
     boolean matched = false;
-    String upper = compareTo.toUpperCase().trim();
+    String upper = compareTo.toUpperCase(Locale.ROOT).trim();
     switch(condition) {
     case Matches:
       matched = upper.equals(uppercasePattern);