Skip to content

Is there's ignore some class totally config #498

@BerserkGuts

Description

@BerserkGuts

I use byte-buddy and proguard same time and found it with occur exception below
ByteBuddyEnhanceListener onError: com.mypath.ApiController: -java.lang.IllegalStateException: (Ljava/lang/Object;Ljava/lang/reflect/Method;)Z dropped 2 implicit frames at net.bytebuddy.asm.Advice$StackMapFrameHandler$Default.translateFrame(Advice.java:7137) at net.bytebuddy.asm.Advice$StackMapFrameHandler$Default$WithPreservedArguments.translateFrame(Advice.java:7513) at net.bytebuddy.asm.Advice$StackMapFrameHandler$Default$ForAdvice.translateFrame(Advice.java:7904) at net.bytebuddy.asm.Advice$Dispatcher$Inlining$CodeTranslationVisitor.visitFrame(Advice.java:10603) at net.bytebuddy.jar.asm.MethodVisitor.visitFrame(MethodVisitor.java:313) at net.bytebuddy.jar.asm.ClassReader.readCode(ClassReader.java:2074) at net.bytebuddy.jar.asm.ClassReader.readMethod(ClassReader.java:1512) at net.bytebuddy.jar.asm.ClassReader.accept(ClassReader.java:745) at net.bytebuddy.utility.AsmClassReader$ForAsm.accept(AsmClassReader.java:290) at net.bytebuddy.asm.Advice$Dispatcher$Inlining$Resolved$AdviceMethodInliner.apply(Advice.java:9613) at net.bytebuddy.asm.Advice$AdviceVisitor.onAfterExceptionTable(Advice.java:11919) at net.bytebuddy.utility.visitor.ExceptionTableSensitiveMethodVisitor.considerEndOfExceptionTable(ExceptionTableSensitiveMethodVisitor.java:49)
I know the reason is that byte-buddy check the frames of Advice class,the Advice class stack frames was changed by proguard. I filter it by
-keep class com.mypath.UniversalAdvice {*;}
the UniversalAdvice class's name and method is not obfuscated but the stack frame is still not same from origin. Then I overwrite this class file with normal compiled class file manually then it works fine.
So is there any config to not process some class at all to avoid these problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions