diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-07-04 09:24:31 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-07-04 09:27:36 +0200 |
commit | 288577314b99680f73d5367db037cc1fa7415dc5 (patch) | |
tree | 5c51c177a5dbaf97075259f9a87c3449b2148d4a /sonar-batch | |
parent | 161658d28bb93791ea8cddb560aa88673e6b7b08 (diff) | |
download | sonarqube-288577314b99680f73d5367db037cc1fa7415dc5.tar.gz sonarqube-288577314b99680f73d5367db037cc1fa7415dc5.zip |
SONAR-5433 Fix concurrent modification error with big projects
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java index 81eb9b0e4da..9822738c31a 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java @@ -92,7 +92,9 @@ public class FileIndexer implements BatchComponent { executor.shutdown(); try { - executor.awaitTermination(10, TimeUnit.SECONDS); + while (!executor.awaitTermination(10, TimeUnit.SECONDS)) { + LOG.debug("{} files indexed...", progress.count()); + } } catch (InterruptedException e) { throw new IllegalStateException("FileIndexer was interrupted", e); } @@ -121,12 +123,6 @@ public class FileIndexer implements BatchComponent { } } - private void indexFiles(InputFileBuilder inputFileBuilder, DefaultModuleFileSystem fileSystem, Progress progress, List<File> sourceFiles, InputFile.Type type) { - for (File sourceFile : sourceFiles) { - indexFile(inputFileBuilder, fileSystem, progress, sourceFile, type); - } - } - private void indexDirectory(InputFileBuilder inputFileBuilder, DefaultModuleFileSystem fileSystem, Progress status, File dirToIndex, InputFile.Type type) { Collection<File> files = FileUtils.listFiles(dirToIndex, FILE_FILTER, DIR_FILTER); for (File file : files) { |