Affects PMD Version:
6.20
Rule: NullAssignment
Description:
Code Sample demonstrating the issue:
public String methodOne(String one, String two) {
return "test";
}
public String methodTwo(String one, String two) {
List<String> strings = new ArrayList<>();
->> return methodOne("one", strings.isEmpty() ? null : "two");
}
Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
Programmatically
Affects PMD Version:
6.20
Rule: NullAssignment
Description:
Code Sample demonstrating the issue:
Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
Programmatically