Skip to content

Commit a081948

Browse files
authored
Revert Java 25-EA kotlin workaround (#9499)
1 parent e9f8dc8 commit a081948

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

dd-java-agent/agent-debugger/src/test/java/com/datadog/debugger/agent/CapturingTestBase.java

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -436,29 +436,11 @@ public static Class<?> compileAndLoad(
436436
String compilerOutputDir = "/tmp/" + CapturedSnapshotTest.class.getSimpleName() + "-kotlin";
437437
args.setDestination(compilerOutputDir);
438438
args.setClasspath(System.getProperty("java.class.path"));
439-
// We are currently testing JDK 25-ea, which is not yet generally available. This is causing
440-
// Kotlin compilation issues for "25-ea" and "25". Temporarily override java.version "25-ea"
441-
// to be the latest generally available JDK version "24".
442-
// TODO: Revert this change once JDK 25 is generally available and tested.
443-
String originalJavaVersion = System.getProperty("java.version");
444-
boolean overrideEAJavaVersion =
445-
originalJavaVersion != null && originalJavaVersion.contains("-ea");
446-
ExitCode exitCode;
447-
try {
448-
if (overrideEAJavaVersion) {
449-
System.setProperty("java.version", "24");
450-
}
451-
exitCode =
452-
compiler.execImpl(
453-
new PrintingMessageCollector(System.out, MessageRenderer.WITHOUT_PATHS, true),
454-
Services.EMPTY,
455-
args);
456-
} finally {
457-
// Restore the original java.version if it was overridden (25-ea)
458-
if (overrideEAJavaVersion) {
459-
System.setProperty("java.version", originalJavaVersion);
460-
}
461-
}
439+
ExitCode exitCode =
440+
compiler.execImpl(
441+
new PrintingMessageCollector(System.out, MessageRenderer.WITHOUT_PATHS, true),
442+
Services.EMPTY,
443+
args);
462444

463445
if (exitCode.getCode() != 0) {
464446
throw new RuntimeException("Kotlin compilation failed");

0 commit comments

Comments
 (0)