From 4aeba2fcefe826e2bf12e3ce0e8b4d85456ab6f0 Mon Sep 17 00:00:00 2001 From: Bruce Bujon Date: Mon, 23 Nov 2026 09:27:40 +0100 Subject: [PATCH 1/3] Test JDK 28 EA as a non-default JVM Add EA JDK 28 to the main, arm64 and latest-dep test matrices as a non-default JVM. Temporary changes are tagged with JDK-28-EA TODOs. Co-Authored-By: Claude Opus 5.5 --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cce742e9e7b..89d1554385b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -115,6 +115,7 @@ workflow: - "17" - "21" - "25" + - "28" # TODO(JDK-28-EA): remove after GA (tip will move to 28) - "oracle8" - "zulu8" - "semeru8" @@ -1079,7 +1080,7 @@ test_inst_latest: CACHE_TYPE: "latestdep" parallel: matrix: - - testJvm: ["8", "17", "21", "25", "tip"] + - testJvm: ["8", "17", "21", "25", "28", "tip"] # TODO(JDK-28-EA): remove 28 after GA (tip will move to 28) # Gitlab doesn't support "parallel" and "parallel:matrix" at the same time # This emulates "parallel" by including it in the matrix CI_SPLIT: [ "1/6", "2/6", "3/6", "4/6", "5/6", "6/6"] @@ -1092,7 +1093,7 @@ test_inst_latest_arm64: CACHE_TYPE: "latestdep" parallel: matrix: - - testJvm: ["17", "21", "25", "tip"] + - testJvm: ["17", "21", "25", "28", "tip"] # TODO(JDK-28-EA): remove 28 after GA (tip will move to 28) # Gitlab doesn't support "parallel" and "parallel:matrix" at the same time # This emulates "parallel" by including it in the matrix CI_SPLIT: [ "1/6", "2/6", "3/6", "4/6", "5/6", "6/6"] From 30c2aca69e337097a8371a3e9f0dceeec26cc2ae Mon Sep 17 00:00:00 2001 From: Bruce Bujon Date: Mon, 23 Nov 2026 10:57:49 +0100 Subject: [PATCH 2/3] Allow Objenesis on JDK 28 and skip Maven smoke tests [ci: ARM64, NON_DEFAULT_JVMS] JDK 28 rejects ReflectionFactory.newConstructorForSerialization for non-serializable classes, which Objenesis (Mockito, Spock mocks) relies on. Re-enable it for test JVMs 28+ with -Djdk.reflect.allowNonSerializableConstruction=true, and skip the Maven smoke tests on JDK 28 as was done for previous EA JDKs. Co-Authored-By: Claude Opus 5.5 --- .../plugin/testJvmConstraints/TestJvmConstraintsPlugin.kt | 7 +++++++ .../src/test/java/datadog/smoketest/MavenSmokeTest.java | 1 + 2 files changed, 8 insertions(+) diff --git a/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmConstraintsPlugin.kt b/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmConstraintsPlugin.kt index 59989ae4338..1ef9a091173 100644 --- a/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmConstraintsPlugin.kt +++ b/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmConstraintsPlugin.kt @@ -162,6 +162,13 @@ class TestJvmConstraintsPlugin : Plugin { extension.allowReflectiveAccessToJdk ) + // TODO(JDK-28-EA): remove once Objenesis (Mockito, Spock mocks) no longer needs it. + // Java 28+ rejects ReflectionFactory.newConstructorForSerialization for non-serializable classes. + conditionalJvmArgs( + JavaVersion.toVersion(28), + listOf("-Djdk.reflect.allowNonSerializableConstruction=true") + ) + // Fix for Linux arm64 ByteBuddy error: // "Could not self-attach to current VM using external process" if (HostPlatform.isLinuxArm64()) { diff --git a/dd-smoke-tests/maven/src/test/java/datadog/smoketest/MavenSmokeTest.java b/dd-smoke-tests/maven/src/test/java/datadog/smoketest/MavenSmokeTest.java index 83a46ad0721..4509df22613 100644 --- a/dd-smoke-tests/maven/src/test/java/datadog/smoketest/MavenSmokeTest.java +++ b/dd-smoke-tests/maven/src/test/java/datadog/smoketest/MavenSmokeTest.java @@ -79,6 +79,7 @@ public static boolean disabledOnIbm8() { @BeforeEach void resetMockBackend() { assumeFalse(JavaVirtualMachine.isJavaVersion(27), "JDK 27 TODO: address failing test"); + assumeFalse(JavaVirtualMachine.isJavaVersion(28), "TODO(JDK-28-EA): address failing test"); mockBackend.reset(); } From e933da58044e757b71e5f5a2734783af4f716f80 Mon Sep 17 00:00:00 2001 From: Bruce Bujon Date: Mon, 23 Nov 2026 12:36:56 +0100 Subject: [PATCH 3/3] Cap JSP 2.3 tests at JDK 27 [ci: ARM64, NON_DEFAULT_JVMS] The JDT compiler bundled with Tomcat 7.0.37 Jasper cannot read Java 28 class files, so the generated JSP sources fail to compile. latestDepTest (Tomcat 9) keeps covering JDK 28. Co-Authored-By: Claude Opus 5.5 --- dd-java-agent/instrumentation/jsp-2.3/build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dd-java-agent/instrumentation/jsp-2.3/build.gradle b/dd-java-agent/instrumentation/jsp-2.3/build.gradle index fc892add233..cb1793fc41a 100644 --- a/dd-java-agent/instrumentation/jsp-2.3/build.gradle +++ b/dd-java-agent/instrumentation/jsp-2.3/build.gradle @@ -13,6 +13,13 @@ muzzle { addTestSuiteForDir('latestDepTest', 'test') +tasks.named("test") { + testJvmConstraints { + // TODO(JDK-28-EA): the JDT compiler of Tomcat 7.0.37 Jasper cannot read Java 28 class files + maxJavaVersion = JavaVersion.VERSION_27 + } +} + dependencies { // compiling against tomcat 7.0.20 because there seems to be some issues with Tomcat's dependency < 7.0.20 compileOnly group: 'org.apache.tomcat', name: 'tomcat-jasper', version: '7.0.20'