From 3a580be06c5c9f6af2bb13a788de968a6123b3e3 Mon Sep 17 00:00:00 2001 From: Yan Zhou Date: Mon, 8 Apr 2024 10:25:18 -0700 Subject: [PATCH] Upgrade bytebuddy and asm version for JDK 17 and JDK 21 support (#331) * Upgrade bytebuddy and asm version for JDK 17 support * bump asm and bytebuddy to support JDK 21 * fix format issue during merging with master --------- Co-authored-by: Yan Zhou Co-authored-by: Yan Zhou --- CHANGELOG.md | 4 ++++ gradle.properties | 2 +- subprojects/parseq-lambda-names/build.gradle | 10 +++++----- .../linkedin/parseq/lambda/ASMBasedTaskDescriptor.java | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97cfebbc..dbd757bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v5.1.20 +------ +* Upgrade bytebuddy and asm version for JDK 17 and JDK 21 support + v5.1.19 ------ * Explicitly set default value for TraceBuilder's ResultType to UNFINISHED to prevent null argument when building the trace in TraceBuilder. diff --git a/gradle.properties b/gradle.properties index 90bec905..b2832557 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -version=5.1.19 +version=5.1.20 group=com.linkedin.parseq org.gradle.parallel=true diff --git a/subprojects/parseq-lambda-names/build.gradle b/subprojects/parseq-lambda-names/build.gradle index 33d061b4..9eb1eddd 100644 --- a/subprojects/parseq-lambda-names/build.gradle +++ b/subprojects/parseq-lambda-names/build.gradle @@ -10,11 +10,11 @@ configurations { } dependencies { - shadow group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.10.21' - shadow group: 'net.bytebuddy', name: 'byte-buddy-dep', version: '1.10.21' - shadow group: 'org.ow2.asm', name: 'asm-tree', version: '9.0' - shadow group: 'org.ow2.asm', name: 'asm', version: '9.0' - shadow group: 'org.ow2.asm', name: 'asm-analysis', version: '9.0' + shadow group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.14.13' + shadow group: 'net.bytebuddy', name: 'byte-buddy-dep', version: '1.14.13' + shadow group: 'org.ow2.asm', name: 'asm-tree', version: '9.6' + shadow group: 'org.ow2.asm', name: 'asm', version: '9.6' + shadow group: 'org.ow2.asm', name: 'asm-analysis', version: '9.6' testCompile group: 'org.testng', name: 'testng', version: '7.3.0' } diff --git a/subprojects/parseq-lambda-names/src/main/java/com/linkedin/parseq/lambda/ASMBasedTaskDescriptor.java b/subprojects/parseq-lambda-names/src/main/java/com/linkedin/parseq/lambda/ASMBasedTaskDescriptor.java index d6dbfc65..b049acbe 100644 --- a/subprojects/parseq-lambda-names/src/main/java/com/linkedin/parseq/lambda/ASMBasedTaskDescriptor.java +++ b/subprojects/parseq-lambda-names/src/main/java/com/linkedin/parseq/lambda/ASMBasedTaskDescriptor.java @@ -134,7 +134,7 @@ static void onExit(@Advice.Argument(0) Class hostClass, @Advice.Argument(1) b .transform(new AgentBuilder.Transformer() { @Override public Builder transform(Builder builder, TypeDescription typeDescription, ClassLoader classLoader, - JavaModule module) { + JavaModule module, ProtectionDomain protectionDomain) { return builder.visit(Advice.to(AnalyzerAdvice.class).on(ElementMatchers.named("defineAnonymousClass"))); } }) @@ -271,4 +271,4 @@ public static void analyze(byte[] byteCode, ClassLoader loader) { EXECUTOR_SERVICE.submit(AnalyzerRunnable.of(byteCode, loader, e)); } } -} +} \ No newline at end of file