JAL-4366 JAL-4371 allow cruft after inferred pdb ids, ex 1xyz_A.pdb yields 1xyzA
[jalview.git] / src / jalview / ws / io / mime / MimeTypes.java
index 872eec7..7e6e660 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -20,6 +20,8 @@
  */
 package jalview.ws.io.mime;
 
+import java.util.Locale;
+
 import jalview.io.packed.DataProvider.JvDataType;
 
 /**
@@ -34,8 +36,8 @@ public class MimeTypes
    * pair list {String,JvDataType} giving a mime-type followed by its associated
    * JvDataType enumeration.
    */
-  final public static Object[] typemap = new Object[]
-  { "application/x-align", JvDataType.ALIGNMENT,
+  final public static Object[] typemap = new Object[] {
+      "application/x-align", JvDataType.ALIGNMENT,
       "application/x-jalview-annotation", JvDataType.ANNOTATION,
       "application/x-newick", JvDataType.TREE,
       "application/x-new-hampshire", JvDataType.TREE,
@@ -53,7 +55,7 @@ public class MimeTypes
    */
   public static JvDataType getTypeOf(String mimeType)
   {
-    String mt = mimeType.toLowerCase();
+    String mt = mimeType.toLowerCase(Locale.ROOT);
     for (int i = 0; i < typemap.length; i += 2)
     {
       if (typemap[i].equals(mt))