<div dir="ltr">BTW, have you (any of you, not just Gunnar) read the new question I&#39;ve added at the end of the proposal? That&#39;s the main use case with JSR-310 and BV that will be missing.<div><br></div><div>Regards,</div><div>Michael</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 10:37 AM, Michael Nascimento <span dir="ltr">&lt;<a href="mailto:misterm@gmail.com" target="_blank">misterm@gmail.com</a>&gt;</span> wrote:<br><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"><span class="">On Wed, Sep 28, 2016 at 5:12 AM, Gunnar Morling <span dir="ltr">&lt;<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>&gt; * What are the shortcomings meant by &quot;2.1.1. Working around limitations in<br>
&gt; ConstraintValidator that prevent the above strategy&quot;?<br>
<br>
</span>All those sections without content are still to be written. In this<br>
case, according to the spec, there is no way to write a<br>
PastTemporalAccessorComparable<wbr>ConstraintValidator extends<br>
ConstraintValidator&lt;Past, ? extends TemporalAccessor &amp; Comparable&lt;?&gt;&gt;<br>
or something like it, which is the natural choice. Making it just<br>
&quot;extends ConstraintValidator&lt;TemporalAc<wbr>cessor&gt;&quot; won&#39;t make it fail at<br>
the right phase if @Past is applied to a non-Comparable<br>
TemporalAccessor. I have a few ideas on how to address that, but maybe<br>
now you can get thinking too :-)<br></blockquote><div><br></div></span><div>Ok, got you.</div><div><br></div><div>That&#39;d only be a problem though if you wanted to write a single validator implementation for all of them, right? I&#39;m wondering whether one wouldn&#39;t use several more specific implementations anyways, given one needs to invoke a specific static now() method?</div></div></div></div></blockquote><div><br></div></span><div>Ideally we&#39;d want to use a single implementation since it automatically add supports for any custom TemporalAccessor out there, including ThreeTen-Extra or project specific ones (I&#39;ve written a few of them).</div><div><br></div><div>I&#39;ve listed a few available at ThreeTen-Extra in the version I&#39;ve sent two days ago:</div><div><br></div><div><a href="https://github.com/sjmisterm/beanvalidation.org/blob/patch-1/proposals/BVAL-496.adoc" target="_blank">https://github.com/sjmisterm/<wbr>beanvalidation.org/blob/patch-<wbr>1/proposals/BVAL-496.adoc</a><br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
&gt; * What do you have in mind with regards to &quot;2.4. &quot;Simple&quot; TemporalAmount<br>
&gt; implementations support&quot;?<br>
<br>
</span>These are TemporalAmount(s) with a single unit. For these, @Max and<br>
@Min support should work for the single unit they support.<br></blockquote><div><br></div></span><div>Ah, seeing now that Duration and Period implement these. I don&#39;t think I like @Max/@Min for these as it&#39;s not clear what the unit of the expected value is. </div></div></div></div></blockquote><div><br></div></span><div>Duration and Period are *not* TemporalAmount(s) with a single unit. I was talking about classes such as:</div><div><br></div><div><a href="http://www.threeten.org/threeten-extra/apidocs/org/threeten/extra/Days.html" target="_blank">http://www.threeten.org/<wbr>threeten-extra/apidocs/org/<wbr>threeten/extra/Days.html</a><br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>New constraints may be more useful here:</div><div><br></div><div>    public void save(@MaxDuration(value=60, unit=ChronoUnit.SECONDS) Duration d) { ... }</div></div></div></div></blockquote><div><br></div></span><div>Exactly, even though we should name it around TemporalAmount or ChronoUnit :-)</div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; * Regarding Duration/Period, how about handling this separately? It seems we<br></blockquote></span><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
&gt; could add this in a second step, allowing to align quickly on the<br>
&gt; @Future/@Past additions and add support for it to the RI.<br>
<br>
</span>Your call :-) I was just trying to consolidate everything about<br>
JSR-310 in a single proposal; there&#39;s nothing wrong with splitting it.<br></blockquote><div><br></div></span><div>Ok, I&#39;d say if think you can come up with something for this quickly, go for it. Otherwise let&#39;s keep it separately. It&#39;d be nice to have a first cut of stuff we can take and provide support for in the RI.</div></div></div></div></blockquote><div><br></div></span><div>Let&#39;s see how much we can evolve this week.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Thanks a lot for your effort, Michael, that&#39;s much appreciated!</div></div></div></div></blockquote><div><br></div></span><div>That&#39;s what I&#39;ve signed up for ;-)</div><div><br></div><div>Regards,</div><div>Michael </div></div><br></div></div>
</blockquote></div><br></div>