<div dir="ltr">+1 for <b>1.b</b><br clear="all"><div><div dir="ltr"><br><br><br><b>Faissal </b><br>---<br><font color="#006600">Préservons l'environnement. N'imprimez ce courriel que si nécessaire.<br>Please consider the environment before printing this e-mail.</font><br>
</div></div><br>
<br><br><div class="gmail_quote">2012/12/12 <span dir="ltr"><<a href="mailto:beanvalidation-dev-request@lists.jboss.org" target="_blank">beanvalidation-dev-request@lists.jboss.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send beanvalidation-dev mailing list submissions to<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:beanvalidation-dev-request@lists.jboss.org">beanvalidation-dev-request@lists.jboss.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:beanvalidation-dev-owner@lists.jboss.org">beanvalidation-dev-owner@lists.jboss.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of beanvalidation-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Should getters be considered methods during validation<br>
(Gerhard Petracek)<br>
2. Re: Should getters be considered methods during validation<br>
(Sebastian Thomschke)<br>
3. Re: Should getters be considered methods during validation<br>
(Gerhard Petracek)<br>
4. Re: BVAL-192 'exclusive' flag for @DecimalMin/@DecimalMax<br>
(Hardy Ferentschik)<br>
5. Re: Should getters be considered methods during validation<br>
(Emmanuel Bernard)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 11 Dec 2012 19:32:40 +0100<br>
From: Gerhard Petracek <<a href="mailto:gerhard.petracek@gmail.com">gerhard.petracek@gmail.com</a>><br>
Subject: Re: [bv-dev] Should getters be considered methods during<br>
validation<br>
To: beanvalidation-dev List <<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a>><br>
Message-ID:<br>
<CAGJtJfEbm4FpFB2V7iH50dABrH=<a href="mailto:RsbAsdWHOUeXRYP_j8OzPew@mail.gmail.com">RsbAsdWHOUeXRYP_j8OzPew@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
+1 for 2.b but -1 for a package annotation and/or config.<br>
<br>
regards,<br>
gerhard<br>
<br>
<br>
<br>
2012/12/11 Emmanuel Bernard <<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>><br>
<br>
> That should hopefully be the last round. Here are the alternatives that<br>
> I think are viable <a href="http://goo.gl/ubjn3" target="_blank">http://goo.gl/ubjn3</a><br>
><br>
> Please give your feedback.<br>
><br>
> Emmanuel<br>
><br>
> On Tue 2012-10-23 18:19, Emmanuel Bernard wrote:<br>
> > For method validation, we have so far managed to get away with<br>
> > requiring an annotation based metadata to direct how method validation<br>
> > behaves.<br>
> ><br>
> > One question that popped up during the recent write up is whether or not<br>
> > getters should be considered regular methods and thus be intercepted and<br>
> > validation by CDI or AspectJ interceptors.<br>
> ><br>
> > I have my own ideas, but I'd like to get your opinion on the subject.<br>
> ><br>
> > Emmanuel<br>
> > _______________________________________________<br>
> > beanvalidation-dev mailing list<br>
> > <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> > <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
> _______________________________________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20121211/bce4236b/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20121211/bce4236b/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 11 Dec 2012 21:17:56 +0100<br>
From: Sebastian Thomschke <<a href="mailto:sebastian.thomschke@web.de">sebastian.thomschke@web.de</a>><br>
Subject: Re: [bv-dev] Should getters be considered methods during<br>
validation<br>
To: <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
Message-ID: <<a href="mailto:50C794F4.4010508@web.de">50C794F4.4010508@web.de</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Hi,<br>
<br>
I'm +1 for option 1b.<br>
<br>
A constraint annotation added to a regular non-getter method always<br>
describes a return value contract whereas a constraint annotation added<br>
to a getter method may be meant to be<br>
a) a return value contract or<br>
b) a property constraint, that only is supposed to be considered during<br>
bean validation.<br>
<br>
For getter method constraint annotation my gut feeling is, that you<br>
usually want b) - a property constraint definition.<br>
<br>
In OVal we have the annotation @IsInvariant to mark the constraints<br>
defined on a getter for being return value contracts if not present the<br>
constraints are not interpreted as return value contracts.<br>
<br>
Regards,<br>
<br>
Seb<br>
<br>
On 11.12.2012 16:50, Emmanuel Bernard wrote:<br>
> That should hopefully be the last round. Here are the alternatives that<br>
> I think are viable <a href="http://goo.gl/ubjn3" target="_blank">http://goo.gl/ubjn3</a><br>
><br>
> Please give your feedback.<br>
><br>
> Emmanuel<br>
><br>
> On Tue 2012-10-23 18:19, Emmanuel Bernard wrote:<br>
>> For method validation, we have so far managed to get away with<br>
>> requiring an annotation based metadata to direct how method validation<br>
>> behaves.<br>
>><br>
>> One question that popped up during the recent write up is whether or not<br>
>> getters should be considered regular methods and thus be intercepted and<br>
>> validation by CDI or AspectJ interceptors.<br>
>><br>
>> I have my own ideas, but I'd like to get your opinion on the subject.<br>
>><br>
>> Emmanuel<br>
>> _______________________________________________<br>
>> beanvalidation-dev mailing list<br>
>> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
> _______________________________________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 11 Dec 2012 23:12:49 +0100<br>
From: Gerhard Petracek <<a href="mailto:gerhard.petracek@gmail.com">gerhard.petracek@gmail.com</a>><br>
Subject: Re: [bv-dev] Should getters be considered methods during<br>
validation<br>
To: beanvalidation-dev List <<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAGJtJfHQBtYg-ObT1MCBF47O_RdasnCtyDYv_X-JkbJe3bt_Ug@mail.gmail.com">CAGJtJfHQBtYg-ObT1MCBF47O_RdasnCtyDYv_X-JkbJe3bt_Ug@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
hi sebastian,<br>
<br>
i was going to +1 1.b as well, but i don't agree with point #1 (if it is<br>
globally and/or users have to do it in any case) and #2.<br>
(with @ValidateOnCall i'm ok with both default behaviours, if there is a<br>
way to change it for a bv-archive.)<br>
<br>
regards,<br>
gerhard<br>
<br>
<br>
<br>
2012/12/11 Sebastian Thomschke <<a href="mailto:sebastian.thomschke@web.de">sebastian.thomschke@web.de</a>><br>
<br>
> Hi,<br>
><br>
> I'm +1 for option 1b.<br>
><br>
> A constraint annotation added to a regular non-getter method always<br>
> describes a return value contract whereas a constraint annotation added<br>
> to a getter method may be meant to be<br>
> a) a return value contract or<br>
> b) a property constraint, that only is supposed to be considered during<br>
> bean validation.<br>
><br>
> For getter method constraint annotation my gut feeling is, that you<br>
> usually want b) - a property constraint definition.<br>
><br>
> In OVal we have the annotation @IsInvariant to mark the constraints<br>
> defined on a getter for being return value contracts if not present the<br>
> constraints are not interpreted as return value contracts.<br>
><br>
> Regards,<br>
><br>
> Seb<br>
><br>
> On 11.12.2012 16:50, Emmanuel Bernard wrote:<br>
> > That should hopefully be the last round. Here are the alternatives that<br>
> > I think are viable <a href="http://goo.gl/ubjn3" target="_blank">http://goo.gl/ubjn3</a><br>
> ><br>
> > Please give your feedback.<br>
> ><br>
> > Emmanuel<br>
> ><br>
> > On Tue 2012-10-23 18:19, Emmanuel Bernard wrote:<br>
> >> For method validation, we have so far managed to get away with<br>
> >> requiring an annotation based metadata to direct how method validation<br>
> >> behaves.<br>
> >><br>
> >> One question that popped up during the recent write up is whether or not<br>
> >> getters should be considered regular methods and thus be intercepted and<br>
> >> validation by CDI or AspectJ interceptors.<br>
> >><br>
> >> I have my own ideas, but I'd like to get your opinion on the subject.<br>
> >><br>
> >> Emmanuel<br>
> >> _______________________________________________<br>
> >> beanvalidation-dev mailing list<br>
> >> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> >> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
> > _______________________________________________<br>
> > beanvalidation-dev mailing list<br>
> > <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> > <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
><br>
> _______________________________________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20121211/7b412da7/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20121211/7b412da7/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Wed, 12 Dec 2012 00:46:40 +0100<br>
From: Hardy Ferentschik <<a href="mailto:hardy@hibernate.org">hardy@hibernate.org</a>><br>
Subject: Re: [bv-dev] BVAL-192 'exclusive' flag for<br>
@DecimalMin/@DecimalMax<br>
To: beanvalidation-dev List <<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a>><br>
Message-ID: <<a href="mailto:E2199861-9455-4CFA-90F1-05C2CCCF4D92@hibernate.org">E2199861-9455-4CFA-90F1-05C2CCCF4D92@hibernate.org</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
>>> @DecimalMax(value = "0.0", exclusive = true)<br>
>><br>
>> Can we name it "inclusive" rather than "exclusive"? Personally I prefer<br>
>> positive variable/method names as I think they read better, in particular<br>
>> when it comes to negation.<br>
><br>
> I think inclusive also has a clearer meaning, it took me three reads<br>
> through to work out what the purpose was. I wondered if Hardy picked<br>
> exclusive for a sensible default value, but gave up trying to get my<br>
> head around it (newborn baby is my excuse).<br>
<br>
Well, I just used 'exclude', because it was used in the jira ticket. Now that I think about it 'inclusive' is much better.<br>
Maybe I can play the newborn card as well? Does it still count after 4 months? I definitely still feel tired.<br>
<br>
Welcome to the club.<br>
<br>
--Hardy<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Wed, 12 Dec 2012 09:26:15 +0100<br>
From: Emmanuel Bernard <<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>><br>
Subject: Re: [bv-dev] Should getters be considered methods during<br>
validation<br>
To: beanvalidation-dev List <<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a>><br>
Cc: beanvalidation-dev List <<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a>><br>
Message-ID: <<a href="mailto:A828568E-799B-4BEF-A704-01CCCCDD2E89@hibernate.org">A828568E-799B-4BEF-A704-01CCCCDD2E89@hibernate.org</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
A couple of remarks, I am not tied to @ValidateOnCall. We can find better names and/or a different split. I like @IsInvariant described by Sebastian which means @ValidateOnCall(INCLUDE_GETTERS) in my proposal. My concern is that it would not scale for bean/package level settings nor allow to disable validation on a particular method.<br>
<br>
My point being, if we finally agree on the proper default and overriding approach we can refine names.<br>
<br>
Gerhard, let me try and clarify your position. You like 1.b but you want to be able to change the default global behavior per archive (with a validation.xml setting) if needed and therefore that's why you voted for 2.b. I don't see a big problem with that. My two concerns are:<br>
<br>
- I am not sure that would be useful very often in practice but I imagine it could be useful in a pure service archive<br>
- to know the behavior, it forces people to look for a validation.xml to see what behavior is set but as long as we have the default defined in 1, that's not a huge concern to me.<br>
<br>
Emmanuel<br>
<br>
On 11 d?c. 2012, at 23:12, Gerhard Petracek <<a href="mailto:gerhard.petracek@gmail.com">gerhard.petracek@gmail.com</a>> wrote:<br>
<br>
> hi sebastian,<br>
><br>
> i was going to +1 1.b as well, but i don't agree with point #1 (if it is globally and/or users have to do it in any case) and #2.<br>
> (with @ValidateOnCall i'm ok with both default behaviours, if there is a way to change it for a bv-archive.)<br>
><br>
> regards,<br>
> gerhard<br>
><br>
><br>
><br>
> 2012/12/11 Sebastian Thomschke <<a href="mailto:sebastian.thomschke@web.de">sebastian.thomschke@web.de</a>><br>
>> Hi,<br>
>><br>
>> I'm +1 for option 1b.<br>
>><br>
>> A constraint annotation added to a regular non-getter method always<br>
>> describes a return value contract whereas a constraint annotation added<br>
>> to a getter method may be meant to be<br>
>> a) a return value contract or<br>
>> b) a property constraint, that only is supposed to be considered during<br>
>> bean validation.<br>
>><br>
>> For getter method constraint annotation my gut feeling is, that you<br>
>> usually want b) - a property constraint definition.<br>
>><br>
>> In OVal we have the annotation @IsInvariant to mark the constraints<br>
>> defined on a getter for being return value contracts if not present the<br>
>> constraints are not interpreted as return value contracts.<br>
>><br>
>> Regards,<br>
>><br>
>> Seb<br>
>><br>
>> On 11.12.2012 16:50, Emmanuel Bernard wrote:<br>
>> > That should hopefully be the last round. Here are the alternatives that<br>
>> > I think are viable <a href="http://goo.gl/ubjn3" target="_blank">http://goo.gl/ubjn3</a><br>
>> ><br>
>> > Please give your feedback.<br>
>> ><br>
>> > Emmanuel<br>
>> ><br>
>> > On Tue 2012-10-23 18:19, Emmanuel Bernard wrote:<br>
>> >> For method validation, we have so far managed to get away with<br>
>> >> requiring an annotation based metadata to direct how method validation<br>
>> >> behaves.<br>
>> >><br>
>> >> One question that popped up during the recent write up is whether or not<br>
>> >> getters should be considered regular methods and thus be intercepted and<br>
>> >> validation by CDI or AspectJ interceptors.<br>
>> >><br>
>> >> I have my own ideas, but I'd like to get your opinion on the subject.<br>
>> >><br>
>> >> Emmanuel<br>
>> >> _______________________________________________<br>
>> >> beanvalidation-dev mailing list<br>
>> >> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
>> >> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
>> > _______________________________________________<br>
>> > beanvalidation-dev mailing list<br>
>> > <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
>> > <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
>><br>
>> _______________________________________________<br>
>> beanvalidation-dev mailing list<br>
>> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
><br>
> _______________________________________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20121212/f3554c91/attachment.html" target="_blank">http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20121212/f3554c91/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
<br>
<br>
End of beanvalidation-dev Digest, Vol 17, Issue 11<br>
**************************************************<br>
</blockquote></div><br></div>