[hibernate-issues] [Hibernate-JIRA] Resolved: (HV-184) ResourceBundlerMessageInterpolator fails to meet the spec in some issues

Hardy Ferentschik (JIRA) noreply at atlassian.com
Fri Jul 17 07:15:12 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HV-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik resolved HV-184.
----------------------------------

    Resolution: Fixed

Added the tests to the test harness.

> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list