<div dir="ltr">On Sat, Mar 31, 2018 at 11:51 AM, Gunnar Morling <span dir="ltr">&lt;<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">That&#39;s an interesting one; it was originally worded exactly like Matt suggests, but then we changed into the current version: <a href="https://hibernate.atlassian.net/browse/BVAL-678" target="_blank">https://hibernate.atlassian.<wbr>net/browse/BVAL-678</a>.<div><br></div><div>I&#39;m sympathetic to the current behaviour of that TCK test and to adjusting the spec wording accordingly. Only you, Guillaume, didn&#39;t seem to like that alternative as per our discussion on June 26th, in the Hibernate Validator chat room. Perhaps you remember what made you dislike it back then?</div></div></blockquote><div><br></div><div>Ah, yes, I remember now.</div><div><br></div>The paragraph is:<br><ul><li>If the constraint carries neither the Unwrapping.Unwrap nor the Unwrapping.Skip payload:<br></li><ul><li>If there is exactly one maximally-specific type-compliant value extractor and this extractor is marked with @UnwrapByDefault, this extractor is applied;</li><li>Otherwise, no value extractor is applied.</li></ul></ul>The initial wording &quot;exactly one maximally-specific type-compliant value extractor marked with @UnwrapByDefault&quot; was not accurate because it was not clear if we should determine the &quot;maximally-specific type-compliant value extractor&quot; first and then check if it is @UnwrapByDefault. This is important because, for a given type parameter, we want to get the maximally specific value extractor first and then we want to check if it is marked with @UnwrapByDefault. We don&#39;t want to get the maximally specific (value extractor marked with @UnwrapByDefault).</div><div class="gmail_quote"><br></div><div class="gmail_quote">We also miss a mention of the case when there are 2 maximally-specific type-compliant value extractors marked with @UnwrapByDefault.</div><div class="gmail_quote"><br></div><div class="gmail_quote">I think a wording more in line with our intentions would be:</div><div class="gmail_quote"><ul><li>We determine the maximally-specific type-compliant value extractors.<br></li><ul><li>If there are no matching value extractors or none is marked with @UnwrapByDefault, no value extractor is applied.</li><li>If exactly one is marked with @UnwrapByDefault, this very extractor is applied.</li><li>If more than one are marked with @UnwrapByDefault, a ConstraintDeclarationException is raised.</li></ul></ul></div><div class="gmail_quote">I would lean towards implementing it this way in the implementations and fix it for BV 2.1.</div><div class="gmail_quote"><br></div><div class="gmail_quote">-- </div><div class="gmail_quote">Guillaume</div></div></div>