Skip to content

Commit

Permalink
Fix Enterprise Beans bean method generation
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Pinčuk <alexander.v.pinchuk@gmail.com>
  • Loading branch information
avpinchuk committed Jul 6, 2023
1 parent fc8e524 commit 4183761
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,11 @@ private static void generateBeanMethod(ClassVisitor cv, String subClassInternalN
}

mv.visitMethodInsn(INVOKEINTERFACE, Type.getInternalName(delegateClass), methodName, methodDesc, true);
mv.visitInsn(Type.getReturnType(methodDesc).getOpcode(IRETURN));
mv.visitMaxs(varIndex, varIndex);

Type returnType = Type.getReturnType(methodDesc);

mv.visitInsn(returnType.getOpcode(IRETURN));
mv.visitMaxs(Math.max(varIndex, returnType.getSize()), varIndex);
mv.visitEnd();
}

Expand Down

0 comments on commit 4183761

Please sign in to comment.