<div dir="ltr">Hi all,<div><br></div><div>Finally circling back to this one, many thanks for all your comments! Sorry for the long delay, I was sidetracked with a conference and some other things.</div><div><div><br></div><div>To those asking about support for Period or Duration, how would that look like exactly? I reckon we&#39;d need some new constraints along the lines of @MinDuration(value=6000, unit=SECOND)? What would be a use case for validating durations like this? I can somehow see it, but it seems rather specialized to me.</div><div><br></div><div>&gt; <span style="font-size:12.8px">But if we design the TimeProvider this way, adding something to the method signature won&#39;t be possible in the future. However, I don&#39;t think this is a real problem. Unless someone comes up with some use case.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">It&#39;s a good point. I&#39;d dislike adding a parameter object </span><span style="font-size:12.8px">without any properties</span><span style="font-size:12.8px">, &quot;just in case&quot;, though. But this is a case where Java 8 default methods are helpful: Should we ever see the need for some context parameter in a subsequent revision, we can add a new method for this and let it delegate to the parameterless one by default.</span></div><div><br></div><div>&gt; <span style="font-size:12.8px">If we support the &quot;Year&quot; type, we should also support &quot;YearMonth&quot;. This type is not so widely used, but it feels strange to not support it if we support &quot;Year&quot;.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Yes, I think you are right.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">&gt; </span>Another thing: If @Future and @Past support types like LocalDate, YearMonth and Year, should we perhaps enhance them to allow the user to specify that the &quot;current&quot; year/month/date should also be valid?</div><div><br></div><div>That&#39;s a very good point, too! This one has been specifically brought up with <a href="https://hibernate.atlassian.net/browse/BVAL-466">https://hibernate.atlassian.net/browse/BVAL-466</a>. It seems sensible to add an annotation parameter for this given the support for these non-instant types. When looking at your example, I&#39;d have a hard time though to reason the exact semantics of inclusive(). I hope we could find something more descriptive?</div><div><br></div><div>Btw. Michael (who has been part of the JSR 310 EG) pointed out that TimeProvider should return a Clock.</div><div><br></div><div>--Gunnar</div><div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">2016-09-06 6:53 GMT+02:00 Christian Kaltepoth <span dir="ltr">&lt;<a href="mailto:christian@kaltepoth.de" target="_blank">christian@kaltepoth.de</a>&gt;</span>:<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">Hey all,<div><br></div><div>I just reviewed the proposal in more detail. I really like it. Great work. Some comments:</div><div><br></div><div><b>Make current time and timezone customizable</b></div><div>I also don&#39;t see a use case for making the retrieval more contextual. But if we design the TimeProvider this way, adding something to the method signature won&#39;t be possible in the future. However, I don&#39;t think this is a real problem. Unless someone comes up with some use case.</div><div><br></div><div><b>Other JSR 310 types to support</b></div><div>If we support the &quot;Year&quot; type, we should also support &quot;YearMonth&quot;. This type is not so widely used, but it feels strange to not support it if we support &quot;Year&quot;.</div><div><br></div><div><br></div><div>Another thing: If @Future and @Past support types like LocalDate, YearMonth and Year, should we perhaps enhance them to allow the user to specify that the &quot;current&quot; year/month/date should also be valid? I&#39;m thinking of something like:</div><div><br></div><div><font face="monospace, monospace">@Past( inclusive=true ) </font></div><div><font face="monospace, monospace">private LocalDate someDate;     // valid if someDate &lt;= today</font></div><div><br></div><div>Thoughts?</div><div><br></div><div><br></div><div>Christian</div><div><br></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">2016-09-01 12:40 GMT+02:00 Otávio Gonçalves de Santana <span dir="ltr">&lt;<a href="mailto:otaviojava@java.net" target="_blank">otaviojava@java.net</a>&gt;</span>:<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">Period or Duration is a good idea. Once it&#39;s Java 8 and BV 2.0 will support it. IMHO makes sense has support to it.<br></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Thu, Sep 1, 2016 at 7:14 AM, Hendrik Ebbers <span dir="ltr">&lt;<a href="mailto:hendrik.ebbers@me.com" target="_blank">hendrik.ebbers@me.com</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 style="word-wrap:break-word"><span style="color:rgb(42,46,46);font-family:&quot;helvetica neue&quot;,arial,sans-serif;font-size:15px">I like the the proposal :)</span><br style="color:rgb(42,46,46);font-family:&quot;helvetica neue&quot;,arial,sans-serif;font-size:15px"><span style="color:rgb(42,46,46);font-family:&quot;helvetica neue&quot;,arial,sans-serif;font-size:15px">Currently it do not support new data types like Period or Duration (implementations of TemporalAmount). But for this types new annotations / constraints are needed. The question is if this should be supported by the JSR, too.</span><div><font color="#2a2e2e" face="Helvetica Neue, arial, sans-serif"><span style="font-size:15px"><br></span></font><div><blockquote type="cite"><div>Am 30.08.2016 um 14:39 schrieb Gunnar Morling &lt;<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>&gt;:</div><br><div><div dir="ltr">Anyone with thoughts/input on supporting the JSR 310 types?</div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-25 12:10 GMT+02:00 Gunnar Morling <span dir="ltr">&lt;<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>&gt;</span>:<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">Hi,<div><br></div><div>I&#39;ve pushed another proposal to the website [1], it&#39;s about adding @Past/@Future support for the date/time types added in Java 8 (java.time.* package, added by JSR 310). The proposal essentially standardizes the proprietary support we had in HV, plus some additions.</div><div><br></div><div>Please let me know what you think, especially on the questions towards the end. Either put comments inline on the source on GitHub [2] or let&#39;s have a discussion here.</div><div><br></div><div>I haven&#39;t been using JSR 310 extensively myself, so any feedback by those who have is more than welcome.</div><div><br></div><div>Thanks,</div><div><br></div><div>--Gunnar</div><div><br></div><div>[1] <a href="http://beanvalidation.org/proposals/BVAL-496/" target="_blank">http://beanvalidation.org/<wbr>proposals/BVAL-496/</a></div><div>[2] <a href="https://github.com/beanvalidation/beanvalidation.org/blob/production/proposals/BVAL-496.adoc" target="_blank">https://github.com/beanval<wbr>idation/beanvalidation.org/blo<wbr>b/production/proposals/BVAL-49<wbr>6.adoc</a></div><div><br></div></div>
</blockquote></div><br></div>
______________________________<wbr>_________________<br>beanvalidation-dev mailing list<br><a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a></div></blockquote></div><br></div></div><br>______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a><br></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div><div dir="ltr">Otávio Gonçalves de Santana<div><div style="text-align:center"><br style="font-size:12.8px"><div style="font-size:12.8px;text-align:left"><br></div><div style="font-size:12.8px;text-align:left">twitter: <a href="http://twitter.com/otaviojava" target="_blank">http://twitter.com/ot<wbr>aviojava</a></div><div style="font-size:12.8px;text-align:left">site:     <span style="text-align:center"><font color="#0000ee"><u><a href="http://about.me/otaviojava" target="_blank">http://about.me/otaviojava</a></u></font></span></div><div><span style="text-align:center"><font color="#0000ee"><br></font></span></div></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><span><font color="#888888"><div><div>Christian Kaltepoth</div><div>Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a></div><div>Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a></div><div>GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a></div><div><br></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a><br></blockquote></div><br></div></div></div>