<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi,<br></div><div class="gmail_quote"><br>On Wed, May 17, 2017 at 3:33 PM, Gunnar Morling <span dir="ltr"><<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>></span> wrote:<span class=""></span><br><span class=""></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
><br>
> * Should we be really brave and rename or alias that member to value()?<br>
<br>
</span>I thought about it, but value() reads poorly if other members are<br>
added down the road (I cannot think of any, though). But given that<br>
@ExtractedValue is only used by BV providers and a very few authors of<br>
custom extractors, I don't mind the few extra characters of type() for<br>
the sake of more explicitness.<br>
<br>
What do others think?<br></blockquote><div><br></div><div>I don't think using value is a good idea. It might be clear now but won't be if we decide to add another attribute later.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> * Should we permit to specify as int.class and force the implementation to<br>
> wrap? (I haven't tried it, and also haven't been awake very long, but I<br>
> can't think why it wouldn't work)<br>
<br>
</span>Would there be any advantage to that? During constraint validator<br>
resolution (where this ends up being used), "primitive types are<br>
considered equivalent to their respective primitive wrapper class", so<br>
it shouldn't make a difference.<br></blockquote><div><br></div><div>As for OptionalInt, I first used int.class for the ValueExtractor in HV but then realized that the extracted type is indeed Integer.class as we extract a null value if the value is not present.<br><br></div><div>In any case, HV boxes the primitive types automatically as HV only deals with boxed types but this part is implementation specific.<br><br>-- <br></div><div>Guillaume <br></div></div></div></div>