I have a generated JAXB class containing the following:
@Pattern(regexp = "[0-9]", message = "Message details here") protected Short msgVal;
When I run a JUnit test to test an instance of this class through Hibernate, I get:
javax.validation.UnexpectedTypeException: No validator could be found for type: java.lang.Short .
If I comment on the @Pattern constraint, JUnitTest is working fine.
Is it possible to have @Pattern restrictions on short values? If so, what am I missing?
Regards, PM.
source share