Skip to content

Commit

Permalink
Add NOP padding in case of empty return handler for delegation, which…
Browse files Browse the repository at this point in the history
… would also break use of the JDK class writer.
  • Loading branch information
raphw committed Nov 12, 2024
1 parent e53395f commit bd48e75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java
Original file line number Diff line number Diff line change
Expand Up @@ -14319,6 +14319,7 @@ public boolean isValid() {
public Size apply(MethodVisitor methodVisitor, Context implementationContext) {
Label label = new Label();
Size size = dispatcher.apply(methodVisitor, offset, label).aggregate(stackManipulation.apply(methodVisitor, implementationContext));
methodVisitor.visitInsn(Opcodes.NOP);
methodVisitor.visitLabel(label);
stackMapFrameHandler.injectIntermediateFrame(methodVisitor, Collections.<TypeDescription>emptyList());
methodVisitor.visitInsn(Opcodes.NOP);
Expand Down

0 comments on commit bd48e75

Please sign in to comment.