Skip to content

Migrate to Java 24+ compatible security APIs and add Java 25 to CI #8483

Merged
rzo1 merged 2 commits into
masterfrom
java25
Apr 2, 2026
Merged

Migrate to Java 24+ compatible security APIs and add Java 25 to CI #8483
rzo1 merged 2 commits into
masterfrom
java25

Conversation

@rzo1

@rzo1 rzo1 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
  • Replace Subject.doAs(), Subject.getSubject(AccessControlContext), AccessController.getContext(), and System.getSecurityManager() — all removed in Java 24 with runtime-dispatched compatibility shims that work on Java 17 through 25+.
  • Introduce SubjectCompat utility with MethodHandle-based dispatch: currentSubject() maps to Subject.current() (18+) or Subject.getSubject(AccessController.getContext()) (17); doAs() maps to Subject.callAs() (18+) or Subject.doAs() (17).
  • Migrate all 12 removed-API call sites across 8 files.
  • Consolidate existing ReqContext MethodHandle shim into SubjectCompat.
  • Remove dead SecurityManager code in NettyRenameThreadFactory.
  • Add Java 25 to the GitHub Actions CI matrix.

rzo1 added 2 commits April 1, 2026 19:31
…8456)

  - Replace Subject.doAs(), Subject.getSubject(AccessControlContext),  AccessController.getContext(), and System.getSecurityManager() — all
  removed in Java 24 with runtime-dispatched compatibility shims that
  work on Java 17 through 25+.
  - Introduce SubjectCompat utility with MethodHandle-based dispatch:
    currentSubject() maps to Subject.current() (18+) or
    Subject.getSubject(AccessController.getContext()) (17);
    doAs() maps to Subject.callAs() (18+) or Subject.doAs() (17).
  - Migrate all 12 removed-API call sites across 8 files.
  - Consolidate existing ReqContext MethodHandle shim into SubjectCompat.
  - Remove dead SecurityManager code in NettyRenameThreadFactory.
  - Add Java 25 to the GitHub Actions CI matrix.
@rzo1 rzo1 added this to the 2.8.6 milestone Apr 1, 2026
@rzo1 rzo1 assigned jnioche, reiabreu and avermeer and unassigned jnioche, reiabreu and avermeer Apr 1, 2026
@rzo1 rzo1 requested review from avermeer, jnioche and reiabreu April 1, 2026 19:12
@rzo1 rzo1 added enhancement java Pull requests that update Java code labels Apr 1, 2026
@rzo1 rzo1 merged commit 96f65ac into master Apr 2, 2026
15 checks passed
@jnioche jnioche deleted the java25 branch April 27, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants