JAL-3438 spotless for 2.11.2.0
[jalview.git] / src / jalview / analysis / Rna.java
index 3108ef3..9649240 100644 (file)
@@ -49,7 +49,8 @@ public class Rna
    */
   public static boolean isOpeningParenthesis(char c)
   {
-    return ('A' <= c && c <= 'Z' || c == '(' || c == '[' || c == '{' || c == '<');
+    return ('A' <= c && c <= 'Z' || c == '(' || c == '[' || c == '{'
+            || c == '<');
   }
 
   /**
@@ -74,7 +75,8 @@ public class Rna
    */
   public static boolean isClosingParenthesis(char c)
   {
-    return ('a' <= c && c <= 'z' || c == ')' || c == ']' || c == '}' || c == '>');
+    return ('a' <= c && c <= 'z' || c == ')' || c == ']' || c == '}'
+            || c == '>');
   }
 
   /**
@@ -160,8 +162,8 @@ public class Rna
         if (!stacks.containsKey(opening))
         {
           throw new WUSSParseException(MessageManager.formatMessage(
-                  "exception.mismatched_unseen_closing_char",
-                  new String[] { String.valueOf(base) }), i);
+                  "exception.mismatched_unseen_closing_char", new String[]
+                  { String.valueOf(base) }), i);
         }
 
         Stack<Integer> stack = stacks.get(opening);
@@ -169,8 +171,8 @@ public class Rna
         {
           // error whilst parsing i'th position. pass back
           throw new WUSSParseException(MessageManager.formatMessage(
-                  "exception.mismatched_closing_char",
-                  new String[] { String.valueOf(base) }), i);
+                  "exception.mismatched_closing_char", new String[]
+                  { String.valueOf(base) }), i);
         }
         int temp = stack.pop();
 
@@ -188,18 +190,14 @@ public class Rna
          * i (length of input string)
          */
         throw new WUSSParseException(MessageManager.formatMessage(
-                "exception.mismatched_opening_char",
-                new String[] { String.valueOf(opening),
-                    String.valueOf(stack.pop()) }), i);
+                "exception.mismatched_opening_char", new String[]
+                { String.valueOf(opening), String.valueOf(stack.pop()) }),
+                i);
       }
     }
     return pairs;
   }
 
-  
-
-  
-
   /**
    * Function to get the end position corresponding to a given start position
    * 
@@ -438,8 +436,8 @@ public class Rna
       /*
        * catch things like <<..<<..>>..<<..>>>> |
        */
-      int j = bps.size() - 1;
-      while (j >= 0)
+      int j = bps.size();
+      while (--j >= 0)
       {
         int popen = bps.get(j).getBP5();
 
@@ -458,7 +456,6 @@ public class Rna
             break;
           }
         }
-        j -= 1;
       }
 
       // Put positions and helix information into the hashtable