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

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

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

###Description###

This violation was raised because the field in the @Weave class is attempting to match a non-static field with a static field.

###Example###

####Original Class####
```
public class Example {

    private static String staticExample = "This is static";

}
```


####Bad####
```
@Weave
public class Example {

    private String staticExample = Weaver.callOriginal(); // Causes violation

}
```

----------

####Good####
```
@Weave
public class Example {

    private static String staticExample = Weaver.callOriginal();

}
```




© 2015 - 2024 Weber Informatics LLC | Privacy Policy