JAL-3691 automatic insertion of Locale.ROOT to toUpperCase() and toLowerCase() and...
[jalview.git] / src / jalview / io / FileFormats.java
index aadcdb9..9e0a7f7 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.io;
 
+import java.util.Locale;
+
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
@@ -102,7 +104,7 @@ public class FileFormats
   protected void registerFileFormat(FileFormatI format,
           boolean isIdentifiable)
   {
-    String name = format.getName().toUpperCase();
+    String name = format.getName().toUpperCase(Locale.ROOT);
     if (formats.containsKey(name))
     {
       System.err.println("Overwriting file format: " + format.getName());
@@ -121,7 +123,7 @@ public class FileFormats
    */
   public void deregisterFileFormat(String name)
   {
-    FileFormatI ff = formats.remove(name.toUpperCase());
+    FileFormatI ff = formats.remove(name.toUpperCase(Locale.ROOT));
     identifiable.remove(ff);
   }
 
@@ -174,7 +176,7 @@ public class FileFormats
    */
   public FileFormatI forName(String format)
   {
-    return format == null ? null : formats.get(format.toUpperCase());
+    return format == null ? null : formats.get(format.toUpperCase(Locale.ROOT));
   }
 
   /**