X Tutup
Skip to content

Add JSpecify annotations to normalized, schema, and util classes (Wave 5)#4303

Draft
dondonz wants to merge 204 commits intomasterfrom
claude/jspecify-wave5
Draft

Add JSpecify annotations to normalized, schema, and util classes (Wave 5)#4303
dondonz wants to merge 204 commits intomasterfrom
claude/jspecify-wave5

Conversation

@dondonz
Copy link
Member

@dondonz dondonz commented Mar 7, 2026

This is the final wave of JSpecify annotations

Don't review this yet - this is a branch, off a branch, off a branch, so the diff is huge. Opening the PR early to let you know the initial work is done.

Summary

  • Adds @NullMarked annotations to 12 remaining classes not covered by other open PRs
  • Fixes all NullAway compilation errors from the new annotations
  • Removes 13 entries from the JSpecify exemption list

Classes annotated

graphql.normalized

  • NormalizedDeferredExecution, NormalizedDocument, NormalizedDocumentFactory
  • NormalizedField, NormalizedOperation, NormalizedOperationToAstCompiler

graphql.schema

  • SchemaGraph, OneOfInputObjectRules

graphql.util

  • CyclicSchemaAnalyzer, QueryGenerator, QueryGeneratorOptions, QueryGeneratorResult

Test plan

  • ./gradlew compileJava passes (NullAway clean)
  • Full CI passes

🤖 Generated with Claude Code

claude and others added 30 commits February 28, 2026 23:21
dondonz and others added 24 commits March 7, 2026 21:25
# Conflicts:
#	src/test/groovy/graphql/archunit/JSpecifyAnnotationsCheck.groovy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5671 (±0) 5614 (±0) 0 (±0) 0 (±0) 57 (±0)
Java 17 5671 (±0) 5613 (±0) 0 (±0) 0 (±0) 58 (±0)
Java 21 5671 (±0) 5613 (±0) 0 (±0) 0 (±0) 58 (±0)
Java 25 5671 (±0) 5613 (±0) 0 (±0) 0 (±0) 58 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 22716 (±0) 22485 (±0) 0 (±0) 0 (±0) 231 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 28700 3127 90.2% ±0.0%
Branches 8340 1514 84.6% ±0.0%
Methods 7681 1226 86.2% ±0.0%

Changed Class Coverage (10 classes)

Class Line Branch Method
g.e.i.d.ExhaustedDataLoaderDispatchStrategy +1.2% 🟢 +7.7% 🟢 ±0.0%
g.e.i.d.PerLevelDataLoaderDispatchStrategy -0.7% 🔴 -2.0% 🔴 ±0.0%
g.i.Introspection ±0.0% +0.8% 🟢 ±0.0%
g.n.n.NormalizedField ±0.0% -0.1% 🔴 ±0.0%
g.n.n.NormalizedOperationToAstCompiler ±0.0% ±0.0% -5.8% 🔴
g.p.Parser
$1
±0.0% -8.3% 🔴 ±0.0%
g.s.i.SchemaPrinter ±0.0% -0.4% 🔴 ±0.0%
g.s.SchemaTransformer +0.1% 🟢 ±0.0% ±0.0%
g.s.u.SchemaUsageSupport
$1
+0.1% 🟢 -2.4% 🔴 ±0.0%
g.u.q.QueryGenerator ±0.0% ±0.0% -10.7% 🔴

Full HTML report: build artifact jacoco-html-report

Updated: 2026-03-07 23:03:03 UTC

dondonz and others added 4 commits March 8, 2026 08:38
TreeParallelTransformer only set List.class as a context var but never
NodeAdapter.class. After JSpecify annotations wrapped getVar() calls with
assertNotNull(), this caused test failures in TreeParallelTransformerTest
and AstTransformerTest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
"graphql.analysis.QueryReducer",
"graphql.analysis.QueryTransformer",
"graphql.analysis.QueryTraversalOptions",
"graphql.analysis.QueryTraverser",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some classes left in this diff - these are in other currently open PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup