-
Notifications
You must be signed in to change notification settings - Fork 343
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 getArgs() non-nullable #172
Comments
The same with |
I think |
Seems like a reasonable change. Done in the latest snapshot. Thanks! |
Yeah, having And suddenly all my calls to I'm not saying this is a wrong change, just wanted to mention this as something to be aware of... |
@dimsuz Almost all of our apps are Kotlin as well, so I feel your pain. This should have been more than a patch release, as it is kind of a breaking change. My temporary approach was to add this as a class extension:
I then did a replace all on usages of |
@EricKuck wow, I don't know how that happened, but I didn't realize that I can add extension function to a Thank you. I also not sure at which times an I never had an issue with null |
Currently
Controller.getArgs()
is marked@Nullable
and either returns the argument bundle ornull
if no args were set. The consequence of this is IDE warnings and cumbersome null checks whenever usinggetArgs()
.I'd argue that
getArgs()
should return an empty bundle when no args were set, making it unnecessary to do a null check (or worse, ignore the warning). This would make it impossible to distinguish between empty and absent args, but I don't think it would be of much use anyway.Happy to take a stab at this!
The text was updated successfully, but these errors were encountered: