Commits

Anonymous committed fc2b3e2

Annotated per-method validation does work single time only

Issue Number: XW-517

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/2.0@1506e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java

         ArrayList<Validator> validators = new ArrayList<Validator>(cfgs.size());
         for (ValidatorConfig cfg : cfgs) {
             if (method == null || method.equals(cfg.getParams().get("methodName"))) {
-                cfg.getParams().remove("methodName");
+                // Remove methodName temporary
+                Object methodName = cfg.getParams().remove("methodName");
                 Validator validator = ValidatorFactory.getValidator(cfg, ObjectFactory.getObjectFactory());
+                // Readd methodName temporary
+                cfg.getParams().put("methodName", methodName);
                 validator.setValidatorType(cfg.getType());
                 validators.add(validator);
             }