Skip to content

Commit 7acf122

Browse files
committed
fix: Fix muzzle detected that compiler generated an invokeinterface for getClass on HttpRequest
Instead, the byte code is now an invokevirtual on Object as the javac in JDK8 does
1 parent b814b8b commit 7acf122

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dd-java-agent/instrumentation/liberty-23/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ configurations.webappRuntimeClasspath {
6262
exclude group: 'ch.qos.logback', module: 'logback-classic'
6363
}
6464

65+
tasks.named("compileJava") {
66+
configureCompiler(
67+
it,
68+
8,
69+
JavaVersion.VERSION_1_8,
70+
"Modern javac compiler use `INVOKEINTERFACE` bytecode to call `getClass` on \"com/ibm/wsspi/http/HttpRequest\", rather than," +
71+
"`INVOKEVIRTUAL` byte code to call `getClass` on \"java/lang/Object\", this fails in Muzzle."
72+
)
73+
}
74+
6575
//unzips the dependencies from the 'zipped' configuration so 'compileOnly' can reference it
6676
tasks.register('installOpenLibertyDeps', Copy) {
6777
def extractDir = "${buildDir}/openliberty-jars"

0 commit comments

Comments
 (0)