diff --git a/build.gradle b/build.gradle index 8629065f394..bae798ee109 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ plugins { id 'pl.allegro.tech.build.axion-release' version '1.14.4' id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' - id "com.github.johnrengelman.shadow" version "7.1.2" apply false + id "com.github.johnrengelman.shadow" version "8.1.1" apply false id "me.champeau.jmh" version "0.7.0" apply false id 'org.gradle.playframework' version '0.13' apply false id 'info.solidsoft.pitest' version '1.9.11' apply false diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 536853fc847..5c95fd38756 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -30,7 +30,7 @@ dependencies { implementation(gradleApi()) implementation(localGroovy()) - implementation("net.bytebuddy", "byte-buddy-gradle-plugin", "1.15.11") + implementation("net.bytebuddy", "byte-buddy-gradle-plugin", "1.17.5") implementation("org.eclipse.aether", "aether-connector-basic", "1.1.0") implementation("org.eclipse.aether", "aether-transport-http", "1.1.0") diff --git a/buildSrc/call-site-instrumentation-plugin/build.gradle.kts b/buildSrc/call-site-instrumentation-plugin/build.gradle.kts index 1148173b096..9495c7884d4 100644 --- a/buildSrc/call-site-instrumentation-plugin/build.gradle.kts +++ b/buildSrc/call-site-instrumentation-plugin/build.gradle.kts @@ -36,7 +36,7 @@ dependencies { implementation("org.ow2.asm", "asm-tree", "9.8") implementation("com.github.javaparser", "javaparser-symbol-solver-core", "3.24.4") - testImplementation("net.bytebuddy", "byte-buddy", "1.15.11") + testImplementation("net.bytebuddy", "byte-buddy", "1.17.5") testImplementation("org.spockframework", "spock-core", "2.0-groovy-3.0") testImplementation("org.objenesis", "objenesis", "3.0.1") testImplementation("org.codehaus.groovy", "groovy-all", "3.0.17") diff --git a/buildSrc/src/test/groovy/CallSiteInstrumentationPluginTest.groovy b/buildSrc/src/test/groovy/CallSiteInstrumentationPluginTest.groovy index 56edb291f9d..6adb661f0f4 100644 --- a/buildSrc/src/test/groovy/CallSiteInstrumentationPluginTest.groovy +++ b/buildSrc/src/test/groovy/CallSiteInstrumentationPluginTest.groovy @@ -27,7 +27,7 @@ class CallSiteInstrumentationPluginTest extends Specification { } dependencies { - implementation group: 'net.bytebuddy', name: 'byte-buddy', version: '1.15.11' + implementation group: 'net.bytebuddy', name: 'byte-buddy', version: '1.17.5' implementation group: 'com.google.auto.service', name: 'auto-service-annotations', version: '1.0-rc7' } ''' diff --git a/buildSrc/src/test/groovy/InstrumentPluginTest.groovy b/buildSrc/src/test/groovy/InstrumentPluginTest.groovy index eb79bf833b2..fb9c6e35f1e 100644 --- a/buildSrc/src/test/groovy/InstrumentPluginTest.groovy +++ b/buildSrc/src/test/groovy/InstrumentPluginTest.groovy @@ -23,7 +23,7 @@ class InstrumentPluginTest extends Specification { } dependencies { - compileOnly group: 'net.bytebuddy', name: 'byte-buddy', version: '1.15.11' // just to build TestPlugin + compileOnly group: 'net.bytebuddy', name: 'byte-buddy', version: '1.17.5' // just to build TestPlugin } apply plugin: 'instrument' diff --git a/dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/iast/IastPostProcessorFactory.java b/dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/iast/IastPostProcessorFactory.java index 2cfd9ab9ec5..13b1f4eda4a 100644 --- a/dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/iast/IastPostProcessorFactory.java +++ b/dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/iast/IastPostProcessorFactory.java @@ -21,6 +21,7 @@ import datadog.trace.api.iast.telemetry.IastMetricCollector; import datadog.trace.api.iast.telemetry.Verbosity; import java.util.Collections; +import java.util.List; import javax.annotation.Nonnull; import net.bytebuddy.asm.Advice; import net.bytebuddy.description.annotation.AnnotationDescription; @@ -64,8 +65,8 @@ public IastPostProcessorFactory(final Verbosity verbosity) { @Override public @Nonnull Advice.PostProcessor make( - @Nonnull final MethodDescription.InDefinedShape advice, final boolean exit) { - for (final AnnotationDescription annotation : advice.getDeclaredAnnotations()) { + List annotations, TypeDescription returnType, boolean exit) { + for (final AnnotationDescription annotation : annotations) { final TypeDescription typeDescr = annotation.getAnnotationType(); final PackageDescription pkgDescr = typeDescr.getPackage(); if (pkgDescr != null && IAST_ANNOTATIONS_PKG.equals(pkgDescr.getName())) { diff --git a/dd-java-agent/agent-tooling/src/test/groovy/datadog/trace/agent/tooling/iast/IastPostProcessorFactoryTest.groovy b/dd-java-agent/agent-tooling/src/test/groovy/datadog/trace/agent/tooling/iast/IastPostProcessorFactoryTest.groovy index 8d82c43bd8c..c2b4677b124 100644 --- a/dd-java-agent/agent-tooling/src/test/groovy/datadog/trace/agent/tooling/iast/IastPostProcessorFactoryTest.groovy +++ b/dd-java-agent/agent-tooling/src/test/groovy/datadog/trace/agent/tooling/iast/IastPostProcessorFactoryTest.groovy @@ -40,7 +40,8 @@ class IastPostProcessorFactoryTest extends DDSpecification { final method = new MethodDescription.ForLoadedMethod(NonAnnotatedAdvice.getDeclaredMethod('exit')) when: - final result = IastPostProcessorFactory.INSTANCE.make(method, true) + final result = IastPostProcessorFactory.INSTANCE.make( + method.getDeclaredAnnotations(), method.getReturnType().asErasure(), true) then: result == Advice.PostProcessor.NoOp.INSTANCE @@ -60,7 +61,8 @@ class IastPostProcessorFactoryTest extends DDSpecification { final context = Mock(Implementation.Context) when: - final postProcessor = IastPostProcessorFactory.INSTANCE.make(method, true) + final postProcessor = IastPostProcessorFactory.INSTANCE.make( + method.getDeclaredAnnotations(), method.getReturnType().asErasure(), true) then: postProcessor != Advice.PostProcessor.NoOp.INSTANCE diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2bcfac6d39b..135aea11b0e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ spock = "2.3-groovy-3.0" groovy = "3.0.17" junit5 = "5.9.2" logback = "1.2.3" -bytebuddy = "1.15.11" +bytebuddy = "1.17.5" scala = "2.11.12" # Last version to support Java 7 (2.12+ require Java 8+) scala211 = "2.11.12" scala212 = "2.12.18"