[
https://issues.apache.org/struts/browse/WW-3022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Musachy Barroso resolved WW-3022.
---------------------------------
Resolution: Duplicate
Fix Version/s: (was: 2.2.x)
2.1.7
this was fixed already in xwork
> VisitorFieldValidator default message is null
> ---------------------------------------------
>
> Key: WW-3022
> URL: https://issues.apache.org/struts/browse/WW-3022
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6
> Reporter: Jaakko Saari
> Priority: Minor
> Fix For: 2.1.7
>
>
> Validation fails when empty message is defined
> @VisitorFieldValidator(message=""), stack:
> java.lang.NullPointerException
> at
> com.opensymphony.xwork2.util.TextParseUtil.translateVariables(TextParseUtil.java:155)
> at
> com.opensymphony.xwork2.util.TextParseUtil.translateVariables(TextParseUtil.java:116)
> at
> com.opensymphony.xwork2.util.TextParseUtil.translateVariables(TextParseUtil.java:38)
> at
> com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMessage(ValidatorSupport.java:99)
> at
> com.opensymphony.xwork2.validator.validators.VisitorFieldValidator.validateObject(VisitorFieldValidator.java:156)
> at
> com.opensymphony.xwork2.validator.validators.VisitorFieldValidator.validate(VisitorFieldValidator.java:130)
> ..
> Broken both on annotation and XML validators. Empty messages worked 2.0 but
> not in 2.1 (Tested up to 2.1.6).
> This is annoying on ModelDriven actions, since you can't delegate validations
> to model object. (empty message crashes validation and non-empty message will
> be appended to the actual messages of models validators).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.