diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-26 13:21:49 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-26 13:21:49 +0000 |
commit | cf7d46db0bfe981b531853c472f30f52bb369af5 (patch) | |
tree | df32c08e71c332f1d07c57d0c5ba00e0def44f8e /sonar-batch | |
parent | cb5f5b4b6fb263e414eb3222eca81796ef89845d (diff) | |
download | sonarqube-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.java | 4 |
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) { |