summaryrefslogtreecommitdiffstats
path: root/sonar-batch/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-12-22 12:24:04 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2011-12-22 12:35:55 +0100
commit84171b67f487307059cce507f41fd03dbfdcbc4b (patch)
treea6830e6d18bad3cc5d679ab7dca3ea637777adb6 /sonar-batch/src
parent181b2f8504f684d709ca79acfb3055e7e9d9dae1 (diff)
downloadsonarqube-84171b67f487307059cce507f41fd03dbfdcbc4b.tar.gz
sonarqube-84171b67f487307059cce507f41fd03dbfdcbc4b.zip
SONAR-983 do not index libraries
Diffstat (limited to 'sonar-batch/src')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
index d0aed00b005..278183cc6ae 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
@@ -126,14 +126,16 @@ public final class DefaultResourcePersister implements ResourcePersister {
if (resource instanceof Project) {
// should not occur, please use the method saveProject()
snapshot = persistProject((Project) resource, project);
+ indexer.index(resource.getName(), snapshot.getQualifier(), snapshot.getResourceId(), snapshot.getRootProjectId());
} else if (resource instanceof Library) {
snapshot = persistLibrary(project, (Library) resource);
} else {
snapshot = persistFileOrDirectory(project, resource, parent);
+ indexer.index(resource.getName(), snapshot.getQualifier(), snapshot.getResourceId(), snapshot.getRootProjectId());
}
- indexer.index(resource.getName(), snapshot.getQualifier(), snapshot.getResourceId(), snapshot.getRootProjectId());
+
return snapshot;
}