mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
Moves parse(String, Class) to parent class to allow use it in all subclasess
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1428281 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
-8
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.opensymphony.xwork2.validator.validators;
|
||||
|
||||
import com.opensymphony.xwork2.util.TextParseUtil;
|
||||
import com.opensymphony.xwork2.validator.ValidationException;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
@@ -124,13 +123,6 @@ public class RegexFieldValidator extends FieldValidatorSupport {
|
||||
}
|
||||
}
|
||||
|
||||
protected Object parse(String expression, Class type) {
|
||||
if (expression == null) {
|
||||
return null;
|
||||
}
|
||||
return TextParseUtil.translateVariables('$', expression, stack, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns whether the expression should be matched against in
|
||||
* a case-sensitive way. Default is <code>true</code>.
|
||||
|
||||
+7
@@ -180,6 +180,13 @@ public abstract class ValidatorSupport implements Validator, ShortCircuitableVal
|
||||
return expression;
|
||||
}
|
||||
|
||||
protected Object parse(String expression, Class type) {
|
||||
if (expression == null) {
|
||||
return null;
|
||||
}
|
||||
return TextParseUtil.translateVariables('$', expression, stack, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the field value named <code>name</code> from <code>object</code>,
|
||||
* <code>object</code> should have the appropriate getter/setter.
|
||||
|
||||
Reference in New Issue
Block a user