ppkarwasz commented on issue #2769:
URL:
https://github.com/apache/logging-log4j2/issues/2769#issuecomment-2463841345
I thought rather to keep the methods as they are and add logic to
`PluginProcessor` to issue a **WARNING** instead of an error in this case:
```java
// This setter has the wrong return type
@SuppressWarnings("log4j.return.type")
public void setBandwidth(final int bandwidth) {
this.bandwidth = bandwidth;
}
@SuppressWarnings("log4j.return.type")
public void setConnectionTime(final int connectionTime) {
this.connectionTime = connectionTime;
}
@SuppressWarnings("log4j.return.type")
public void setLatency(final int latency) {
this.latency = latency;
}
```
This way:
- we don't get compilation errors for these 3 known problematic setters.
- we still get compilation errors if we accidentally add a `void` setter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]