All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.newrelic.weave.violation.METHOD_BASE_CONCRETE_WEAVE.md Maven / Gradle / Ivy

There is a newer version: 8.17.0
Show newest version
## METHOD_BASE_CONCRETE_WEAVE ##

###Description###

This violation was raised because the @Weave class is trying to weave a method on a class that is implemented in a superclass. It is only possible to weave methods that are implemented in a class, not methods from its superclass.

###Example###

####Original Class####
```
public abstract class ExampleParent {

    public void concreteMethod() {
    
    }

}
```

```
public abstract class Example extends ExampleParent {

    public void anotherConcreteMethod() {
    
    }

}
```


####Bad####
```
@Weave(type = MatchType.BaseClass)
public class Example {

    public void concreteMethod() {
        // we can't weave this because it's implemented in ExampleParent and may not be implemented in concrete subclasses
    }

}
```




© 2015 - 2024 Weber Informatics LLC | Privacy Policy