com.newrelic.weave.violation.FIELD_PRIVATE_BASE_CLASS_MATCH.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of newrelic-weaver Show documentation
Show all versions of newrelic-weaver Show documentation
The Weaver of the Java agent.
## FIELD_PRIVATE_BASE_CLASS_MATCH ##
###Description###
This violation was raised because the @Weave class is a base class match and references a private field from the original class which child classes will not have access to.
###Example###
####Original Class####
```
public class Example {
private String exampleField = "This is private";
}
```
####Bad####
```
@Weave(type = MatchType.BaseClass)
public class Example {
// Child classes will not be able to access this
private String exampleField = Weaver.callOriginal();
}
```
© 2015 - 2024 Weber Informatics LLC | Privacy Policy