Hi there,
I've noticed a strage behaviour of Message Interpolation in Hibernate Validator 4.0.2.GA.
I Have a bean mapping
Code:
<bean class="testBean" ignore-annotations="true">
<field name="testField">
<constraint annotation="javax.validation.constraints.NotNull">
<message>javax.validation.constraints.NotNull.message</message>
</constraint>
</field>
</bean>
and a ValidationMessages.properties
Code:
javax.validation.constraints.NotNull.message=testMessage
when I start the test the message is not interpolated and I receive javax.validation.constraints.NotNull.message as I call
violationSet.iterator().next().getMessage()
If I delete the <message> definition from the bean mapping, I receive the message I expect(testMessage). So the Message bundle is found. It seems that if the <message> attribute is defined then no message interpolation is started.
Can anybody confirm this?
Many thanks