[bv-dev] @Past(orPresent=true) -> @PastOrPresent?

Matt Benson mbenson at apache.org
Wed Jun 21 08:36:30 EDT 2017

I can see the advantage of consistency (though this is establishing a
pattern to which we'd be expected to stick going forward). Also, removing
the additional annotation element does mean no #init() method for the
implementation, for whatever that's worth. I don't feel strongly about it,
but I don't really have any negative arguments.


On Jun 21, 2017 5:00 AM, "Gunnar Morling" <gunnar at hibernate.org> wrote:

> Hi all,
> A colleague of mine reviewing the BV 2.0 changes pointed out an
> inconsistency in the added/modified constraints.
> As per the community poll we have now @NegativeOrZero and
> @PositiveOrZero, whereas we still have the orPresent() option on @Past
> and @Future. Should it be @PastOrPresent and @FutureOrPresent instead
> for the sake of consistency?
> Now one could argue that having only attributes (orPresent(),
> orZero()) is most consistent with other constraints such as
> @DigitalMin. But indeed the explicit annotations grew on me over time
> as they are a bit shorter to use and, more importantly, better to
> read.
> It's late in the game, but I feel inclined to extract @PastOrPresent
> and @FutureOrPresent. What do you think?
> Thanks,
> --Gunnar
> _______________________________________________
> 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/20170621/50c84eaa/attachment.html 

More information about the beanvalidation-dev mailing list