From 600589edc39dcf55cbeb7ff3554308366aed1a83 Mon Sep 17 00:00:00 2001 From: Shautvast Date: Wed, 3 Jul 2024 14:12:07 +0200 Subject: [PATCH] rename --- .../main/java/com/github/shautvast/exceptional/Agent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/src/main/java/com/github/shautvast/exceptional/Agent.java b/agent/src/main/java/com/github/shautvast/exceptional/Agent.java index dacab06..0917ce2 100644 --- a/agent/src/main/java/com/github/shautvast/exceptional/Agent.java +++ b/agent/src/main/java/com/github/shautvast/exceptional/Agent.java @@ -22,12 +22,12 @@ public class Agent { instrumentation.addTransformer(new ClassFileTransformer() { @Override public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { - return instrumentExceptionLoggerAtThrow(className, classfileBuffer); + return injectExceptionLoggerBeforeThrow(className, classfileBuffer); } @Override public byte[] transform(Module module, ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { - return instrumentExceptionLoggerAtThrow(className, classfileBuffer); + return injectExceptionLoggerBeforeThrow(className, classfileBuffer); } }, true); } @@ -35,7 +35,7 @@ public class Agent { /* * Every throw opcode will be preceded by a call to our ExceptionLogger */ - private static byte[] instrumentExceptionLoggerAtThrow(String className, byte[] classfileBuffer) { + private static byte[] injectExceptionLoggerBeforeThrow(String className, byte[] classfileBuffer) { var classFile = ClassFile.of(); var classModel = classFile.parse(classfileBuffer); return classFile.build(classModel.thisClass().asSymbol(), classBuilder -> {