JAL-629 Change all stdout and stderr output to use Console.outPrintln and Console...
[jalview.git] / src / jalview / analysis / Conservation.java
index bd87ee8..5bb0b09 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.analysis;
 
+import java.util.Locale;
+
 import jalview.analysis.scoremodels.ScoreMatrix;
 import jalview.analysis.scoremodels.ScoreModels;
 import jalview.datamodel.AlignmentAnnotation;
@@ -241,13 +243,13 @@ public class Conservation
       }
       else
       {
-        System.out.println("SEQUENCE HAS BEEN DELETED!!!");
+        jalview.bin.Console.outPrintln("SEQUENCE HAS BEEN DELETED!!!");
       }
     }
     else
     {
       // JBPNote INFO level debug
-      System.err.println(
+      jalview.bin.Console.errPrintln(
               "ERROR: calcSeqNum called with out of range sequence index for Alignment\n");
     }
   }
@@ -312,7 +314,7 @@ public class Conservation
   protected static void recordConservation(Map<String, Integer> resultMap,
           String res)
   {
-    res = res.toUpperCase();
+    res = res.toUpperCase(Locale.ROOT);
     for (Entry<String, Map<String, Integer>> property : ResidueProperties.propHash
             .entrySet())
     {
@@ -698,7 +700,7 @@ public class Conservation
 
       max = Math.max(max, bigtot);
 
-      quality.addElement(new Double(bigtot));
+      quality.addElement(Double.valueOf(bigtot));
     }
 
     double newmax = -Double.MAX_VALUE;
@@ -709,8 +711,8 @@ public class Conservation
       // tmp = ((max - tmp) * (size - cons2[j][23])) / size;
       tmp = ((max - tmp) * (size - cons2GapCounts[j])) / size;
 
-      // System.out.println(tmp+ " " + j);
-      quality.setElementAt(new Double(tmp), j);
+      // jalview.bin.Console.outPrintln(tmp+ " " + j);
+      quality.setElementAt(Double.valueOf(tmp), j);
 
       if (tmp > newmax)
       {
@@ -812,8 +814,8 @@ public class Conservation
         float vprop = value - qmin;
         vprop /= qmax;
         String description = FORMAT_3DP.form(value);
-        quality2.annotations[i] = new Annotation(" ", description,
-                ' ', value, new Color(minR + (maxR * vprop),
+        quality2.annotations[i] = new Annotation(" ", description, ' ',
+                value, new Color(minR + (maxR * vprop),
                         minG + (maxG * vprop), minB + (maxB * vprop)));
       }
     }