Commits

tm_jee  committed 7977f6f

XW-571
- fix a bug that arises when fixing XW-571 which causes some tests to fails
- XW-571 is about "nested visitor validators break short-circuit functionality"

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/xwork_1-2/src@1677e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 8725133

Comments (0)

Files changed (2)

File java/com/opensymphony/xwork/validator/validators/VisitorFieldValidator.java

 
         if (appendPrefix) {
             validatorContext = new AppendingValidatorContext(getValidatorContext(), o, fieldName, getMessage(o));
-            setValidatorContext(validatorContext);
         } else {
             ValidatorContext parent = getValidatorContext();
             validatorContext = new DelegatingValidatorContext(parent, DelegatingValidatorContext.makeTextProvider(o, parent), parent);
-            setValidatorContext(validatorContext);
         }
 
         ActionValidatorManagerFactory.getInstance().validate(o, visitorContext, validatorContext);

File test/com/opensymphony/xwork/validator/VisitorValidatorTestAction-validateList-validation.xml

-<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
+<!DOCTYPE validators PUBLIC
+        "-//OpenSymphony Group//XWork Validator 1.0//EN"
+        "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
 <validators>
     <field name="testBeanList">
         <field-validator type="visitor">