-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create possibility to validate method or constructor parameters for Not-nullness easily. #549
Comments
👤 vyacheslav.sahno 🕗 May 07, 2013 at 10:44 UTC What steps will reproduce the problem? Code like that: What version of the product are you using? On what operating system? Please provide any additional information below. |
👤 askoning 🕗 May 07, 2013 at 13:54 UTC I'd say that Guava already provides for quite readable code here and removes the use for the boilerplate if-throw-block: Personally I prefer that over an annotation on a constructor parameter. public EmailableException(Object source, String errorMessage) { |
👤 vyacheslav.sahno 🕗 May 08, 2013 at 07:34 UTC I think in so frequent situation to make programming easy every keyboard hit counts. That is why i think static import is long to do. Class name is long to write too, "check" method name prefix is redundant and braces too. I'd prefer to do @ NotNull + ctrl+space. |
👤 reinierz 🕗 May 16, 2013 at 17:49 UTC I actually wanted something like this myself, so, I think this might be happening. However, two notes:
We'll probably put lombok.NonNull to good use for this; we currently have no defined semantics for sticking that on a method/constructor parameter. So, in summary: public void whateveryouwant(@ NonNull String x) { becomes: public void whateveryouwant(@ NonNull String x) { |
👤 reinierz 🕗 May 30, 2013 at 23:09 UTC ... aaaand, done! will be in the next official release, and we just pushed an edge release if you want to get your hands dirty: |
End of migration |
Migrated from Google Code (issue 514)
The text was updated successfully, but these errors were encountered: