rename
This commit is contained in:
parent
a73acb9ddb
commit
600589edc3
1 changed files with 3 additions and 3 deletions
|
|
@ -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 -> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue