-
Notifications
You must be signed in to change notification settings - Fork 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
Request: add nullability annotations for functions #5402
Comments
Thanks for reporting. We'll fix that one. Note that we added all the nullable annotations only recently and we may have missed some parts of the most used APIs. |
Thank you. |
Java and Kotlin are interoperable, so there is no point in having the library in both languages. |
That's not entirely true. They work fine with each other, but when coding via the IDE, you will notice issues between them, that the IDE doesn't help you with, as opposed to when writing only in Kotlin on both cases. For example this case. On Kotlin you'd have to set nullability, but on Java, you don't have to, and since the IDE still can't handle nullability issues between them, it can always be an issue. |
Well, we do try to make sure it can be used in Kotlin and Java in the same way, that's why we are adding the annotations. We also did a few other things (e.g. moving Runnables to the last argument in each method to allow usages of the improved Kotlin syntax). Besides that, the code is running fine in both languages and all improvements are only around ease of use and not actual functionality. |
Of course. |
Issue:#5402 PiperOrigin-RevId: 229758525
Closing as fixed. |
@tonihei Thank you! |
Issue:#5402 PiperOrigin-RevId: 229758525
For example, to SimpleExoPlayer.getVideoFormat() , which could return null:
This is especially important when developing using Kotlin, as the IDE doesn't consider Java returned values as nullable by default when writing on Kotlin.
The text was updated successfully, but these errors were encountered: