[hibernate-issues] [Hibernate-JIRA] Updated: (HV-551) @Size doesn't work on List with bounded wildcard

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Feb 29 15:50:48 EST 2012


     [ https://hibernate.onjira.com/browse/HV-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik updated HV-551:
---------------------------------

    Component/s: validators

> @Size doesn't work on List with bounded wildcard
> ------------------------------------------------
>
>                 Key: HV-551
>                 URL: https://hibernate.onjira.com/browse/HV-551
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: validators
>    Affects Versions: 4.2.0.Final
>            Reporter: Emerson Farrugia
>            Assignee: Hardy Ferentschik
>             Fix For: 4.3.0.Alpha1
>
>
> When I put @Size on a List<? extends Foo>, I get a 'javax.validation.UnexpectedTypeException: No validator could be found for type: java.util.List<? extends Foo>' exception.
> It looks like ConstraintTree.findSuitableValidatorTypes() doesn't consider org.hibernate.validator.constraints.impl.SizeValidatorForCollection to be a suitable type. 
> I can't really debug further because the TypeUtils import is wrong in the Maven -sources artifact. The source code says 'import com.googlecode.jtype.TypeUtils;' but that class isn't on the classpath. It's probably been changed to org.hibernate.validator.jtype.TypeUtils, but the code for that class isn't packaged.

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