[bv-dev] ValueExtractionUnwrappingTest: quibble between spec and TCK

Guillaume Smet guillaume.smet at gmail.com
Sun Apr 1 06:56:49 EDT 2018


On Sat, Mar 31, 2018 at 2:19 PM, Gunnar Morling <gunnar at hibernate.org>
wrote:

>
>>    - If more than one are marked with @UnwrapByDefault, a
>>       ConstraintDeclarationException is raised.
>>
>> I don't think we can or should do this, instead no extractor should be
> applied in this case. It'd contradict quite clearly the spec's wording
> "Otherwise, no value extractor is applied." Also the idea was that
> implicitly applied extractors should be applied implicitly if it's doable
> unambiguously, but they shouldn't cause any sort of configuration exception
> otherwise.
>

Yes, I'm stating that the spec is incorrect here and should be corrected.

In all the other cases when we have competing value extractors, we throw an
error. Why not in this case?

Typically, you would have your constraints applied on the container
elements, then you add another value extractor, and your constraints are
then applied silently to the container instead of the container elements.
That sounds like the wrong approach.

-- 
Guillaume
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20180401/adee536a/attachment.html 


More information about the beanvalidation-dev mailing list