commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tur...@apache.org
Subject cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator Validator.java
Date Fri, 25 Oct 2002 03:22:55 GMT
turner      2002/10/24 20:22:55

  Modified:    validator/src/share/org/apache/commons/validator
                        Validator.java
  Log:
  Fixed bug 13932, Cannot use same name for field and validator, validator is never invoked.
 Thanks to Padma Ginnaram for the catch.
  
  Revision  Changes    Path
  1.10      +9 -7      jakarta-commons/validator/src/share/org/apache/commons/validator/Validator.java
  
  Index: Validator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Validator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Validator.java	24 Sep 2002 20:23:35 -0000	1.9
  +++ Validator.java	25 Oct 2002 03:22:55 -0000	1.10
  @@ -334,9 +334,11 @@
   					ValidatorResults results,
   					Map hActions,
   					int pos) throws ValidatorException {
  -	if (results.getValidatorResult(va.getName()) != null) {
  -	    return isValid(results.getValidatorResult(va.getName()));
  -	}
  +	if (results.getValidatorResult(field.getKey()) != null) {
  +            ValidatorResult result = results.getValidatorResult(field.getKey());
  +            if (result.containsAction(va.getName()))
  +		return result.isValid(va.getName());
  +        }
   
   	if (va.getDepends() != null) {
   	    StringTokenizer st = new StringTokenizer(va.getDepends(), ",");
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message