Skip to content

Commit

Permalink
filter out bridge methods when instrumenting methods
Browse files Browse the repository at this point in the history
  • Loading branch information
evanchooly committed Mar 6, 2024
1 parent d20df91 commit 7bb9df3
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.MethodNode;

/** Stores probe location definition */
Expand Down Expand Up @@ -112,7 +113,8 @@ public boolean isMethodMatching(MethodNode methodNode, ClassFileLines classFileL
String targetName = methodNode.name;
String targetMethodDescriptor = methodNode.desc;
// try exact matching: name + FQN signature
if (!isMethodNameMatching(targetName)) {
if (!isMethodNameMatching(targetName)
|| ((methodNode.access & Opcodes.ACC_BRIDGE) == Opcodes.ACC_BRIDGE)) {
return false;
}
if (signature == null) {
Expand Down

0 comments on commit 7bb9df3

Please sign in to comment.