dropbox-sdk-java
dropbox-sdk-java copied to clipboard
Use JSR 305 Nullable/Nonnull annotations?
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)
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
+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.