JAL-3423 use System.lineSeparator() in code and tests
[jalview.git] / src / jalview / analysis / AlignSeq.java
index 1b2578e..38adeee 100755 (executable)
@@ -565,8 +565,8 @@ public class AlignSeq
     }
 
     pid = pid / (aseq1.length - count) * 100;
-    output.append(new Format("Percentage ID = %3.2f\n").form(pid));
-    output.append(NEWLINE);
+    output.append(new Format("Percentage ID = %3.2f").form(pid));
+    output.append(NEWLINE).append(NEWLINE);
     try
     {
       os.print(output.toString());
@@ -862,8 +862,8 @@ public class AlignSeq
    */
   public jalview.datamodel.Mapping getMappingFromS1(boolean allowmismatch)
   {
-    ArrayList<Integer> as1 = new ArrayList<Integer>(),
-            as2 = new ArrayList<Integer>();
+    ArrayList<Integer> as1 = new ArrayList<>(),
+            as2 = new ArrayList<>();
     int pdbpos = s2.getStart() + getSeq2Start() - 2;
     int alignpos = s1.getStart() + getSeq1Start() - 2;
     int lp2 = pdbpos - 3, lp1 = alignpos - 3;
@@ -914,13 +914,11 @@ public class AlignSeq
     {
       mapseq1[i++] = ip;
     }
-    ;
     i = 0;
     for (Integer ip : as2)
     {
       mapseq2[i++] = ip;
     }
-    ;
     if (lastmatch)
     {
       mapseq1[mapseq1.length - 1] = alignpos;
@@ -951,13 +949,13 @@ public class AlignSeq
           List<SequenceI> ochains, AlignmentI al, String dnaOrProtein,
           boolean removeOldAnnots)
   {
-    List<SequenceI> orig = new ArrayList<SequenceI>(),
-            repl = new ArrayList<SequenceI>();
-    List<AlignSeq> aligs = new ArrayList<AlignSeq>();
+    List<SequenceI> orig = new ArrayList<>(),
+            repl = new ArrayList<>();
+    List<AlignSeq> aligs = new ArrayList<>();
     if (al != null && al.getHeight() > 0)
     {
-      ArrayList<SequenceI> matches = new ArrayList<SequenceI>();
-      ArrayList<AlignSeq> aligns = new ArrayList<AlignSeq>();
+      ArrayList<SequenceI> matches = new ArrayList<>();
+      ArrayList<AlignSeq> aligns = new ArrayList<>();
 
       for (SequenceI sq : ochains)
       {