JAL-3691 automatic insertion of Locale.ROOT to toUpperCase() and toLowerCase() and...
[jalview.git] / src / jalview / util / CaseInsensitiveString.java
index b66e80d..536671d 100644 (file)
@@ -25,6 +25,8 @@ package jalview.util;
  * want to preserve case, but do not want to duplicate upper and lower case
  * variants
  */
+import java.util.Locale;
+
 public final class CaseInsensitiveString
 {
   String value;
@@ -71,7 +73,7 @@ public final class CaseInsensitiveString
   @Override
   public int hashCode()
   {
-    return value == null ? super.hashCode() : value.toUpperCase()
-            .hashCode();
+    return value == null ? super.hashCode()
+            : value.toUpperCase(Locale.ROOT).hashCode();
   }
 }