Skip to content

Commit

Permalink
Remove non-compliant overrides of ClassFileTransform.andThen
Browse files Browse the repository at this point in the history
  • Loading branch information
mpfaff committed Apr 18, 2024
1 parent 55dc4b6 commit 21b77a9
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,6 @@ public ResolvedTransform<ClassElement> resolve(ClassBuilder builder) {
builder.with(ce);
});
}

@Override
public ClassTransform andThen(ClassTransform next) {
if (next instanceof ClassMethodTransform cmt)
return new ClassMethodTransform(transform.andThen(cmt.transform),
mm -> filter.test(mm) && cmt.filter.test(mm));
else
return UnresolvedClassTransform.super.andThen(next);
}
}

public record ClassFieldTransform(FieldTransform transform,
Expand All @@ -142,15 +133,6 @@ public ResolvedTransform<ClassElement> resolve(ClassBuilder builder) {
builder.with(ce);
});
}

@Override
public ClassTransform andThen(ClassTransform next) {
if (next instanceof ClassFieldTransform cft)
return new ClassFieldTransform(transform.andThen(cft.transform),
mm -> filter.test(mm) && cft.filter.test(mm));
else
return UnresolvedClassTransform.super.andThen(next);
}
}

// MethodTransform
Expand Down Expand Up @@ -207,14 +189,6 @@ public ResolvedTransform<MethodElement> resolve(MethodBuilder builder) {
}
}, NOTHING, NOTHING);
}

@Override
public MethodTransform andThen(MethodTransform next) {
return (next instanceof TransformImpl.MethodCodeTransform mct)
? new TransformImpl.MethodCodeTransform(xform.andThen(mct.xform))
: UnresolvedMethodTransform.super.andThen(next);

}
}

// FieldTransform
Expand Down

0 comments on commit 21b77a9

Please sign in to comment.