Error message localization fails with polymorphism

Description

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

Environment

None

Activity

Show:
SamppaS
December 2, 2008, 6:31 PM

This bug may be a dublicate of HV-61.

Hardy Ferentschik
February 12, 2009, 3:15 PM

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

Assignee

Unassigned

Reporter

SamppaS

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Time tracking

30m

Priority

Major
Configure