[hibernate-issues] [Hibernate-JIRA] Created: (HV-573) Need graceful handling of return value constraint applied to method with void return type
Ron Sigal (JIRA)
noreply at atlassian.com
Wed Apr 4 23:06:50 EDT 2012
Need graceful handling of return value constraint applied to method with void return type
-----------------------------------------------------------------------------------------
Key: HV-573
URL: https://hibernate.onjira.com/browse/HV-573
Project: Hibernate Validator
Issue Type: Bug
Reporter: Ron Sigal
Priority: Minor
In Resteasy, I inadvertently created a method
{code}
@FooConstraint(min=3,max=5)
public void postImposed(Foo foo)
{
}
{code}
and got
java.lang.RuntimeException: Unhandled primitive type.
at org.hibernate.validator.util.ReflectionHelper.boxedType(ReflectionHelper.java:722)
at org.hibernate.validator.metadata.location.MethodConstraintLocation.typeOfAnnotatedElement(MethodConstraintLocation.java:74)
at org.hibernate.validator.metadata.MetaConstraint.typeOfAnnotatedElement(MetaConstraint.java:92)
at org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:82)
at org.hibernate.validator.engine.ValidatorImpl.validateReturnValueForGroup(ValidatorImpl.java:1120)
at org.hibernate.validator.engine.ValidatorImpl.validateReturnValueForGroup(ValidatorImpl.java:1082)
at org.hibernate.validator.engine.ValidatorImpl.validateReturnValueInContext(ValidatorImpl.java:1022)
at org.hibernate.validator.engine.ValidatorImpl.validateReturnValue(ValidatorImpl.java:245)
at org.jboss.resteasy.plugins.providers.validation.GeneralValidatorImpl.validateReturnValue(GeneralValidatorImpl.java:71)
...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list