Lehtto
(DINQUER Alexis)
1
Hi,
I’m running SonarLint on IntelliJ (plugin version: 5.1.0.34721, IntelliJ version 2021.2 Ultimate Edition)
Here an example of the issue:
if (o instanceof byte[] arrayByte) {
doSomethingWithByte(arrayByte);
} else if (o instanceof char[] arrayChar) {
doSomethingWithChar(arrayChar);
}
The error is reported on second condition if (o instanceof char[] arrayChar)
because it is considered as always false.
1 Like
Quentin
(Quentin Jaquier)
3
Hello @Lehtto, and welcome to the community!
Indeed, this is a false positive, thanks for taking the time to report it. Ticket created: SONARJAVA-3986.
Have a nice day.
Quentin
1 Like
Lehtto
(DINQUER Alexis)
5
Hi @Quentin
Thank you for your support and your time.
system
(system)
Closed
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.