Then tell us:
- What language is this for?
Java - Which rule?
It’s shows up as a bug in SonarQube :
A “NullPointerException” could be thrown; “parameters” is nullable here.
And as a rule in SonarLint:
Null pointers should not be dereferenced.
- Why do you believe it’s a false-positive/false-negative?
I believe it’s a false-positive
We are using SonarQube Community Edition Version 9.9.1 (build 69595)
Also SonarLint plugin 10.3.0.77475 In Intellij IDEA.
- Reproduction:
if (isEmpty(parameters) || !Objects.equals(parameters.get(0), test))) {
if (!isEmpty(results)) { results.stream() … }
Idk if I’m doing something wrong
Thanks in advance