Repository navigation
Drop the jspecify nullness annotations - #429
Merged
Merged
Conversation
elharo
approved these changes
Sep 10, 2026
elharo
left a comment
Contributor
There was a problem hiding this comment.
This makes me wonder if we could just drop this. The 18 different variants of Null/NonNull/Nullable etc. feel like an experiment that has failed. I've never seem them improve robustness in any meaningful way. They're applied haphazardly and never checked.
slachiewicz
added a commit
that referenced
this pull request
Sep 11, 2026
Review of the provided-scope change (#429) asked whether the annotations earn their place at all: they are applied haphazardly, never checked by a tool in this build, and add a dependency to the graph of every consumer. Removing them leaves nothing to scope. The only behavioural surface was RetentionPolicy.RUNTIME metadata on public signatures; nothing in this library or Maven core reflects on it.
slachiewicz
force-pushed
the
agent/jspecify-provided
branch
from
September 11, 2026 07:00
5688119 to
d3dc4ad
Compare
slachiewicz
marked this pull request as draft
September 11, 2026 07:00
Review of the provided-scope change (#429) asked whether the annotations earn their place at all: they are applied haphazardly, never checked by a tool in this build, and add a dependency to the graph of every consumer. Removing them leaves nothing to scope. The only behavioural surface was RetentionPolicy.RUNTIME metadata on public signatures; nothing in this library or Maven core reflects on it.
slachiewicz
force-pushed
the
agent/jspecify-provided
branch
from
September 11, 2026 07:02
d3dc4ad to
e921682
Compare
slachiewicz
marked this pull request as ready for review
September 11, 2026 07:05
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.
Removes the
org.jspecify:jspecifydependency and every@NonNull/@Nullableannotation it supplied, in place of the provided-scope change this PR first proposed. The review on that version asked whether the annotations earn their place at all; they are not checked by any tool in this build, so dropping them is the smaller change to the consumer graph than adjusting the scope.The diff is large only because spotless re-joins signatures that fit on one line once the annotations are gone. No method body changes.
What consumers see: the runtime annotation metadata disappears from public signatures. Nothing in this library reflects on it, Maven core has no reference to
org.jspecifyat all, and NullAway or similar checkers were never wired into this build. I have not audited the other consumers; one that referencedorg.jspecifytransitively through this artifact would need to declare it itself.After the change
dependency:list -DincludeScope=runtimeyieldsslf4j-api,jansi(optional) andcommons-io.Verified:
JAVA_HOME=$(/usr/libexec/java_home -v 17) mvn -B verify-> Tests run: 788, Failures: 0, Errors: 0 (JDK 17); spotless clean;dependency:list -DincludeScope=runtimeshows no jspecifyThis change was created with AI assistance.