[bv-dev] Proposal for supporting new Java 8 date/time types
guillaume.smet at gmail.com
Wed Nov 9 18:29:59 EST 2016
So I started to work on a first implementation in the API, the TCK and in
It's a bit different from the latest draft of Michael but I think it should
be a good base for our discussions.
* Bean Validation API:
* Bean Validation TCK:
* HV: https://github.com/hibernate/hibernate-validator/pull/576
Main differences are:
* I didn't use introspection to build the now object from the Clock and get
the compareTo method. It would save some code but I don't think it's a good
idea. I agree that it limits the support to officially supported types but
I like it better this way. AbstractJavaTimeValidator makes it easy to add
support for other types if required;
* I implemented all the default java.time types in this first round but
I'll add optional support for threeten-extras as a proprietary extension in
a followup-up patch if we decide to keep this approach;
* I named the nowIsValid option orPresent leading to having something like
@Past(orPresent = true) which does not look too bad.
On Wed, Oct 19, 2016 at 11:24 AM, Gunnar Morling <gunnar at hibernate.org>
> Hi Michael,
> +1 for splitting it up into two parts and have the discussion around
> Duration et al. separately. Based on that, do you think you could send a PR
> with the first pieces some time soon?
> I think it'd be great to put out an Alpha1 of the spec and the RI
> containing this change and the other things we have so far. It's just the
> first steps, but pushing it out demonstrates progress and allows to get
> feedback early on.
> My idea would be to do an Alpha1 with these changes around the end of this
> month. WDYT?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the beanvalidation-dev