<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-03-31 13:42 GMT+02:00 Guillaume Smet <span dir="ltr"><<a href="mailto:guillaume.smet@gmail.com" target="_blank">guillaume.smet@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="">On Sat, Mar 31, 2018 at 11:51 AM, Gunnar Morling <span dir="ltr"><<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>></span> wrote:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><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'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.ne<wbr>t/browse/BVAL-678</a>.<div><br></div><div>I'm sympathetic to the current behaviour of that TCK test and to adjusting the spec wording accordingly. Only you, Guillaume, didn'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></span><div>Ah, yes, I remember now.</div><div><br></div>The paragraph is:<span class=""><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></span>The initial wording "exactly one maximally-specific type-compliant value extractor marked with @UnwrapByDefault" was not accurate because it was not clear if we should determine the "maximally-specific type-compliant value extractor" 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'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></ul></ul></div></div></div></blockquote><div>Ok so far. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><ul><ul><li>If more than one are marked with @UnwrapByDefault, a ConstraintDeclarationException is raised.</li></ul></ul></div></div></div></blockquote>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.</div><div class="gmail_quote"><br></div><div class="gmail_quote">The original wording could be interpreted in the way above, but +1 for making it more exhaustive. Can you log a BVAL issue for 2.1?</div><div class="gmail_quote"> <br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">I would lean towards implementing it this way in the implementations and fix it for BV 2.1.</div></div></div></blockquote><div><br></div><div>+1 apart from the case where there are multiple <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">maximally-specific type-compliant value extractors marked with </span>@ UBD as discussed above.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><div class="gmail_quote"><br></div><div class="gmail_quote">-- </div><div class="gmail_quote">Guillaume</div></font></span></div></div>
<br>______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/<wbr>beanvalidation-dev</a><br></blockquote></div><br></div></div>