[bv-dev] support for non-standard Java beans

Andrei Sereda andrei at sereda.cc
Wed Jun 14 00:12:37 EDT 2017


Apologies  if I hijack this mailing list. Please redirect me to right DL /
forum, if it is the case.

I would like to inquire if custom method resolution is within the scope of
the spec (or exists already) for beans which don't exactly follow JavaBean
convention. By custom, I mean name() vs getName().

I've noticed, lately, the trend to use code generators (Immutables
<https://immutables.github.io/>, FreeBuilder
<http://freebuilder.inferred.org/>, AutoValue
<https://github.com/google/auto/blob/master/value/userguide/index.md> etc.)
for domain entities. By default they all use name() for getters (instead of
getName()) :

@FreeBuilder public interface Person {
@NotBlank String name();
@Min(16) int age(); .... }

It would be nice if BeanValidation could support such use-case via
pluggable (getter / setter) method resolver (for example).

Associated JIRA  ticket HV-1363

Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20170614/24966057/attachment.html 

More information about the beanvalidation-dev mailing list