Skip to content

Upgrade byte-buddy to latest version 1.17.5 #8729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
'''
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/test/groovy/InstrumentPluginTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<? extends AnnotationDescription> 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())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ 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
Expand All @@ -60,7 +60,7 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down