You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/03/13 18:39:52 UTC
[1/6] git commit: Extends validator to allow set predefined regex
used to validate URLs
Repository: struts
Updated Branches:
refs/heads/develop bcd61a0de -> aa744b811
Extends validator to allow set predefined regex used to validate URLs
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/31be88af
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/31be88af
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/31be88af
Branch: refs/heads/develop
Commit: 31be88afa28fb9b1e9854d0d7673ab9b979cf9be
Parents: bcd61a0
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sun Mar 9 21:01:15 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sun Mar 9 21:01:15 2014 +0100
----------------------------------------------------------------------
.../validator/validators/URLValidator.java | 46 ++++++++++++++++++
.../xwork2/validator/URLValidatorTest.java | 50 ++++++++++++++++++++
2 files changed, 96 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/31be88af/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
index b4a1287..4f63961 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
@@ -17,6 +17,7 @@ package com.opensymphony.xwork2.validator.validators;
import com.opensymphony.xwork2.validator.ValidationException;
import com.opensymphony.xwork2.util.URLUtil;
+import org.apache.commons.lang3.StringUtils;
/**
* <!-- START SNIPPET: javadoc -->
@@ -31,6 +32,8 @@ import com.opensymphony.xwork2.util.URLUtil;
*
* <ul>
* <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
+ * <li>urlRegexExpression - The regex defined as expression used to validate url. If not defined 'urlRegex' will be used instead</li>
+ * <li>urlRegex - The regex used to validate url. If not defined default regex will be used</li>
* </ul>
*
* <!-- END SNIPPET: parameters -->
@@ -62,6 +65,9 @@ import com.opensymphony.xwork2.util.URLUtil;
*/
public class URLValidator extends FieldValidatorSupport {
+ private String urlRegex;
+ private String urlRegexExpression;
+
public void validate(Object object) throws ValidationException {
String fieldName = getFieldName();
Object value = this.getFieldValue(fieldName, object);
@@ -72,8 +78,48 @@ public class URLValidator extends FieldValidatorSupport {
return;
}
+ // FIXME deprecated! the same regex below should be used instead
+ // replace logic with next major release
if (!(value.getClass().equals(String.class)) || !URLUtil.verifyUrl((String) value)) {
addFieldError(fieldName, object);
}
}
+
+ /**
+ * This is used to support client-side validation, it's based on
+ * http://stackoverflow.com/questions/161738/what-is-the-best-regular-expression-to-check-if-a-string-is-a-valid-url
+ *
+ * @return regex to validate URLs
+ */
+ public String getUrlRegex() {
+ if (StringUtils.isNotEmpty(urlRegexExpression)) {
+ return (String) parse(urlRegexExpression, String.class);
+ } else if (StringUtils.isNotEmpty(urlRegex)) {
+ return urlRegex;
+ } else {
+ return "^(https?|ftp):\\/\\/" +
+ "(([a-z0-9$_\\.\\+!\\*\\'\\(\\),;\\?&=-]|%[0-9a-f]{2})+" +
+ "(:([a-z0-9$_\\.\\+!\\*\\'\\(\\),;\\?&=-]|%[0-9a-f]{2})+)?" +
+ "@)?(#?" +
+ ")((([a-z0-9]\\.|[a-z0-9][a-z0-9-]*[a-z0-9]\\.)*" +
+ "[a-z][a-z0-9-]*[a-z0-9]" +
+ "|((\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])\\.){3}" +
+ "(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])" +
+ ")(:\\d+)?" +
+ ")(((\\/+([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)*" +
+ "(\\?([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)" +
+ "?)?)?" +
+ "(#([a-z0-9$_\\.\\+!\\*\\'\\(\\),;:@&=-]|%[0-9a-f]{2})*)?" +
+ "$";
+ }
+ }
+
+ public void setUrlRegex(String urlRegex) {
+ this.urlRegex = urlRegex;
+ }
+
+ public void setUrlRegexExpression(String urlRegexExpression) {
+ this.urlRegexExpression = urlRegexExpression;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/struts/blob/31be88af/xwork-core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java b/xwork-core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
index 9724895..f495557 100644
--- a/xwork-core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
+++ b/xwork-core/src/test/java/com/opensymphony/xwork2/validator/URLValidatorTest.java
@@ -17,9 +17,12 @@ package com.opensymphony.xwork2.validator;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.XWorkTestCase;
+import com.opensymphony.xwork2.util.URLUtil;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.validator.validators.URLValidator;
+import java.util.regex.Pattern;
+
/**
* Test case for URLValidator
*
@@ -103,6 +106,46 @@ public class URLValidatorTest extends XWorkTestCase {
assertFalse(validator.getValidatorContext().hasFieldErrors());
}
+ public void testValidUrlWithRegex() throws Exception {
+ URLValidator validator = new URLValidator();
+
+ validator.setUrlRegex("^myapp:\\/\\/[a-z]*\\.com$");
+
+ Pattern pattern = Pattern.compile(validator.getUrlRegex());
+
+ assertTrue(pattern.matcher("myapp://test.com").matches());
+ assertFalse(pattern.matcher("myap://test.com").matches());
+ }
+
+ public void testValidUrlWithRegexExpression() throws Exception {
+ URLValidator validator = new URLValidator();
+ ActionContext.getContext().getValueStack().push(new MyAction());
+ validator.setValueStack(ActionContext.getContext().getValueStack());
+ validator.setUrlRegexExpression("${urlRegex}");
+
+ Pattern pattern = Pattern.compile(validator.getUrlRegex());
+
+ assertTrue(pattern.matcher("myapp://test.com").matches());
+ assertFalse(pattern.matcher("myap://test.com").matches());
+ }
+
+ public void testValidUrlWithDefaultRegex() throws Exception {
+ URLValidator validator = new URLValidator();
+
+ Pattern pattern = Pattern.compile(validator.getUrlRegex());
+
+ assertFalse(pattern.matcher("myapp://test.com").matches());
+ assertFalse(pattern.matcher("myap://test.com").matches());
+ assertFalse(pattern.matcher("").matches());
+ assertFalse(pattern.matcher(" ").matches());
+ assertFalse(pattern.matcher("no url").matches());
+
+ assertTrue(pattern.matcher("http://www.opensymphony.com").matches());
+ assertTrue(pattern.matcher("https://www.opensymphony.com").matches());
+ assertTrue(pattern.matcher("https://www.opensymphony.com:443/login").matches());
+ assertTrue(pattern.matcher("http://localhost:8080/myapp").matches());
+ }
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -140,4 +183,11 @@ public class URLValidatorTest extends XWorkTestCase {
return "http://yahoo.com/articles?id=123";
}
}
+
+ class MyAction {
+
+ public String getUrlRegex() {
+ return "myapp:\\/\\/[a-z]*\\.com";
+ }
+ }
}
[5/6] git commit: Moves snippets to wiki
Posted by lu...@apache.org.
Moves snippets to wiki
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e5854906
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e5854906
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e5854906
Branch: refs/heads/develop
Commit: e585490656225f88dc28300b722ec38dcffbb6ba
Parents: e66a306
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sun Mar 9 21:22:28 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sun Mar 9 21:22:28 2014 +0100
----------------------------------------------------------------------
.../validator/annotations/UrlValidator.java | 2 --
.../validator/validators/URLValidator.java | 24 --------------------
2 files changed, 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/e5854906/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
index a06db12..9ad9223 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package com.opensymphony.xwork2.validator.annotations;
import java.lang.annotation.ElementType;
@@ -27,7 +26,6 @@ import java.lang.annotation.Target;
* <pre>
* @UrlValidator(message = "Default message", key = "i18n.key", shortCircuit = true)
* </pre>
- *
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
http://git-wip-us.apache.org/repos/asf/struts/blob/e5854906/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
index 4f63961..767416d 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java
@@ -20,28 +20,9 @@ import com.opensymphony.xwork2.util.URLUtil;
import org.apache.commons.lang3.StringUtils;
/**
- * <!-- START SNIPPET: javadoc -->
- *
* URLValidator checks that a given field is a String and a valid URL
- *
- * <!-- END SNIPPET: javadoc -->
- *
- * <p/>
- *
- * <!-- START SNIPPET: parameters -->
- *
- * <ul>
- * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
- * <li>urlRegexExpression - The regex defined as expression used to validate url. If not defined 'urlRegex' will be used instead</li>
- * <li>urlRegex - The regex used to validate url. If not defined default regex will be used</li>
- * </ul>
- *
- * <!-- END SNIPPET: parameters -->
- *
- * <p/>
*
* <pre>
- * <!-- START SNIPPET: examples -->
* <validators>
* <!-- Plain Validator Syntax -->
* <validator type="url">
@@ -56,12 +37,7 @@ import org.apache.commons.lang3.StringUtils;
* </field-validator>
* </field>
* </validators>
- * <!-- END SNIPPET: examples -->
* </pre>
- *
- *
- * @author $Author$
- * @version $Date$ $Revision$
*/
public class URLValidator extends FieldValidatorSupport {
[4/6] git commit: Extends annotation to support new URL regex
parameters
Posted by lu...@apache.org.
Extends annotation to support new URL regex parameters
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e66a3062
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e66a3062
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e66a3062
Branch: refs/heads/develop
Commit: e66a3062992fac588cf3f570a224bbe7d9ce5ef5
Parents: 3f6ce65
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sun Mar 9 21:04:11 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sun Mar 9 21:04:11 2014 +0100
----------------------------------------------------------------------
...nnotationValidationConfigurationBuilder.java | 6 ++
.../validator/annotations/UrlValidator.java | 74 +++-----------------
2 files changed, 16 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/e66a3062/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
index 6ab06a9..dbd8975 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationValidationConfigurationBuilder.java
@@ -528,6 +528,12 @@ public class AnnotationValidationConfigurationBuilder {
} else if (v.fieldName() != null && v.fieldName().length() > 0) {
params.put("fieldName", v.fieldName());
}
+ if (StringUtils.isNotEmpty(v.urlRegex())) {
+ params.put("urlRegex", v.urlRegex());
+ }
+ if (StringUtils.isNotEmpty(v.urlRegexExpression())) {
+ params.put("urlRegexExpression", v.urlRegexExpression());
+ }
validatorFactory.lookupRegisteredValidatorType(validatorType);
return new ValidatorConfig.Builder(validatorType)
http://git-wip-us.apache.org/repos/asf/struts/blob/e66a3062/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
index fb6fa3c..a06db12 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/annotations/UrlValidator.java
@@ -22,75 +22,12 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * <!-- START SNIPPET: description -->
* This validator checks that a field is a valid URL.
- * <!-- END SNIPPET: description -->
- *
- * <p/> <u>Annotation usage:</u>
- *
- * <!-- START SNIPPET: usage -->
- * <p/>The annotation must be applied at method level.
- * <!-- END SNIPPET: usage -->
- *
- * <p/> <u>Annotation parameters:</u>
- *
- * <!-- START SNIPPET: parameters -->
- * <table class='confluenceTable'>
- * <tr>
- * <th class='confluenceTh'> Parameter </th>
- * <th class='confluenceTh'> Required </th>
- * <th class='confluenceTh'> Default </th>
- * <th class='confluenceTh'> Notes </th>
- * </tr>
- * <tr>
- * <td class='confluenceTd'>message</td>
- * <td class='confluenceTd'>yes</td>
- * <td class='confluenceTd'> </td>
- * <td class='confluenceTd'>field error message</td>
- * </tr>
- * <tr>
- * <td class='confluenceTd'>key</td>
- * <td class='confluenceTd'>no</td>
- * <td class='confluenceTd'> </td>
- * <td class='confluenceTd'>i18n key from language specific properties file.</td>
- * </tr>
- * <tr>
- * <td class='confluenceTd'>messageParams</td>
- * <td class='confluenceTd'>no</td>
- * <td class='confluenceTd'> </td>
- * <td class='confluenceTd'>Additional params to be used to customize message - will be evaluated against the Value Stack</td>
- * </tr>
- * <tr>
- * <td class='confluenceTd'>fieldName</td>
- * <td class='confluenceTd'>no</td>
- * <td class='confluenceTd'> </td>
- * <td class='confluenceTd'> </td>
- * </tr>
- * <tr>
- * <td class='confluenceTd'>shortCircuit</td>
- * <td class='confluenceTd'>no</td>
- * <td class='confluenceTd'>false</td>
- * <td class='confluenceTd'>If this validator should be used as shortCircuit.</td>
- * </tr>
- * <tr>
- * <td class='confluenceTd'>type</td>
- * <td class='confluenceTd'>yes</td>
- * <td class='confluenceTd'>ValidatorType.FIELD</td>
- * <td class='confluenceTd'>Enum value from ValidatorType. Either FIELD or SIMPLE can be used here.</td>
- * </tr>
- * </table>
- * <!-- END SNIPPET: parameters -->
- *
- * <p/> <u>Example code:</u>
*
* <pre>
- * <!-- START SNIPPET: example -->
* @UrlValidator(message = "Default message", key = "i18n.key", shortCircuit = true)
- * <!-- END SNIPPET: example -->
* </pre>
*
- * @author Rainer Hermanns
- * @version $Id$
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@@ -121,7 +58,6 @@ public @interface UrlValidator {
* If this is activated, the validator will be used as short-circuit.
*
* Adds the short-circuit="true" attribute value if <tt>true</tt>.
- *
*/
boolean shortCircuit() default false;
@@ -130,4 +66,14 @@ public @interface UrlValidator {
*/
ValidatorType type() default ValidatorType.FIELD;
+ /**
+ * Defines regex to use to validate url
+ */
+ String urlRegex() default "";
+
+ /**
+ * Defines regex as an expression which will be evaluated to string and used to validate url
+ */
+ String urlRegexExpression() default "";
+
}
[6/6] git commit: WW-4198 Merges changes to develop
Posted by lu...@apache.org.
WW-4198 Merges changes to develop
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/aa744b81
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/aa744b81
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/aa744b81
Branch: refs/heads/develop
Commit: aa744b811f9c41b80cc30ad6cf41ccaa75da5323
Parents: bcd61a0 e585490
Author: Lukasz Lenart <lu...@apache.org>
Authored: Thu Mar 13 18:39:15 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Thu Mar 13 18:39:15 2014 +0100
----------------------------------------------------------------------
.../template/xhtml/form-close-validate.ftl | 2 +-
.../com/opensymphony/xwork2/util/URLUtil.java | 1 +
...nnotationValidationConfigurationBuilder.java | 6 ++
.../validator/annotations/UrlValidator.java | 76 +++-----------------
.../validator/validators/URLValidator.java | 66 +++++++++++------
.../xwork2/validator/URLValidatorTest.java | 50 +++++++++++++
6 files changed, 112 insertions(+), 89 deletions(-)
----------------------------------------------------------------------
[3/6] git commit: Adds usage of new urlRegex field in client side
validation
Posted by lu...@apache.org.
Adds usage of new urlRegex field in client side validation
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/3f6ce657
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/3f6ce657
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/3f6ce657
Branch: refs/heads/develop
Commit: 3f6ce657da3ac6c133939bfcebb4e4e5f6bd2bc1
Parents: 3457a65
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sun Mar 9 21:02:27 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sun Mar 9 21:02:27 2014 +0100
----------------------------------------------------------------------
core/src/main/resources/template/xhtml/form-close-validate.ftl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/3f6ce657/core/src/main/resources/template/xhtml/form-close-validate.ftl
----------------------------------------------------------------------
diff --git a/core/src/main/resources/template/xhtml/form-close-validate.ftl b/core/src/main/resources/template/xhtml/form-close-validate.ftl
index 81a17e1..f129156 100644
--- a/core/src/main/resources/template/xhtml/form-close-validate.ftl
+++ b/core/src/main/resources/template/xhtml/form-close-validate.ftl
@@ -120,7 +120,7 @@ END SNIPPET: supported-validators
<#if validator.shortCircuit>continueValidation = false;</#if>
}
<#elseif validator.validatorType = "url">
- if (continueValidation && fieldValue != null && fieldValue.length > 0 && fieldValue.match("${validator.regex?js_string}")==null) {
+ if (continueValidation && fieldValue != null && fieldValue.length > 0 && fieldValue.match("/${validator.urlRegex?js_string}/i")==null) {
addError(field, error);
errors = true;
<#if validator.shortCircuit>continueValidation = false;</#if>
[2/6] git commit: Marks method as deprecated
Posted by lu...@apache.org.
Marks method as deprecated
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/3457a656
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/3457a656
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/3457a656
Branch: refs/heads/develop
Commit: 3457a656ba95539145ef3b19d254fe0129b4d187
Parents: 31be88a
Author: Lukasz Lenart <lu...@apache.org>
Authored: Sun Mar 9 21:01:44 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Sun Mar 9 21:01:44 2014 +0100
----------------------------------------------------------------------
xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/3457a656/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
index b9aaee7..160a5b9 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
@@ -33,6 +33,7 @@ public class URLUtil {
* @param url The url string to verify.
* @return a boolean indicating whether the URL seems to be incorrect.
*/
+ @Deprecated
public static boolean verifyUrl(String url) {
if (LOG.isDebugEnabled()) {
LOG.debug("Checking if url [#0] is valid", url);