X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormats.java;h=de83e9bb06507e2300f6a97f6edb26888090e71d;hb=eb26f5aa7a1961c0e1fb5e14f12e880a651b38fa;hp=aadcdb9d23bb3c7da23f91aa78506e18c29c414c;hpb=83c031d13e0c8f8c4421b27728246111999d930f;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)); } /**