Parent: #10440
Scope
These two modules form Besu's public API surface for plugin authors. Treat them carefully — annotation choices ship as contract changes.
Why this is a separate phase
- Adding
@Nullable to a return type is a documentation change, but adding @NonNull/removing nullability from a parameter tightens the contract for external plugin authors.
- These modules are good candidates for package-level
@NullMarked rather than per-symbol @Nullable, because absence of @Nullable then documents the non-null contract for external consumers.
- Coordinate with plugin SPI maintainers before merging — downstream plugins may need to track changes.
Approach
- Apply the build-file recipe from the parent issue.
- Decide per package whether to
@NullMarked the package (preferred for new public API) or annotate per-symbol.
- For each public API change, note in the PR description whether the change is clarification (annotation matches existing behavior) or tightening (callers must update).
- Add a CHANGELOG entry under "API" if any public method's nullability documentation changes.
Definition of done
- Both modules'
build.gradle carries the NullAway block.
./gradlew :datatypes:compileJava :plugin-api:compileJava passes.
UnsignedLongParameter no longer imports javax.annotation.
- CI green on a full build.
- Plugin SPI maintainers signed off.
Parent: #10440
Scope
These two modules form Besu's public API surface for plugin authors. Treat them carefully — annotation choices ship as contract changes.
datatypes(35 files) — also clean up the JSR305 stragglerorg.hyperledger.besu.datatypes.parameters.UnsignedLongParameterthat still importsjavax.annotation(left over from Migrate JSR305 nullness annotations to JSpecify #9995).plugin-api(112 files)Why this is a separate phase
@Nullableto a return type is a documentation change, but adding@NonNull/removing nullability from a parameter tightens the contract for external plugin authors.@NullMarkedrather than per-symbol@Nullable, because absence of@Nullablethen documents the non-null contract for external consumers.Approach
@NullMarkedthe package (preferred for new public API) or annotate per-symbol.Definition of done
build.gradlecarries the NullAway block../gradlew :datatypes:compileJava :plugin-api:compileJavapasses.UnsignedLongParameterno longer importsjavax.annotation.