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

Use JSR 305 Nullable/Nonnull annotations? #17

Open
fge opened this issue Dec 7, 2014 · 2 comments
Open

Use JSR 305 Nullable/Nonnull annotations? #17

fge opened this issue Dec 7, 2014 · 2 comments

Comments

@fge
Copy link

fge commented Dec 7, 2014

Such annotations can help immensely when programming with the API, as it tells the API user what to expect.

Two examples from DbxClient:

  • .startGetFile() can have null as its second argument; it will also never return null; therefore:
@Nonnull
DbxClient.Downloader startGetFile(String path, @Nullable String rev)
  • .getMetadata() can return null:
@Nullable
DbxEntry getMetadata(String path)
@cakoose
Copy link
Contributor

cakoose commented Dec 7, 2014

The SDK itself currently uses the Checker Framework's Nullness Checker. (It seemed like the best available option when I looked into this last year.)

I just posted a question on their mailing list asking how best to move forward: https://groups.google.com/forum/#!topic/checker-framework-discuss/TETwy3IAqNg

@handstandsam
Copy link
Contributor

+1, providing nullability information via annotations would be great. I know @wdziemia has requested this as well. We don't have a timeline on this, but I'll tag this as something we do want to add in the future.

@handstandsam handstandsam changed the title Use JSR 305 annotations? Use JSR 305 Nullable/Nonnull annotations? Sep 23, 2022
@handstandsam handstandsam added this to the 6.0.0 milestone Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants