[hibernate-issues] [Hibernate-JIRA] Updated: (HV-75) Error message localization fails with polymorphism

Hardy Ferentschik (JIRA) noreply at atlassian.com
Thu Feb 12 08:16:43 EST 2009


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

Hardy Ferentschik updated HV-75:
--------------------------------

    Component/s:     (was: engine)
                 legacy

Moved issue into legacy component. This issue applies to codebase prior 4.x

> Error message localization fails with polymorphism
> --------------------------------------------------
>
>                 Key: HV-75
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-75
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: legacy
>    Affects Versions: 3.0.0.ga, 3.1.0.CR1, 3.1.0.CR2, 3.1.0.GA
>            Reporter: Samppa Saarela
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> Error message localization fails with polymorphism. ClassValidator doesn't pass messageBundle to the nested validator:
> 1  private ClassValidator getClassValidator(Object value) {
> 2  	Class clazz = value.getClass();
> 3  	ClassValidator validator = childClassValidators.get( reflectionManager.toXClass( clazz ) );
> 4  	if ( validator == null ) { //handles polymorphism
> 5  		validator = new ClassValidator( clazz );
> 6  	}
> 7  	return validator;
> 8  }
> This can be solved easily(?) by passing on the messageBundle on line 5:
> validator = new ClassValidator( clazz, messageBundle );

-- 
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