diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-09-28 11:47:27 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-09-28 15:26:30 +0200 |
commit | d7a1e09227716e47223245ea0d60522b8661ec91 (patch) | |
tree | 30ecbb8a2cdd901be3ced6a7c1d9632dea94af12 /sonar-application | |
parent | a0ade68924de853c5a08ad75a2c4b7de10eae5ee (diff) | |
download | sonarqube-d7a1e09227716e47223245ea0d60522b8661ec91.tar.gz sonarqube-d7a1e09227716e47223245ea0d60522b8661ec91.zip |
fixing quality flaws (mostly Java NIO slow methods usage)
Diffstat (limited to 'sonar-application')
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/AppFileSystem.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/AppFileSystem.java b/sonar-application/src/main/java/org/sonar/application/AppFileSystem.java index 01c19276757..da9f75affac 100644 --- a/sonar-application/src/main/java/org/sonar/application/AppFileSystem.java +++ b/sonar-application/src/main/java/org/sonar/application/AppFileSystem.java @@ -145,13 +145,14 @@ public class AppFileSystem implements FileSystem { } @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { - if (Files.isDirectory(file)) { - deleteDirectory(file.toFile()); - } else if (file.getFileName().equals(SHAREDMEMORY_FILE)) { + public FileVisitResult visitFile(Path filePath, BasicFileAttributes attrs) throws IOException { + File file = filePath.toFile(); + if (file.isDirectory()) { + deleteDirectory(file); + } else if (filePath.getFileName().equals(SHAREDMEMORY_FILE)) { return CONTINUE; - } else if (!symLink || !file.equals(path)) { - Files.delete(file); + } else if (!symLink || !filePath.equals(path)) { + Files.delete(filePath); } return CONTINUE; } |