Java Linter false positive for rule (java:S3878)

Description
The plugin SonarLint for Java code in eclipse generate a false positive rule (java:S3878)

Version

  • SonarLint 5.3.0
  • Java 8

Code used for reproduction
java.nio.file.Files.write(Paths.get("myPath"), new byte[0]);
java.nio.file.Files.write(Paths.get("myPath"), new byte[] { ' ', 'A', 'B', 'C' });

SonarLint message
Disambiguate this call by either casting as "OpenOption" or "OpenOption[ ]"

Hey @Luca,

Thanks a lot for the feedback and the reproducer, this is indeed a pretty obvious FP.
I, therefore, created the following ticket to fix it: SONARJAVA-3519

Cheers,
Michael

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.