[bv-dev] Support for OptionalInt, OptionalLong and OptionalDouble

Marco Molteni moltenma at gmail.com
Wed May 10 02:24:51 EDT 2017

+1 for the support



> On 9 May 2017, at 18:57, Michael Nascimento <misterm at gmail.com> wrote:
> They are Java SE 8 APIs, so they must be supported. From the point of the view of the user, nothing will change, so let's support them now.
> Regards,
> Michael
> On Tue, May 9, 2017 at 10:36 AM, Gunnar Morling <gunnar at hibernate.org <mailto:gunnar at hibernate.org>> wrote:
> Hi,
> I'm curious about your take on supporting the types in ${subject}
> (BVAL-579 [1]).
> They are non-generic wrappers for int, long and double. Should we
> support them with the numeric constraints such as @Min et al.? The
> easiest way to do so would be to just mandate support in the JavaDoc
> of the numeric constraint types.
> The only thing I can see speaking against this is that we may migrate
> to an extractor-based approach in a future revision. Currently
> extractors cannot be used, as those types don't have any type
> parameter which could be extracted. But assuming we extend the
> extractor API in a future revision to deal with non-generic types,
> too, we could then rather mandate built-in extractors for those types.
> Which will allow to put *any* constraint applying to int also to
> OptionalInt.
> Should we do such change in a future revision, I don't think anything
> would change for users. Only providers would have to implement support
> for these types via extractors instead of dedicated constraint
> validators. I think such change is acceptable.
> What do others think?
> Thanks,
> --Gunnar
> [1] https://hibernate.atlassian.net/browse/BVAL-579 <https://hibernate.atlassian.net/browse/BVAL-579>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org <mailto:beanvalidation-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev <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/20170510/b5e99f55/attachment.html 

More information about the beanvalidation-dev mailing list