> 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@hibernate.org>




On 26 Oct 2012, at 19:31, Gunnar Morling <gunnar@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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/beanvalidation-dev