X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fws%2Frest%2FInputType.java;h=59b4cfccc5eafa7c566c63ead2d7284dfa3e30c0;hb=34a685e3f7f8eab7a6f5b2b93a9ff199172d38a4;hp=c3faf9d16f1c5d747ac7fc9fe749c64a16cf6458;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/ws/rest/InputType.java b/src/jalview/ws/rest/InputType.java index c3faf9d..59b4cfc 100644 --- a/src/jalview/ws/rest/InputType.java +++ b/src/jalview/ws/rest/InputType.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -46,6 +46,9 @@ 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 +212,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