Apply formatting

This commit is contained in:
Tyler Benson 2019-04-30 10:08:58 -07:00
parent eeaa27af83
commit 1b38fcc8b4
3 changed files with 10 additions and 6 deletions

View File

@ -41,9 +41,10 @@ public class ExceptionHandlers {
final Label logEnd = new Label(); final Label logEnd = new Label();
final Label eatException = new Label(); final Label eatException = new Label();
final Label handlerExit = new Label(); final Label handlerExit = new Label();
// Frames are only meaningful for class files in version 6 or later. // Frames are only meaningful for class files in version 6 or later.
final boolean frames = context.getClassFileVersion().isAtLeast(ClassFileVersion.JAVA_V6); final boolean frames =
context.getClassFileVersion().isAtLeast(ClassFileVersion.JAVA_V6);
mv.visitTryCatchBlock(logStart, logEnd, eatException, "java/lang/Throwable"); mv.visitTryCatchBlock(logStart, logEnd, eatException, "java/lang/Throwable");

View File

@ -621,7 +621,8 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
getFieldAccessorInterface(keyClassName, contextClassName); getFieldAccessorInterface(keyClassName, contextClassName);
private final String accessorInterfaceInternalName = accessorInterface.getInternalName(); private final String accessorInterfaceInternalName = accessorInterface.getInternalName();
private final String instrumentedTypeInternalName = instrumentedType.getInternalName(); private final String instrumentedTypeInternalName = instrumentedType.getInternalName();
private final boolean frames = implementationContext.getClassFileVersion().isAtLeast(ClassFileVersion.JAVA_V6); private final boolean frames =
implementationContext.getClassFileVersion().isAtLeast(ClassFileVersion.JAVA_V6);
@Override @Override
public MethodVisitor visitMethod( public MethodVisitor visitMethod(

View File

@ -47,13 +47,15 @@ public class MuzzleVisitor implements AsmVisitorWrapper {
MethodList<?> methods, MethodList<?> methods,
int writerFlags, int writerFlags,
int readerFlags) { int readerFlags) {
return new InsertSafetyMatcher(classVisitor, implementationContext.getClassFileVersion().isAtLeast(ClassFileVersion.JAVA_V6)); return new InsertSafetyMatcher(
classVisitor,
implementationContext.getClassFileVersion().isAtLeast(ClassFileVersion.JAVA_V6));
} }
public static class InsertSafetyMatcher extends ClassVisitor { public static class InsertSafetyMatcher extends ClassVisitor {
private final boolean frames; private final boolean frames;
private String instrumentationClassName; private String instrumentationClassName;
private Instrumenter.Default instrumenter; private Instrumenter.Default instrumenter;