aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-11-26 13:21:49 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-11-26 13:21:49 +0000
commitcf7d46db0bfe981b531853c472f30f52bb369af5 (patch)
treedf32c08e71c332f1d07c57d0c5ba00e0def44f8e /sonar-batch
parentcb5f5b4b6fb263e414eb3222eca81796ef89845d (diff)
downloadsonarqube-cf7d46db0bfe981b531853c472f30f52bb369af5.tar.gz
sonarqube-cf7d46db0bfe981b531853c472f30f52bb369af5.zip
SONAR-249 fix issue with the metric duplications_data : sensorContext.saveResource() must set the "effective key"
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java
index 0418c0b65e3..bc333868624 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java
@@ -136,8 +136,8 @@ public final class DefaultIndex extends SonarIndex {
* Does nothing if the resource is already registered.
*/
public Resource addResource(Resource resource) {
- getOrAddBucket(resource);
- return resource;
+ Bucket bucket = getOrAddBucket(resource);
+ return bucket != null ? bucket.getResource() : null;
}
public Resource getResource(Resource resource) {