Skip to content
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

Consider whether to add nullability annotations #639

Open
QuintinWillison opened this issue Dec 22, 2020 · 3 comments
Open

Consider whether to add nullability annotations #639

QuintinWillison opened this issue Dec 22, 2020 · 3 comments
Labels
enhancement New feature or improved functionality.

Comments

@QuintinWillison
Copy link
Contributor

QuintinWillison commented Dec 22, 2020

In particular for our public APIs, but would also assist internally in some places too.

This section in the Java interoperability section of the Kotlin docs presents a nice summary of the options we could adopt.

I had previously asked sacOO7 to remove Jetbrains annotations when he added them in one of his PRs, but that was more because I didn't want to conflate this with that particular fix.

Working on this issue has three clear components:

  1. Select which annotations to use
  2. Add them to our public APIs
  3. Possibly add them our internal APIs

┆Issue is synchronized with this Jira Research by Unito

@kavalerov
Copy link

Just to add my two cents - I am not sure about web and enterprise Java developers, but afaik in Android world de-facto standard is JetBrains annotations. Because of that I suggest we use them as well, unless there is a strong reason not to.

@sacOO7
Copy link
Collaborator

sacOO7 commented Feb 25, 2021

+1 @kavalerov . I can see it being used almost everywhere too. The only issue would be we need to configure it to generate an error via a plugin when it violates null contracts. Currently, IDE can only generate warnings when null constraints are violated.

@QuintinWillison QuintinWillison added enhancement New feature or improved functionality. and removed question labels Dec 5, 2022
@lawrence-forooghian
Copy link
Collaborator

I've just been creating an interface in our Asset Tracking Android product which is meant to wrap the ably-java SDK. I found myself having to use my knowledge of our SDKs in order to make judgements about nullability. If we had these annotations I wouldn't have needed to do that. All that is to say this sounds like a good idea 👍.

@sync-by-unito sync-by-unito bot removed the enhancement New feature or improved functionality. label Mar 13, 2023
@ttypic ttypic added the enhancement New feature or improved functionality. label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

No branches or pull requests

6 participants