Rule: ImmutableField
Given a simple class like:
import lombok.Setter; public class Junk { @Setter private String value = "abc"; public String something() { return "blah" + value; } }
PMD 6.52.0 will report "Private field 'value' could be made final; it is only initialized in the declaration or constructor." This is a false positive because there is a generated setValue(String)
method that can modify value
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4