JAL-1953 2.11.2 with Archeopteryx!
[jalview.git] / src / jalview / analysis / AlignmentSorter.java
index 9f9b774..6005208 100755 (executable)
@@ -148,8 +148,8 @@ public class AlignmentSorter
     }
 
     // NOTE: DO NOT USE align.setSequenceAt() here - it will NOT work
-    List<SequenceI> asq;
-    synchronized (asq = align.getSequences())
+    List<SequenceI> asq = align.getSequences();
+    synchronized (asq)
     {
       for (int i = 0; i < len; i++)
       {
@@ -184,8 +184,8 @@ public class AlignmentSorter
   public static void setOrder(AlignmentI align, SequenceI[] seqs)
   {
     // NOTE: DO NOT USE align.setSequenceAt() here - it will NOT work
-    List<SequenceI> algn;
-    synchronized (algn = align.getSequences())
+    List<SequenceI> algn = align.getSequences();
+    synchronized (algn)
     {
       List<SequenceI> tmp = new ArrayList<>();
 
@@ -656,7 +656,7 @@ public class AlignmentSorter
 
     for (int i = 0; i < alignment.length; i++)
     {
-      ids[i] = (new Float(alignment[i].getName().substring(8)))
+      ids[i] = (Float.valueOf(alignment[i].getName().substring(8)))
               .floatValue();
     }
 
@@ -778,14 +778,15 @@ public class AlignmentSorter
     if (method != FEATURE_SCORE && method != FEATURE_LABEL
             && method != FEATURE_DENSITY)
     {
-      String msg = String
-              .format("Implementation Error - sortByFeature method must be either '%s' or '%s'",
-                      FEATURE_SCORE, FEATURE_DENSITY);
+      String msg = String.format(
+              "Implementation Error - sortByFeature method must be either '%s' or '%s'",
+              FEATURE_SCORE, FEATURE_DENSITY);
       System.err.println(msg);
       return;
     }
 
-    flipFeatureSortIfUnchanged(method, featureTypes, groups, startCol, endCol);
+    flipFeatureSortIfUnchanged(method, featureTypes, groups, startCol,
+            endCol);
 
     SequenceI[] seqs = alignment.getSequencesArray();
 
@@ -804,8 +805,8 @@ public class AlignmentSorter
        * get sequence residues overlapping column region
        * and features for residue positions and specified types
        */
-      String[] types = featureTypes == null ? null : featureTypes
-              .toArray(new String[featureTypes.size()]);
+      String[] types = featureTypes == null ? null
+              : featureTypes.toArray(new String[featureTypes.size()]);
       List<SequenceFeature> sfs = seqs[i].findFeatures(startCol + 1,
               endCol + 1, types);