JAL-3691 patch toUpper/toLower to use Locale.ROOT for 2.11.2 src
[jalview.git] / src / ext / edu / ucsf / rbvi / strucviz2 / ChimUtils.java
index 1d57a31..ad5e350 100644 (file)
@@ -36,6 +36,7 @@ import java.awt.Color;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import org.slf4j.Logger;
@@ -173,7 +174,7 @@ public abstract class ChimUtils
       float[] rgbValues = new float[4];
       for (int i = 0; i < rgbStrings.length; i++)
       {
-        Float f = new Float(rgbStrings[i]);
+        Float f = Float.valueOf(rgbStrings[i]);
         rgbValues[i] = f.floatValue();
       }
       if (rgbStrings.length == 4)
@@ -203,7 +204,7 @@ public abstract class ChimUtils
    */
   public static Integer makeModelKey(int model, int subModel)
   {
-    return new Integer(model * MAX_SUB_MODELS + subModel);
+    return Integer.valueOf(model * MAX_SUB_MODELS + subModel);
   }
 
   // invoked by the getResdiue (parseConnectivityReplies in
@@ -327,11 +328,11 @@ public abstract class ChimUtils
     String resType = "";
     if (split.length == 2)
     {
-      resType = split[0].trim().toUpperCase();
+      resType = split[0].trim().toUpperCase(Locale.ROOT);
     }
     else if (split.length == 3)
     {
-      resType = split[1].trim().toUpperCase();
+      resType = split[1].trim().toUpperCase(Locale.ROOT);
     }
     if (resType.equalsIgnoreCase("HOH") || resType.equalsIgnoreCase("WAT"))
     {