<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=&q=javax.validation.constraints.NotNull+language%3AJava&ref=advsearch&type=Code&utf8=%E2%9C%93">https://github.com/search?l=&q=javax.validation.constraints.NotNull+language%3AJava&ref=advsearch&type=Code&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 'Code'.</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's absolutely not scientific (I don'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"><<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>></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"><<a href="mailto:hendrik.ebbers@me.com" target="_blank">hendrik.ebbers@me.com</a>></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 <<a href="mailto:moltenma@gmail.com" target="_blank">moltenma@gmail.com</a>>:</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'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'143 - BV - NotNull<br></span><span style="line-height:17.8px"> 56'902 - BV - Size<br></span><span style="line-height:17.8px"> 39'551 - HV - NotEmpty <-<br></span></font><span style="line-height:17.8px;font-family:monospace,monospace"> 20'687 - HV - NotBlank <-<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 17'735 - BV - Pattern<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 16'763 - HV - Email<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 16'033 - BV - Min<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 12'769 - HV - Length <-<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 7'806 - BV - Digits<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 4'982 - BV - Max<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 4'971 - BV - Past<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 3'598 - BV - DecimalMin<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 2'753 - BV - AssertTrue<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 2'379 - BV - DecimalMax<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 2'308 - BV - Future<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 1'999 - HV - Range<br></span><span style="font-family:monospace,monospace;line-height:17.8px"> 1'497 - HV - URL<br></span><span style="font-family:monospace,monospace;line-height:17.8px">< 1'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>