JAL-3691 toUpperCase(Locale.ROOT) for all standard file format operations
[jalview.git] / src / jalview / io / JnetAnnotationMaker.java
index 55138e7..27fc869 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.io;
 
+import java.util.Locale;
+
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Annotation;
@@ -59,7 +61,7 @@ public class JnetAnnotationMaker
     // in the future we could search for the query
     // sequence in the alignment before calling this function.
     SequenceI seqRef = al.getSequenceAt(firstSeq);
-    int width = preds[0].getSequence().length;
+    int width = preds[0].getLength();
     int[] gapmap = al.getSequenceAt(firstSeq).gapMap();
     if ((delMap != null && delMap.length > width)
             || (delMap == null && gapmap.length != width))
@@ -88,7 +90,7 @@ public class JnetAnnotationMaker
 
     while (i < preds.length)
     {
-      String id = preds[i].getName().toUpperCase();
+      String id = preds[i].getName().toUpperCase(Locale.ROOT);
 
       if (id.startsWith("LUPAS") || id.startsWith("JNET")
               || id.startsWith("JPRED"))
@@ -148,7 +150,7 @@ public class JnetAnnotationMaker
             {
               for (int j = 0; j < width; j++)
               {
-                float value = new Float(preds[i].getCharAt(j) + "")
+                float value = Float.valueOf(preds[i].getCharAt(j) + "")
                         .floatValue();
                 annotations[gapmap[j]] = new Annotation(
                         preds[i].getCharAt(j) + "", "",
@@ -159,7 +161,7 @@ public class JnetAnnotationMaker
             {
               for (int j = 0; j < width; j++)
               {
-                float value = new Float(preds[i].getCharAt(j) + "")
+                float value = Float.valueOf(preds[i].getCharAt(j) + "")
                         .floatValue();
                 annotations[gapmap[delMap[j]]] = new Annotation(
                         preds[i].getCharAt(j) + "", "",