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

Gunnar Morling gunnar at hibernate.org
Sat Nov 3 11:36:45 EDT 2012


> I have my own ideas, but I'd like to get your opinion on the subject.

So what's your take on this, Emmanuel?

Handling getters as normal methods in the spec and leaving it to providers
to make other behavior configurable seems reasonable to me.

--Gunnar



2012/10/27 Hardy Ferentschik <hardy at hibernate.org>

>
>
>
>
> On 26 Oct 2012, at 19:31, Gunnar Morling <gunnar at hibernate.org> wrote:
>
> > I think getters should be handled as any other methods during method
> validation.
>
> +1
>
> > Not considering them during method validation would IMO be some form
> > irregularity, causing getter-named methods not to be validated
> > although a user might expect it:
>
> +1
> >From the method validation point of view there is just no reason to treat
> getXYZ() differently.
> I rather have two validations of the same constraints happening, but I
> don't think it will be a big problem in most cases.
>
> A provider could always choose to make it configurable.
>
> --hardy
>
>
>
> _______________________________________________
> 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/20121103/b07688b3/attachment.html 


More information about the beanvalidation-dev mailing list