Merge branch 'develop' into feature/JAL-3551Pymol
[jalview.git] / src / jalview / ws / rest / params / SeqGroupIndexVector.java
index dcb7fab..9210414 100644 (file)
@@ -75,6 +75,7 @@ public class SeqGroupIndexVector extends InputType
    *          - alignment to be processed
    * @return al or a new alignment with appropriate attributes/order for input
    */
+  @Override
   public AlignmentI prepareAlignment(AlignmentI al)
   {
     jalview.analysis.AlignmentSorter.sortByGroup(al);
@@ -90,10 +91,10 @@ public class SeqGroupIndexVector extends InputType
     AlignmentI al = rj.getAlignmentForInput(token, type);
     // assume that alignment is properly ordered so groups form consecutive
     // blocks
-    ArrayList<int[]> gl = new ArrayList<int[]>();
+    ArrayList<int[]> gl = new ArrayList<>();
     int p = 0, lowest = al.getHeight(), highest = 0;
-    List<SequenceGroup> sgs;
-    synchronized (sgs = al.getGroups())
+    List<SequenceGroup> sgs = al.getGroups();
+    synchronized (sgs)
     {
       for (SequenceGroup sg : sgs)
       {
@@ -125,9 +126,13 @@ public class SeqGroupIndexVector extends InputType
           else
           {
             if (p < se[0])
+            {
               se[0] = p;
+            }
             if (p > se[1])
+            {
               se[1] = p;
+            }
           }
         }
         if (se != null)
@@ -168,7 +173,9 @@ public class SeqGroupIndexVector extends InputType
     int[][] vals = gl.toArray(new int[gl.size()][]);
     int[] srt = new int[gl.size()];
     for (int i = 0; i < vals.length; i++)
+    {
       srt[i] = vals[i][0];
+    }
     jalview.util.QuickSort.sort(srt, vals);
     list = false;
     int last = vals[0][0] - 1;
@@ -210,7 +217,7 @@ public class SeqGroupIndexVector extends InputType
   @Override
   public List<String> getURLEncodedParameter()
   {
-    ArrayList<String> prms = new ArrayList<String>();
+    ArrayList<String> prms = new ArrayList<>();
     super.addBaseParams(prms);
     prms.add("minsize='" + minsize + "'");
     prms.add("sep='" + sep + "'");
@@ -243,7 +250,9 @@ public class SeqGroupIndexVector extends InputType
       {
         minsize = Integer.valueOf(val);
         if (minsize >= 0)
+        {
           return true;
+        }
       } catch (Exception x)
       {