X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormats.java;h=de83e9bb06507e2300f6a97f6edb26888090e71d;hb=2305d687bac5ed8a76ecb93c54c7b090a928e362;hp=aadcdb9d23bb3c7da23f91aa78506e18c29c414c;hpb=707c96c8b823c0af8004a09ea1d7b68e8acb0b5a;p=jalview.git diff --git a/src/jalview/io/FileFormats.java b/src/jalview/io/FileFormats.java index aadcdb9..de83e9b 100644 --- a/src/jalview/io/FileFormats.java +++ b/src/jalview/io/FileFormats.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Set; @@ -102,7 +103,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 +122,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 +175,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)); } /**