[bv-dev] Node#isInIterable() for arrays

Michael Nascimento misterm at gmail.com
Thu Jun 15 14:21:42 EDT 2017


Should we include Stream as well?

Regards,
Michael

On 15 Jun 2017 14:55, "Matt Benson" <mbenson at apache.org> wrote:

> +1
>
> Matt
>
> On Thu, Jun 15, 2017 at 11:20 AM, Christian Kaltepoth
> <christian at kaltepoth.de> wrote:
> > Supporting arrays as well sounds reasonable to me. Unless there is any
> good
> > argument against it.
> >
> > 2017-06-15 13:16 GMT+02:00 Gunnar Morling <gunnar at hibernate.org>:
> >>
> >> Hi all,
> >>
> >> On our road to the Proposed Final Draft (more on that in a separate
> >> mail a bit), we've almost closed out all the relevant issues.
> >>
> >> One remaining issue is https://hibernate.atlassian.net/browse/BVAL-552
> >> which is about inconsistent behaviour of Node#isInIterable() when it
> >> comes to arrays. The spec says this:
> >>
> >>     "isInIterable() returns true if the node represents an object
> >> contained in an Iterable or in a Map, false otherwise."
> >>
> >> Whereas the TCK has a test case which expects true to be returned for
> >> arrays, too [1]. Naturally, that's how the RI (and any other
> >> TCK-compliant implementation) implements this.
> >>
> >> Now my question is, should we simply change the spec and say
> >>
> >>         "isInIterable() returns true if the node represents an object
> >> contained in an Iterable, Map or an array, false otherwise."
> >>
> >> Given that maps are considered already, the method has to be about
> >> "things that are iterable" and not java.lang.Iterable (which j.u.Map
> >> doesn't extend). So considering arrays there seems consistent.
> >>
> >> Or do you, Emmanuel, remember a reason for the current specification
> >> and it's actually a bug in the TCK?
> >>
> >> Thanks,
> >>
> >> --Gunnar
> >>
> >> [1]
> >> https://github.com/beanvalidation/beanvalidation-
> tck/blob/master/tests/src/main/java/org/hibernate/
> beanvalidation/tck/tests/validation/PropertyPathTest.java#L196
> >> _______________________________________________
> >> beanvalidation-dev mailing list
> >> beanvalidation-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
> >
> >
> >
> >
> > --
> > Christian Kaltepoth
> > Blog: http://blog.kaltepoth.de/
> > Twitter: http://twitter.com/chkal
> > GitHub: https://github.com/chkal
> >
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20170615/f02ca76d/attachment-0001.html 


More information about the beanvalidation-dev mailing list