X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Frest%2FInputType.java;h=8741ddc630a714b27947e29cc707adc42a65e5af;hb=1ae9824ef37ce4ed36d1da986003474b47d1ab11;hp=c3faf9d16f1c5d747ac7fc9fe749c64a16cf6458;hpb=b13f521553582ef2fbfd7815ae25e23284babdea;p=jalview.git diff --git a/src/jalview/ws/rest/InputType.java b/src/jalview/ws/rest/InputType.java index c3faf9d..8741ddc 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-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -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