bval-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (BVAL-95) Beanvalidation with Generic-DataTypes
Date Fri, 13 Apr 2012 17:44:19 GMT

     [ https://issues.apache.org/jira/browse/BVAL-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matt Benson closed BVAL-95.
---------------------------

    
> Beanvalidation with Generic-DataTypes
> -------------------------------------
>
>                 Key: BVAL-95
>                 URL: https://issues.apache.org/jira/browse/BVAL-95
>             Project: BVal
>          Issue Type: Bug
>          Components: method validation
>    Affects Versions: 0.2-incubating, 0.3-incubating
>         Environment: Windows XP, Java 1.6, Eclipse 1.6, Maven 3.0.3
>            Reporter: Sascha Vujevic
>            Assignee: Matt Benson
>              Labels: patch
>             Fix For: 0.4
>
>         Attachments: Generic-Parameter-Patch.txt, Generic-Paramter-Patch_Update.txt,
emptyMap.jar
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> MethodValidatorMetaBeanFactory.buildMethodConstraints() fill the ParameterAccess access
with ParameterTypes. I think it must be method.getGenericParameterTypes().
> MethodValidatorMetaBeanFactory.processAnnotation() fills in the methode applyConstraint()
the AccessStrategy with Class<?> therefore Parameters of methodes with Generics won't
find a Validator to validate them.
> You will get an exception:
> Caused by: javax.validation.UnexpectedTypeException: No validator could be found for
type java.util.Map. See: @NotEmpty at org.apache.bval.jsr303.extensions.ParameterAccess@1d2f117
> The parameter of the my method is Map<Object, Object>.
> I have attached a patch-file.
> I don't know i this is the best way to solve the problem or if there is allready a patch
or i use the validation in a wrong way.
> Thank you.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message