Skip to content

Add Java 26 to Gradle workflow matrix#3984

Open
duanemay wants to merge 3 commits into
developfrom
standalone_tests
Open

Add Java 26 to Gradle workflow matrix#3984
duanemay wants to merge 3 commits into
developfrom
standalone_tests

Conversation

@duanemay

@duanemay duanemay commented Jul 16, 2026

Copy link
Copy Markdown
Member

Not an LTS, but good compatibility check. Otherwise this standalone test is not adding anything to the already run hsqldb tests

otherwise this is not adding anything to the already run hsqldb tests
Copilot AI review requested due to automatic review settings July 16, 2026 16:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the GitHub Actions Gradle workflow to run the UAA standalone unit-test job on both Java 25 and Java 26, increasing CI coverage across the supported JDK baseline and the next JDK release.

Changes:

  • Expand the workflow matrix to include Java 26 alongside Java 25.

@duanemay

Copy link
Copy Markdown
Member Author

java.lang.UnsupportedOperationException: Cannot define class using reflection: As of Java 26, using Unsafe is disabled by default, set net.bytebuddy.safe to true if you want to use the JVM's internal unsafe API even though it will become unsupported in the future and should be replaced by injection using method handles: net.bytebuddy.dynamic.loading.ClassInjector$UsingLookup

duanemay and others added 2 commits July 16, 2026 18:52
Java 26 disables Unsafe-based class definition by default. Mockito's
ByteBuddy-generated mock subclasses fall back to that path when
method-handle injection isn't available, which now throws
UnsupportedOperationException. Opt back in via net.bytebuddy.safe
until Mockito/ByteBuddy ship a default method-handle injection path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ByteBuddy's own exception message says "set net.bytebuddy.safe to
true if you want to use the unsafe API," but the property is actually
a safe-mode switch: true disables Unsafe-based class definition, false
keeps the legacy (Unsafe) path enabled. The prior commit set it to
"true," which does nothing on Java 26 (already the default there) and
newly broke Java 25 (previously "false" by default), producing the
same 9 XMLUnit/AssertJ proxy-generation failures on both versions.
Verified locally: full cloudfoundry-identity-server suite (4820 tests)
passes with "false" on JDK 25.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@duanemay
duanemay marked this pull request as ready for review July 17, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants