X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FFileFormats.java;h=18372dbbf4aa54cf1ef115752ec87a6cf78f8e61;hb=ac7c83b360752f04362700dcd279b5524a559da9;hp=aadcdb9d23bb3c7da23f91aa78506e18c29c414c;hpb=f6123f656fa387e11f506dedd09672a0d0ff5ac5;p=jalview.git diff --git a/src/jalview/io/FileFormats.java b/src/jalview/io/FileFormats.java index aadcdb9..18372db 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; @@ -102,10 +104,11 @@ 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()); + jalview.bin.Console + .errPrintln("Overwriting file format: " + format.getName()); } formats.put(name, format); if (isIdentifiable) @@ -121,7 +124,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 +177,8 @@ 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)); } /**