Skip to content

Commit 4ce108a

Browse files
committed
fix: Workaround for Oracle 1.8 JDK bug
1 parent 1c2d839 commit 4ce108a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

dd-trace-core/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,9 @@ jmh {
101101
jmhVersion = libs.versions.jmh.get()
102102
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE
103103
}
104+
105+
tasks.named("compileJava", JavaCompile) {
106+
// Ensure that parameter names are available at runtime for reflection
107+
// to prevent a bug similar to JDK-8170063 JDK-8058322, maybe JDK-8341145 in Oracle 8
108+
options.compilerArgs += ['-parameters']
109+
}

utils/test-utils/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ dependencies {
1717
compileOnly(libs.logback.core)
1818
compileOnly(libs.logback.classic)
1919
}
20+
21+
tasks.compileJava {
22+
// Ensure that parameter names are available at runtime for reflection
23+
// to prevent a bug similar to JDK-8170063 JDK-8058322, maybe JDK-8341145 in Oracle 8
24+
options.compilerArgs.add("-parameters")
25+
}

0 commit comments

Comments
 (0)