[
http://opensource.atlassian.com/projects/hibernate/browse/HV-184?page=com...
]
Hardy Ferentschik commented on HV-184:
--------------------------------------
I guess the message value in Foo for getBar() is intended to be "@NotNull(message =
"{bar}", groups = { Bar.class })" and not @NotNull(message = "Message
is {bar}", groups = { Bar.class })
ResourceBundlerMessageInterpolator fails to meet the spec in some
issues
------------------------------------------------------------------------
Key: HV-184
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-184
Project: Hibernate Validator
Issue Type: Bug
Components: engine, validators
Affects Versions: 4.0.0.Beta1
Environment: N/A
Reporter: Daniel Yokomizo
Assignee: Hardy Ferentschik
Priority: Blocker
Attachments: JavaxValidationBugsTest.java
As I was developing a MessageInterpolator to provide additional interpolation
capabilities I discovered that ResourceBundlerMessageInterpolator fails to preserve
unknown message parameters (i.e. if the message parameter is not a key in any of the
resource bundles and isn't an annotation attribute). Actually the spec is silent about
this situation but I don't think the current behavior is intended.
Additionally I discovered that ResourceBundlerMessageInterpolator also doesn't treat
escaped curly braces as literals and it doesn't properly escape before calling
java.util.regex.Matcher.appendReplacement(StringBuffer,String) and fails if the dollar
sign (i.e. $) appears in certain places of the message.
There's a JUnit 4 test case attached that shows the three symptoms and fails all
tests (but it should pass for a correct implementation).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira