mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
WW-4012 Changes order of params evaluation that the expression takes precedence
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1457969 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+4
-8
@@ -104,12 +104,10 @@ public class StringLengthFieldValidator extends FieldValidatorSupport {
|
||||
}
|
||||
|
||||
public int getMaxLength() {
|
||||
if (maxLength > -1) {
|
||||
return maxLength;
|
||||
} else if (StringUtils.isNotEmpty(maxLengthExpression)) {
|
||||
if (StringUtils.isNotEmpty(maxLengthExpression)) {
|
||||
return (Integer) parse(maxLengthExpression, Integer.class);
|
||||
}
|
||||
return -1;
|
||||
return maxLength;
|
||||
}
|
||||
|
||||
public void setMinLength(int minLength) {
|
||||
@@ -121,12 +119,10 @@ public class StringLengthFieldValidator extends FieldValidatorSupport {
|
||||
}
|
||||
|
||||
public int getMinLength() {
|
||||
if (minLength > -1) {
|
||||
return minLength;
|
||||
} else if (StringUtils.isNotEmpty(minLengthExpression)) {
|
||||
if (StringUtils.isNotEmpty(minLengthExpression)) {
|
||||
return (Integer) parse(minLengthExpression, Integer.class);
|
||||
}
|
||||
return -1;
|
||||
return minLength;
|
||||
}
|
||||
|
||||
public void setTrim(boolean trim) {
|
||||
|
||||
Reference in New Issue
Block a user