[bv-dev] Bean Validation 1.1 -> 2.0 review

Gunnar Morling gunnar at hibernate.org
Thu Jun 8 04:37:24 EDT 2017


2017-06-02 11:25 GMT+02:00 Emmanuel Bernard <emmanuel at hibernate.org>:
> 5.7.4.
>
> If the constraint is a generic constraint, the following rules apply. If the
> constraint declaration is hosted on a class or an interface, the targeted
> type is the class or the interface. If the constraint is hosted on a class
> attribute, the type of the attribute is the targeted type. If the constraint
> is hosted on a method (getter or non-getter) or constructor, the return type
> is the targeted type. If the constraint is hosted on a method or constructor
> parameter, the parameter type is the targetedtype. If the constraint is
> hosted o…
>
>
> This paragraph is massive. Any chance to convert it to bullet points to make
> the alternatives more visual?

Good idea.

>
> 5.7.5
>
> When detecting a container element constraint or a container element marked
> with @Valid, the value extractor forobtaining the container’s elements must
> be determined.
>
>
> […] is determined (instead of must be

Changing it into

"When detecting a container element constraint or a container element
marked with `@Valid`, a value extractor must be determined so that the
elements can be obtained from that container."

I've prepared PR
https://github.com/beanvalidation/beanvalidation-spec/pull/186 to
address your remarks.

>
>
> On 2 Jun 2017, at 15:35, Emmanuel Bernard <emmanuel at hibernate.org> wrote:
>
> Hey all
>
> I could not do much but I promised Gunnar to review one last time the 1.1 ->
> 2.0 diff
> http://beanvalidation.org/2.0/spec/2.0.0.beta2/diff/diff-to-1.1/
>
> I did not find much and dod not checked it all but here is at least a few
> things
>
> Example 3.10: Multi-valued constraint declaration using explicit @List
> annotation
> I’d put in the example title that it is a discouraged pattern
>
> 3.3
> "composing constraints are directly given on the composed constraint” ->
> "composing constraints are directly given on the composed constraint (i.e.
> via the repeatable annotation feature)"
>
> "refers to the left-to-right order” -> I got puzzled by that one especially
> as we can put them on new lines. I would say “refers to the order in which
> they are declared”
>
> Example 3.21 / 3.24
> I find it odd to ahve the private method return null
> Can we make it a full example?
>
> 4.1 add an exemple of non generic container usage maybe
>
> 4.4
> A value extractor for java.util.Optional:
> Maybe a comment reminding that the null is passed to have no path node entry
>
> Maybe more to come later
>
> Emmanuel
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
>
>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev



More information about the beanvalidation-dev mailing list