[bv-dev] Container element validation for arrays
misterm at gmail.com
Wed Apr 19 16:07:49 EDT 2017
On Wed, Apr 19, 2017 at 4:27 PM, Emmanuel Bernard <emmanuel at hibernate.org>
> @Target(FIELD, TYPE_USE)
> @interface Size
> @Size(2) String arrayOfTwoStrings;
> is ambiguous in Java 8
> So the JLS is “backward compatible” in the language designer’s view I
When you don't change, it's backward compatible indeed. When you do, the
language design is flawed. So there is a hole in one combination that needs
to be addressed. Joshua Bloch would write about that all the time, of how
new features interact in unexpected ways and that's why you have to resist
changes in the language.
> They did not anticipate people wanting to add TYPE_USE to an existing
> annotation and have a side effect on its usage on arrays.
Exactly, so this is effectively broken and needs to be fixed in the
language, not in BV. But I'm still afraid we might have got something wrong
here, so I would rather ask them.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the beanvalidation-dev