[
https://issues.apache.org/struts/browse/WW-3022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wes Wannemacher updated WW-3022:
--------------------------------
Fix Version/s: 2.2.x
Issue Type: Improvement (was: Bug)
This seems a bit of a fringe case... I mean, why wouldn't you have a message?
I'm marking for version 2.2.x and as an improvement as I am not following the
use-case.
> 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.2.x
>
>
> 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.