Prevent abstract classes from going through the muzzle plugin.
This commit is contained in:
parent
4583d12b31
commit
232708e457
|
@ -13,6 +13,9 @@ public class MuzzleGradlePlugin implements Plugin {
|
|||
|
||||
@Override
|
||||
public boolean matches(final TypeDescription target) {
|
||||
if (target.isAbstract()) {
|
||||
return false;
|
||||
}
|
||||
// AutoService annotation is not retained at runtime. Check for Instrumenter.Default supertype
|
||||
boolean isInstrumenter = false;
|
||||
TypeDefinition instrumenter = null == target ? null : target.getSuperClass();
|
||||
|
@ -27,7 +30,7 @@ public class MuzzleGradlePlugin implements Plugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Builder<?> apply(Builder<?> builder, TypeDescription typeDescription) {
|
||||
public Builder<?> apply(final Builder<?> builder, final TypeDescription typeDescription) {
|
||||
return builder.visit(new MuzzleVisitor());
|
||||
}
|
||||
|
||||
|
@ -39,7 +42,7 @@ public class MuzzleGradlePlugin implements Plugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Builder<?> apply(Builder<?> builder, TypeDescription typeDescription) {
|
||||
public Builder<?> apply(final Builder<?> builder, final TypeDescription typeDescription) {
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue