com.newrelic.weave.violation.METHOD_SYNTHETIC_WEAVE_ILLEGAL.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.
## METHOD_SYNTHETIC_WEAVE_ILLEGAL ##
###Description###
This violation was raised because the @Weave class is attempting to match a synthetic method.
###Example###
####Original Class####
```
public class Example {
private static String privateField = "I am private don't access me!!";
public void methodThatUsesInnerClassToAccessPrivateField() {
new Runnable() {
@Override
public void run() {
privateField = "I accessed the private field!";
}
}.run();
}
}
```
####Bad####
```
@Weave
public class Example {
// This is not allowed
public String access$002() {
return Weaver.callOriginal();
}
}
```
© 2015 - 2024 Weber Informatics LLC | Privacy Policy