Merge branch 'develop' into features/JAL-2446NCList
[jalview.git] / src / jalview / util / UrlLink.java
index 0529c73..007da86 100644 (file)
@@ -176,8 +176,12 @@ public class UrlLink
     String var = (usesDBaccession ? DB_ACCESSION : SEQUENCE_ID);
 
     return urlPrefix
-            + (dynamic ? (DELIM + var + ((regexReplace != null) ? EQUALS
-                    + regexReplace + EQUALS + DELIM : DELIM)) : "")
+            + (dynamic
+                    ? (DELIM + var
+                            + ((regexReplace != null)
+                                    ? EQUALS + regexReplace + EQUALS + DELIM
+                                    : DELIM))
+                    : "")
             + ((urlSuffix == null) ? "" : urlSuffix);
   }
 
@@ -262,8 +266,8 @@ public class UrlLink
     {
       if (regexReplace != null)
       {
-        com.stevesoft.pat.Regex rg = com.stevesoft.pat.Regex.perlCode("/"
-                + regexReplace + "/");
+        com.stevesoft.pat.Regex rg = com.stevesoft.pat.Regex
+                .perlCode("/" + regexReplace + "/");
         if (rg.search(idstring))
         {
           int ns = rg.numSubs();
@@ -321,8 +325,8 @@ public class UrlLink
                 if (rg.matchedFrom(s) > -1)
                 {
                   subs.addElement(rg.stringMatched(s));
-                  subs.addElement(urlPrefix + rg.stringMatched(s)
-                          + urlSuffix);
+                  subs.addElement(
+                          urlPrefix + rg.stringMatched(s) + urlSuffix);
                 }
                 s++;
               }
@@ -470,8 +474,8 @@ public class UrlLink
       regexReplace = link.substring(sqidPos + startLength, p);
       try
       {
-        com.stevesoft.pat.Regex rg = com.stevesoft.pat.Regex.perlCode("/"
-                + regexReplace + "/");
+        com.stevesoft.pat.Regex rg = com.stevesoft.pat.Regex
+                .perlCode("/" + regexReplace + "/");
         if (rg == null)
         {
           invalidMessage = "Invalid Regular Expression : '" + regexReplace
@@ -573,7 +577,8 @@ public class UrlLink
     {
       // collect matching db-refs
       DBRefEntry[] dbr = DBRefUtils.selectRefs(seq.getDBRefs(),
-              new String[] { target });
+              new String[]
+              { target });
 
       // if there are any dbrefs which match up with the link
       if (dbr != null)