[bv-dev] On the support for Optional

Hardy Ferentschik hardy at hibernate.org
Wed Nov 23 06:19:26 EST 2016


On Mon, 21-Nov-2016 17:40, Gunnar Morling wrote:
> Agreed that it can be made work for all cases (the RI does it already more
> or less). Question is whether by supporting e.g. Optional fields we
> encourage modelling styles that are discouraged by the JDK team. But maybe
> that's just a question of documentation/wording, i.e. we could support it
> everywhere but only show usage on return values / getter props in the spec.

I think I would also vote for making it possible for the sake of consistency.
If your argument about minimising/preventing "misuse" would hold, one would 
need to look at supporting date types without timezone information again.
There the argument was also that a user should not be prevented to use Bean
Validation constraints and documentation is enough to make the user aware of
potential dangers.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 496 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20161123/b8a3f80e/attachment.bin 

More information about the beanvalidation-dev mailing list