Fix Request: False positive on AvoidHardcodedConnectionConfig
Closed this issue · 1 comments
robsmorenburg commented
The following code result in Sonar issue pmd:AvoidHardcodedConnectionConfig. It does have defaults but it will read the settings from properties. Simplified code:
class Issue266 {
private final int connectTimeoutMillis;
private final int readTimeoutMillis;
Issue266(@Value("${jws.connect_timeout:1000}") int connectTimeoutMillis,
@Value("${jws.read_timeout:1000}") int readTimeoutMillis) {
this.connectTimeoutMillis = connectTimeoutMillis;
this.readTimeoutMillis = readTimeoutMillis;
}
}
jborgers commented
Checked in the fix