<div dir="ltr">Hi Gunnar,<div><br></div><div>Here the procedure to find the result:</div><div><br></div><div>1. Quick and dirty</div><div><p style="margin-bottom:0in;line-height:17.8px">copy this url and rellace the class name in the result page</p><p style="margin-bottom:0in;line-height:17.8px"><a href="https://github.com/search?l=&amp;q=javax.validation.constraints.NotNull+language%3AJava&amp;ref=advsearch&amp;type=Code&amp;utf8=%E2%9C%93">https://github.com/search?l=&amp;q=javax.validation.constraints.NotNull+language%3AJava&amp;ref=advsearch&amp;type=Code&amp;utf8=%E2%9C%93</a></p><p style="margin-bottom:0in;line-height:17.8px"><br></p><p style="margin-bottom:0in;line-height:17.8px">2. Step by step</p></div><div><br></div><div>You can go here:</div><div>
        
        
        


<p style="margin-bottom:0in;line-height:100%"><a href="https://github.com/search/advanced">https://github.com/search/advanced</a></p><p style="margin-bottom:0in;line-height:100%">You should
search the full class name of the annotation, ex. : 
javax.validation.constraints.NotNull</p><p style="margin-bottom:0in;line-height:100%">You can set the
language to Java. After you execute the query you can filter only the
results in &#39;Code&#39;.</p><p style="margin-bottom:0in;line-height:100%">Like this you can
find where an annotation class is imported.</p><p style="margin-bottom:0in;line-height:100%"><br></p><p style="margin-bottom:0in;line-height:100%">Remarks:</p><p style="margin-bottom:0in;line-height:100%">At every execution
the result change 5-10%, it&#39;s absolutely not scientific (I don&#39;t know how it works their index and search) but you can get an idea of the usage of some classes.</p><p style="margin-bottom:0in;line-height:100%"><br></p><p style="margin-bottom:0in;line-height:100%">Cheers,</p><p style="margin-bottom:0in;line-height:100%">Marco</p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 23, 2016 at 12:15 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Marco,<div><br></div><div>Nice research! Out of curiosity, how did you get these numbers?</div><div><br></div><div>Historically, the spec stayed on the conservative end in terms of built-in constraints. @NotEmpty etc. can quite easily be implemented or even just be composed based on other built-in constraints. But the numbers you shared indeed indicate some usefulness of adding at least some.</div><div><br></div><div>Would be interesting to know what others think?</div><div><br></div><div>Cheers,</div><div><br></div><div>--Gunnar</div><div><br></div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-08-22 20:32 GMT+02:00 Hendrik Ebbers <span dir="ltr">&lt;<a href="mailto:hendrik.ebbers@me.com" target="_blank">hendrik.ebbers@me.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" dir="auto">+1<div><br><div><blockquote type="cite"><div><div><div>Am 22.08.2016 um 19:37 schrieb Marco Molteni &lt;<a href="mailto:moltenma@gmail.com" target="_blank">moltenma@gmail.com</a>&gt;:</div><br></div></div><div><div><div><div dir="ltr"><p style="margin-bottom:0in"><span style="line-height:17.8px"><font face="monospace, monospace">Hi all,</font></span></p><p style="margin-bottom:0in"><span style="line-height:17.8px"><font face="monospace, monospace">It would be possible to add some built-in constraints to the V 2.0?</font></span></p><p style="margin-bottom:0in"><span style="font-family:monospace,monospace;line-height:17.8px">@NotBlank, @NotEmpty, @Length are used very often in projects, they are already present in Hibernate Validator and their implementation is well defined.</span><span style="line-height:17.8px"><font face="monospace, monospace"><br></font></span></p><p style="margin-bottom:0in"><span style="line-height:17.8px"><font face="monospace, monospace">What do you think?</font></span></p><p style="margin-bottom:0in"><span style="line-height:17.8px"><font face="monospace, monospace">Here a list of the most used constraint for GitHub&#39;s projects (the numbers change at every request but you get the idea. HV = </font></span><span style="font-family:monospace,monospace;line-height:17.8px">Hibernate Validator, BV = Bean Validation</span><span style="font-family:monospace,monospace;line-height:17.8px">):</span></p><p style="margin-bottom:0in"><font face="monospace, monospace"><span style="line-height:17.8px">189&#39;143 - BV - NotNull<br></span><span style="line-height:17.8px"> 56&#39;902 - BV - Size<br></span><span style="line-height:17.8px"> 39&#39;551 - HV - NotEmpty &lt;-<br></span></font><span style="line-height:17.8px;font-family:monospace,monospace"> 20&#39;687 - HV - NotBlank &lt;-<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 17&#39;735 - BV - Pattern<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 16&#39;763 - HV - Email<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 16&#39;033 - BV - Min<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 12&#39;769 - HV - Length &lt;-<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  7&#39;806 - BV - Digits<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  4&#39;982 - BV - Max<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  4&#39;971 - BV - Past<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  3&#39;598 - BV - DecimalMin<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  2&#39;753 - BV - AssertTrue<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  2&#39;379 - BV - DecimalMax<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  2&#39;308 - BV - Future<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  1&#39;999 - HV - Range<br></span><span style="font-family:monospace,monospace;line-height:17.8px">  1&#39;497 - HV - URL<br></span><span style="font-family:monospace,monospace;line-height:17.8px">&lt; 1&#39;000 other constraints</span></p><p style="margin-bottom:0in"><span style="line-height:17.8px"><font face="monospace, monospace">Thanks</font></span></p><p style="margin-bottom:0in"><span style="line-height:17.8px"><font face="monospace, monospace">Cheers</font></span></p><p style="margin-bottom:0in"><span style="line-height:17.8px"><font face="monospace, monospace">Marco</font></span></p></div></div></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></div>
</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>