Merge develop to Release_2_8_3_Branch
[jalview.git] / src / jalview / ws / rest / InputType.java
index 91fce18..8741ddc 100644 (file)
@@ -46,6 +46,8 @@ import org.apache.http.entity.mime.content.StringBody;
  */
 public abstract class InputType
 {
+  private static final Pattern URL_PATTERN = Pattern.compile("^([^=]+)=?'?([^']*)?'?");
+
   /**
    * not used yet
    */
@@ -209,7 +211,7 @@ public abstract class InputType
     boolean valid = true;
     for (String tok : tokenstring)
     {
-      Matcher mtch = Pattern.compile("^([^=]+)=?'?([^']*)?'?").matcher(tok);
+      Matcher mtch = URL_PATTERN.matcher(tok);
       if (mtch.find())
       {
         try