Conversation
Adds compile-time null-safety analysis via Error Prone + NullAway, keyed on JSpecify @NullMarked / @nullable. - Root pom: errorprone 2.36.0, nullaway 0.12.3, jspecify 1.0.0 in versions block; jspecify in dependencyManagement; Error Prone + NullAway annotation processors on maven-compiler-plugin with Xep:NullAway:ERROR, OnlyNullMarked=true, JSpecifyMode=true. - .mvn/jvm.config: add jdk.compiler add-exports/add-opens flags so Error Prone can reflect into javac internals on JDK 25. - performance/pom.xml: pin jmh-generator-annprocess version explicitly + combine.children=append so the JMH processor merges with the inherited Error Prone + NullAway processors. - Exclude generated (fbs/proto) and TUI/server packages via XepExcludedPaths to dodge upstream NullAway crashes on certain lambda + try/finally shapes. Annotated boundary (proof-of-concept scope): - io.github.dfa1.vortex.extension via package-info @NullMarked. - ExtensionId.tryFrom return @nullable. - Extension.findKnown return @nullable. - TimestampExtension.dtype(unit, zone, nullable): zone @nullable. Follow-ups: extend @NullMarked to io.github.dfa1.vortex.encoding, core, core.array, io, scan, writer, reader as separate commits. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@nullable return types let callers silently dereference; Optional forces the caller to handle the empty case at the type level and reads as idiomatic modern Java per CLAUDE.md. - ExtensionId.tryFrom: Optional<ExtensionId> - Extension.findKnown: Optional<Extension> - Callers updated: Chunk.as, VortexWriter.writeChunk, JdbcImporter.fillExtensionCell, VortexInspectorTui.formatValue. - ExtensionIdTest assertions: isSameAs -> contains / isNull -> isEmpty. - ExtensionTestSupport.tzMeta tz arg stays @nullable (string, not a result). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
@NullMarked/@Nullable.io.github.dfa1.vortex.extensiononly. Other packages stay unmarked (NullAway skips them whenOnlyNullMarked=true)../mvnw verifygreen on JDK 25 (920+ unit + 243 integration tests pass).ExtensionId.tryFromreturn →@NullableExtension.findKnownreturn →@NullableTimestampExtension.dtype(unit, zone, nullable)zoneparam →@NullableHow it works
pom.xml:errorprone 2.36.0,nullaway 0.12.3,jspecify 1.0.0. Error Prone + NullAway run asannotationProcessorPathsonmaven-compiler-plugin. Flags:-XDcompilePolicy=simple --should-stop=ifError=FLOW -Xplugin:ErrorProne -XepDisableAllChecks -Xep:NullAway:ERROR -XepOpt:NullAway:OnlyNullMarked=true -XepOpt:NullAway:JSpecifyMode=true..mvn/jvm.config:--add-exports/--add-opensforjdk.compilerinternals — required by Error Prone on JDK 25; the-J…compilerArgs are no-ops becausemaven-compiler-pluginruns javac in the Maven JVM.performance/pom.xml:jmh-generator-annprocesspinned +combine.children="append"so JMH merges with the inherited Error Prone + NullAway processors.XepExcludedPathsskips generatedfbs/protopackages and the CLI TUI/server packages (workaround for upstream NullAway crashes on certain lambda + try/finally shapes).Follow-ups (separate commits)
@NullMarkedtoencoding,core,core.array,io,scan,writer,reader. Triage and annotate as NullAway flags real bugs (the PostscriptParser extension-nullable hardcode would have been caught here).Test plan
./mvnw verifygreen on JDK 25.@NullMarkedboundary scope is acceptable as a starting point.🤖 Generated with Claude Code