Skip to content

Update jdk-21 from typetools/jdk (3.53.0) and master - #159

Merged
wmdietl merged 90 commits into
jdk-21from
jdk-21-typetools-3.53.0
Oct 3, 2026
Merged

wmdietl merged 90 commits into
jdk-21from
jdk-21-typetools-3.53.0

Conversation

@wmdietl

@wmdietl wmdietl commented Oct 2, 2026

Copy link
Copy Markdown
Member

Brings typetools/jdk up to the state of the Checker Framework 3.53.0 release (bb3fec71bc7, based on JDK 21 since 2025-12-17) and the changes of master since jdk-21 was created into the jdk-21 branch. Please merge with a merge commit; the three commits are two merges and a removal.

Commits

  1. Merge commit bb3fec71bc7 of typetools/jdk. 78 files conflicted, and I resolved the hunks by rule: @AnnotatedFor lists take the union of the checker names (this repository adds "initialization"); annotations that only this repository has are kept; code and annotations that conflict with typetools' newer OpenJDK 21 sources take typetools' side. The qualifier copies are the files of the EISOP Checker Framework, which also adds four qualifiers this branch lacked (EnsuresInitialized, ParametricTypeVariableUseQualifier, ProgrammaticDefaultLocations, UnannotatedFor). checker-qual.jar stays removed.
  2. Remove the @SideEffectsOnly annotations (the qualifier and its 94 uses). The Checker Framework has no such qualifier; it came with typetools' Side Effects Only Checker work, which this branch had inherited in 2024. An annotated JDK file that uses an unknown annotation is ignored in its entirety, and the binary stub generator cannot read it, so master never had these. Drop this commit if you want to keep them.
  3. Merge branch master into jdk-21. 24 files conflicted (about 40 hunks). The JDK 21 code of this branch stays and master's annotations win where only annotations differ (Map, Queue, the blocking queues; @AnnotatedFor on MethodHandle and VarHandle; the @NonNull type argument of Optional#stream).

Tested

With this tree as the annotated JDK (-PannotatedJdkHome=...), the Checker Framework 3.53.0 import branch (eisop/checker-framework#2197) passes the Nullness, Initialization, Index, Lock, Interning and Resource Leak test suites, and the binary stub generation succeeds. Before step 3 the Nullness suite failed in IsEmptyPoll (the Queue/Deque emptiness annotations of master were missing); with it all pass. I have not built the JDK itself, and GitHub Actions are disabled on this branch.

Notes

  • README.md keeps typetools' text about its repository layout, except for the link to the Checker Framework.
  • master stays on JDK 17; which branch becomes the default is a separate decision.

🤖 Generated with Claude Code

wmdietl and others added 30 commits December 20, 2024 12:40
wmdietl and others added 21 commits October 1, 2026 07:16
The qualifier files in this repository are identical to the files in the
EISOP Checker Framework, which are formatted in the AOSP style and contain
the changes of the typetools 3.50.0 release.  Take the files from there,
including the new GrowOnly and shrink qualifiers.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GW8C4XvQcY7RQkVAqStDB6
…dk-21

Take the changes of typetools/jdk up to the Checker Framework 3.53.0 release.
typetools/jdk is based on JDK 21 since 2025-12-17.  Resolution of the conflicts:

* @AnnotatedFor lists contain the union of the checker names, keeping the
  "initialization" that this repository adds.
* Annotations that only this repository has are kept; code and annotations
  that conflict with typetools' newer OpenJDK 21 sources take typetools' side.
* The qualifier copies are those of the EISOP Checker Framework, including
  EnsuresInitialized, ParametricTypeVariableUseQualifier,
  ProgrammaticDefaultLocations and UnannotatedFor, which this branch lacked.
* checker-qual.jar stays removed, and azure-pipelines.yml lives in .azure/.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The Checker Framework does not have the @SideEffectsOnly qualifier (it comes
from typetools' Side Effects Only Checker work), and the master branch of this
repository does not use it.  An annotated JDK file that uses an unknown
annotation is ignored in its entirety, and the binary stub generator cannot read
the qualifier, so remove the qualifier and its 94 uses, as in master.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Bring the changes of master since the creation of jdk-21 (the Checker Framework
annotations of this repository and the typetools changes that master took)
into jdk-21.  Conflicts take the JDK 21 text of this branch and the
annotations of master:

* The JDK 21 code of ClassDesc, MethodTypeDesc, MethodHandle, VarHandle,
  Collections, Optional, ProcessEnvironment, RequestPublishers and the BCEL
  files stays, with master's @AnnotatedFor({"nullness"}) on MethodHandle and
  VarHandle and its @nonnull type argument on Optional#stream.
* Map, Queue, ArrayBlockingQueue, LinkedTransferQueue and SynchronousQueue take
  master's annotations (they differ only in annotations).
* The Azure pipeline, the Makefile and the README keep the JDK 21 versions.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 04:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

wmdietl and others added 2 commits October 2, 2026 00:58
Resolving the merge of master kept both the @pure that this branch has and the
one that master has on three methods, separated by a comment, so javac rejects
them ("Pure is not a repeatable annotation interface").

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
wmdietl and others added 2 commits October 2, 2026 19:07
The Checker Framework master formatted its Javadoc with google-java-format
1.36.1, which removes two blank comment lines here; the JDK consistency check
requires identical qualifier files.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Files.java imported Nullable twice instead of CFComment, and Objects.requireNonNull
had @ForceInline twice ("ForceInline is not a repeatable annotation interface").
Both came from resolving the merge of master.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@wmdietl
wmdietl merged commit 6af351a into jdk-21 Oct 3, 2026
16 checks passed
@wmdietl
wmdietl deleted the jdk-21-typetools-3.53.0 branch October 3, 2026 00:55
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.

7 participants