From cf7d46db0bfe981b531853c472f30f52bb369af5 Mon Sep 17 00:00:00 2001 From: simonbrandhof <simon.brandhof@gmail.com> Date: Fri, 26 Nov 2010 13:21:49 +0000 Subject: SONAR-249 fix issue with the metric duplications_data : sensorContext.saveResource() must set the "effective key" --- sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sonar-batch/src') 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) { -- cgit v1.2.3