Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit committed Nov 16, 2023
1 parent 0556b38 commit 60c9424
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,10 @@ private static void instrument(
Type returnType = Type.getReturnType(methodNode.desc);

// currently we don't support rewriting enter advice returning a primitive type
if (isEnterAdvice && !(returnType.getSort() == Type.VOID || returnType.getSort() == Type.OBJECT || returnType.getSort() == Type.ARRAY)) {
if (isEnterAdvice
&& !(returnType.getSort() == Type.VOID
|| returnType.getSort() == Type.OBJECT
|| returnType.getSort() == Type.ARRAY)) {
context.disableReturnTypeChange();
}
// context is shared by enter and exit advice, if entry advice was rejected don't attempt to
Expand Down Expand Up @@ -769,9 +772,9 @@ public void visitInsn(int opcode) {

/**
* If method is annotated with {@link Advice.OnMethodEnter} or {@link Advice.OnMethodExit} set
* {@code inline} attribute on the annotation to {@code false}.
* If method is annotated with {@link Advice.OnMethodEnter} and has {@code skipOn} attribute set
* {@code skipOnIndex} attribute on the annotation to {@code 0}.
* {@code inline} attribute on the annotation to {@code false}. If method is annotated with {@link
* Advice.OnMethodEnter} and has {@code skipOn} attribute set {@code skipOnIndex} attribute on the
* annotation to {@code 0}.
*/
private static MethodVisitor delegateAdvice(TransformationContext context, MethodVisitor target) {
return new MethodVisitor(Opcodes.ASM9, target) {
Expand Down

0 comments on commit 60c9424

Please sign in to comment.