bval-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Vara (JIRA)" <j...@apache.org>
Subject [jira] Updated: (BVAL-66) Method validation parameter processing problems
Date Sun, 30 May 2010 18:31:37 GMT

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

Carlos Vara updated BVAL-66:
----------------------------

    Attachment: bval-jsr303-66-extra-tests.patch

Added tests for points 2 and 3. Point 1 was already fixed in apache-bval and is working fine
after the merge.

Nice to see our method validator impl getting better :-)

> Method validation parameter processing problems
> -----------------------------------------------
>
>                 Key: BVAL-66
>                 URL: https://issues.apache.org/jira/browse/BVAL-66
>             Project: BeanValidation
>          Issue Type: Improvement
>    Affects Versions: 0.1-incubating, 0.2-incubating
>            Reporter: Roman Stumm
>            Assignee: Roman Stumm
>             Fix For: 0.2-incubating
>
>         Attachments: bval-jsr303-66-extra-tests.patch
>
>
> Although still experimental and although only a few tests exist for Method-level-validation,
some people are already using it and are reporting problems or providing patches.
> For the old code-base (agimatec-validation, no further development going on) I got a
patch that fixes some misbehavior in the MethodValidatorMetaBeanFactory.
> To provide a better way for the agimatec-validation users to migrate to apache-bval,
I suggest to merge the changes into the current code base.
> see original post at: http://code.google.com/p/agimatec-validation/issues/detail?id=26
> 1. 
> when processAnnotation is called in MethodValidatorMetaBeanFactory
> is called the type of the class owning the method is used to process
> parameter constraints rather than the type of the parameter.  This causes
> something like a @Min annotation on a parameter to generate an exception
> because no appriopriate validator class can be found for the class
> declaring the method.
> 2.
> the @Valid annotation causes 'setCascaded' to be called on the
> MethodDescriptor but not on the ParameterDescriptor where it needs to be
> set.  Because of this validation doesn't cascade to the parameter object.
> 3.
> the @Valid is treated as being mutually exclusive from other
> constraint annotations on a parameter.  It is common to use @Valid with
> @NotNull since @Valid doesn't make assumptions about the nullability of a
> value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message