-
Notifications
You must be signed in to change notification settings - Fork 749
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
Make SDK explicit about nullability in parameters and returned values - Kotlin friendly #225
Comments
@Shreyas-vgr Basically, this feature requires modifications in mustache templates. Adding annotations if fields / method parameters and return values are required / optional. Unfortunately, those templates are not published on GitHub so I can't contribute to them. |
can you please assign it to me , would like to contribute |
@pkatre2 feel free to submit a PR. assignment is not necessary ihmo |
Is this issue/feature-request still relevant? |
yes, it is. I even provided a way how to implement it, but since templates are not public I cannot contribute. |
I'm submitting a...
Expected Behavior
When passing parameters to API I should know if I can pass null safely.
When I get parameters from API (eg. by implementing it's interfaces, extending classes) I want to be sure wether received object will be null or not.
Current Behavior
Possible Solution
Make use of Nullability annotations - eg. JSR-305 (as runtime dependency)
Annotate appropriate elements with relevant annotations, or even mark whole packages using
package-info.java
.Context
Now SDK does not indicate in clear way wether objects can be or can't be null. Such approach forces SDK consumers to write tons of boilerplate defensive code which can turn out to be useless (but consumer does not know that)
The text was updated successfully, but these errors were encountered: