See comment https://sourceforge.net/p/pmd/bugs/1494/#041f
Rule Set:
Design / ImmutableField
Description:
with PMD 5.7, I get following:
Private field 'id' could be made final; it is only initialized in the declaration or constructor.
The id could be later set using Setter method.
Code Sample demonstrating the issue:
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class Foo {
private String id;
public Foo(String id) {
this.id = id;
}
}
Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
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