Merge branch 'develop' into spike/JAL-4047/JAL-4048_columns_in_sequenceID
[jalview.git] / src / jalview / io / MSFfile.java
index b05acff..0a0520a 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.io;
 
+import java.util.Locale;
+
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 import jalview.util.Comparison;
@@ -134,7 +136,7 @@ public class MSFfile extends AlignFile
       }
     } catch (IOException e)
     {
-      System.err.println("Exception parsing MSFFile " + e);
+      jalview.bin.Console.errPrintln("Exception parsing MSFFile " + e);
       e.printStackTrace();
     }
 
@@ -167,7 +169,7 @@ public class MSFfile extends AlignFile
       }
       else
       {
-        System.err.println("MSFFile Parser: Can't find sequence for "
+        jalview.bin.Console.errPrintln("MSFFile Parser: Can't find sequence for "
                 + headers.get(i));
       }
     }
@@ -184,7 +186,7 @@ public class MSFfile extends AlignFile
   public int checkSum(String seq)
   {
     int check = 0;
-    String sequence = seq.toUpperCase();
+    String sequence = seq.toUpperCase(Locale.ROOT);
 
     for (int i = 0; i < sequence.length(); i++)
     {
@@ -198,7 +200,7 @@ public class MSFfile extends AlignFile
         }
       } catch (Exception e)
       {
-        System.err.println("Exception during MSF Checksum calculation");
+        jalview.bin.Console.errPrintln("Exception during MSF Checksum calculation");
         e.printStackTrace();
       }
     }
@@ -278,10 +280,10 @@ public class MSFfile extends AlignFile
       i++;
     }
 
-    Format maxLenpad = new Format("%" + (new String("" + max)).length()
-            + "d");
-    Format maxChkpad = new Format("%" + (new String("1" + max)).length()
-            + "d");
+    Format maxLenpad = new Format(
+            "%" + (new String("" + max)).length() + "d");
+    Format maxChkpad = new Format(
+            "%" + (new String("1" + max)).length() + "d");
     i = 0;
 
     int bigChecksum = 0;
@@ -370,8 +372,7 @@ public class MSFfile extends AlignFile
           int end = start + 10;
 
           int length = s[j].getLength();
-          if ((end < length)
-                  && (start < length))
+          if ((end < length) && (start < length))
           {
             out.append(s[j].getSequence(start, end));