-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Adding NonNull annotations to Observable & Single #6313
Conversation
Thanks for Contributing. A few points:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. Kotlin currently warns about those since it's not capable of inferring whether they can be null or not.
Annotation order should be the same for all usages. This will mix this up.
Can't we use a nonnull by default kind of annotation since 99 percent of the API only uses non null?
Codecov Report
@@ Coverage Diff @@
## 2.x #6313 +/- ##
============================================
+ Coverage 98.23% 98.26% +0.03%
- Complexity 6284 6285 +1
============================================
Files 672 672
Lines 44992 44992
Branches 6223 6223
============================================
+ Hits 44198 44213 +15
+ Misses 253 244 -9
+ Partials 541 535 -6
Continue to review full report at Codecov.
|
Non-null by default came up in #5341 but not sure what happened. I'd think it was a JSR 305 annotation instead of just a convention thus the IDEs simply wouldn't have supported them. @freakomonk Did you also want to add these to |
@vanniktech Can you elaborate |
@akarnokd Thanks for the suggestions. Will keep in mind henceforth. I added the I have updated the |
This @freakomonk. I'm not sure though which annotations works where and what needs to be enabled/disabled or not. Either we look into this or we just use RxJava's NonNull annotation which does the job. |
@akarnokd Hi David. Is there something else to do to get this PR merged ? |
@freakomonk I was waiting for you to add them to the other reactive base classes. |
@akarnokd Added annotation to further methods now. Can you pls check ? |
@akarnokd Is this now okay to be merged ? Your review pls |
Adding NonNull annotations in factory methods for improved code compilation
Resolves: #6309