[bv-dev] Should getters be considered methods during validation

Matt Benson mbenson at apache.org
Tue Oct 23 13:37:46 EDT 2012


On Tue, Oct 23, 2012 at 12:19 PM, Emmanuel Bernard
<emmanuel at hibernate.org> wrote:
> For method validation, we have so far managed to get away with
> requiring an annotation based metadata to direct how method validation
> behaves.
>
> One question that popped up during the recent write up is whether or not
> getters should be considered regular methods and thus be intercepted and
> validation by CDI or AspectJ interceptors.
>
> I have my own ideas, but I'd like to get your opinion on the subject.

Hi, Emmanuel!  Great/horrible question.  :)

My inclination, for the purposes of the specification, is "a method is
a method" but I'd hope to see implementation-specific mechanisms to
globally disable method validation on getters.

$0.02,
Matt

>
> Emmanuel
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev


More information about the beanvalidation-dev mailing list