com.newrelic.weave.violation.FIELD_FINAL_ASSIGNMENT.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_FINAL_ASSIGNMENT ##
###Description###
This violation was raised because the field in the @Weave class is attempting to assign a value other than Weaver.callOriginal to a final field.
###Example###
####Original Class####
```
public class Example {
private final String finalExample = "This is final";
}
```
####Bad####
```
@Weave
public class Example {
private final String finalExample = "This doesn't work";
}
```
----------
####Good####
```
@Weave
public class Example {
private final String finalExample = Weaver.callOriginal();
}
```
© 2015 - 2024 Weber Informatics LLC | Privacy Policy