commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18689] - [PATCH] Tests for dependent validators + Refactoring
Date Fri, 04 Apr 2003 16:11:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18689>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18689

[PATCH] Tests for dependent validators + Refactoring





------- Additional Comments From apacheBugzilla@AMammenT.cotse.net  2003-04-04 16:11 -------
1) Made some more refactoring modifications:
   a) As many fields as possible were made final
   b) Used get/setResource whereever possible rather than hResources.get/put
   c) Modified clear to empty hResources, rather than reinstantiate the map

2) Added a new key RESULTS_KEY with the intention that callers 
   of validate can add a custom implementation of ValidatorResults as a 
   resource prior to calling validate.  If this is done, the caller is 
   also responsible for handling the state of the results between
   consecutive calls (e.g. in normal operation, the results must be cleared).  

   Why?  This change is actually motivated by the use of the Validator 
   within struts.  In fact, all the FieldChecks validation methods are 
   implemented to generate a validation result, and then handle errors
   outside the validation framework simply because there is currently no 
   mechanism for handing the full error condition to the calling context.
   With this change, a caller can continue to do this, but, better yet, 
   can implement a custom ValidatorResults which handles errors properly when 
   added to the results, and then delegates remaining responsibility to the 
   base ValidatorResults class.

Note that the patch attached next includes changes from the previous patch.  
If the previous patch is applied, then this one will need to be modified.

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


Mime
View raw message