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

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

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

###Description###

This violation was raised because the @Weave class attempted to add a constructor that doesn't exist in the original class.

###Example###

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

    private String exampleValue;

    public Example(String exampleValue) {
        this.exampleValue = exampleValue;
    }

}
```


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

    private int someValue;

    // This constructor doesn't exist in the original class
    public Example(int someValue) {
        this.someValue = someValue;
    }

}
```

----------

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

    public Example(String exampleValue) {
        
    }

}
```




© 2015 - 2024 Weber Informatics LLC | Privacy Policy