Switched nullability annotations to jspecify - #104
Draft
Trinsdar wants to merge 12 commits into
Draft
Conversation
Trinsdar
commented
Aug 25, 2026
Comment on lines
17
to
18
| @UnknownNullability | ||
| T getValue(); |
Contributor
Author
There was a problem hiding this comment.
not sure how @UnknownNullability should be dealt with
Contributor
There was a problem hiding this comment.
Can't you just do @NullUnmarked or something similar?
Contributor
Author
There was a problem hiding this comment.
Yes that's a solution, but I'm not sure if that's a proper solution. I wonder if i should change T to T extends @Nullable Object
Edit: i just checked: NullUnmarked is only meant to be used as a transitional annotation until all classes are nullmarked. I wouldn't be surprised if they depreciated it in a future version once most java projects have switched over fully to jspecify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also am wondering: do you guys want to use the nullaway error prone plugin or is intellij's warning system good enough? Nullaway makes it possible to get compile errors from incorrect null handling, kinda like how kotlin does, though one caveat I will note is it might not work super well with lombok, I haven't looked too much into that yet.