Skip to content

Commit

Permalink
Merge pull request #518 from Nizernizer/fix/jsr-ret-exception
Browse files Browse the repository at this point in the history
fix: jsr/ret exception.
  • Loading branch information
lostsnow committed May 4, 2023
2 parents 8d5cb18 + 6143994 commit 0b3962a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,18 @@ public MethodVisitor visitMethod(final int access, final String name, final Stri
final String signature, final String[] exceptions) {
MethodVisitor mv = super.visitMethod(access, name, descriptor, signature, exceptions);
if (Modifier.isInterface(access) || Modifier.isAbstract(access) || "<clinit>".equals(name)) {
if (this.classVersion <= Opcodes.V1_6) {
mv = new JSRInlinerAdapter(mv, access, name, descriptor, signature, exceptions);
}
return mv;
}

if (this.policy.isBlacklistHooks(this.context.getClassName())
&& !this.policy.isIgnoreBlacklistHooks(this.context.getClassName())
&& !this.policy.isIgnoreInternalHooks(this.context.getClassName())) {
if (this.classVersion <= Opcodes.V1_6) {
mv = new JSRInlinerAdapter(mv, access, name, descriptor, signature, exceptions);
}
return mv;
}

Expand Down

0 comments on commit 0b3962a

Please sign in to comment.