]
Samppa Saarela commented on HV-75:
----------------------------------
This bug may be a dublicate of HV-61.
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: engine
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: