X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormats.java;h=baf2504403b3f8bad8131105fca82b5c0dd61514;hb=304e64fb34b32659be1bbfd39fb4e15b2f79586e;hp=fca29bdc46bcbec3f34c353a57f383c71e563616;hpb=cfb79b69d9fa44595560659bd95d1d1cd27677ad;p=jalview.git diff --git a/src/jalview/io/FileFormats.java b/src/jalview/io/FileFormats.java index fca29bd..baf2504 100644 --- a/src/jalview/io/FileFormats.java +++ b/src/jalview/io/FileFormats.java @@ -20,6 +20,8 @@ */ package jalview.io; +import java.util.Locale; + import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -104,7 +106,7 @@ public class FileFormats implements ApplicationSingletonI 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()); @@ -123,7 +125,7 @@ public class FileFormats implements ApplicationSingletonI */ public void deregisterFileFormat(String name) { - FileFormatI ff = formats.remove(name.toUpperCase()); + FileFormatI ff = formats.remove(name.toUpperCase(Locale.ROOT)); identifiable.remove(ff); } @@ -176,7 +178,7 @@ public class FileFormats implements ApplicationSingletonI */ public FileFormatI forName(String format) { - return format == null ? null : formats.get(format.toUpperCase()); + return format == null ? null : formats.get(format.toUpperCase(Locale.ROOT)); } /**