Hey Guillaume,
this looks VERY good! I like like the idea of using "orPresent" instead of
"
nowIsValid".
Great work!
Christian
2016-11-10 0:29 GMT+01:00 Guillaume Smet <guillaume.smet(a)gmail.com>:
Hi,
So I started to work on a first implementation in the API, the TCK and in
HV.
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:
https://github.com/beanvalidation/beanvalidation-
api/pull/70
* Bean Validation TCK:
https://github.com/beanvalidation/beanvalidation-
tck/pull/77
* 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.
Comments welcome!
--
Guillaume
On Wed, Oct 19, 2016 at 11:24 AM, Gunnar Morling <gunnar(a)hibernate.org>
wrote:
> 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?
>
> Thanks,
>
> --Gunnar
>
_______________________________________________
beanvalidation-dev mailing list
beanvalidation-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/beanvalidation-dev