Skip to content

Commit 9bb974f

Browse files
committed
fix test on jdk8
1 parent a4ae6eb commit 9bb974f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

instrumentation/apache-httpclient/apache-httpclient-4.3/testing/build.gradle.kts

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ plugins {
22
id("otel.java-conventions")
33
}
44

5+
tasks {
6+
compileJava {
7+
// when code is compiled with jdk 21 and executed with jdk 8 -parameters flag is needed to avoid
8+
// java.lang.reflect.MalformedParametersException: Invalid parameter name ""
9+
// when junit calls java.lang.reflect.Executable.getParameters() on the constructor of a
10+
// non-static nested test class
11+
options.compilerArgs.add("-parameters")
12+
}
13+
}
14+
515
dependencies {
616
api(project(":testing-common"))
717

0 commit comments

Comments
 (0)