The ``++Files.exists++`` method has noticeably poor performance in JDK 8, and can slow an application significantly when used to check files that don't actually exist.
The same goes for ``++Files.notExists++``, ``++Files.isDirectory++`` and ``++Files.isRegularFile++`` from ``++java.nio.file++`` package.
*Note* that this rule is automatically disabled when the project's ``++sonar.java.source++`` is not 8.
=== on 15 Nov 2019, 12:34:34 Tibor Blenessy wrote:
Removed from default profile because Java 8 is becoming quite old and using Files.exists is in general better approach when using Path API. See also \https://community.sonarsource.com/t/sonar-should-flag-calls-to-path-tofile/16664/2