aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/main/java
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2015-03-25 19:01:01 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2015-03-25 19:01:01 +0100
commit46dfa139944cb0ff94e5f05f18a55533b489ef10 (patch)
tree30916ff7677dc84ee67af5f8e4a4195852b55ddb /sonar-batch/src/main/java
parentfe13138cef996cfc0ade3252d0452442635f6f92 (diff)
downloadsonarqube-46dfa139944cb0ff94e5f05f18a55533b489ef10.tar.gz
sonarqube-46dfa139944cb0ff94e5f05f18a55533b489ef10.zip
SONAR-6257 Fix duplication issue when there's folder in project structure and add component key in report
Diffstat (limited to 'sonar-batch/src/main/java')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/report/ComponentsPublisher.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/report/ComponentsPublisher.java b/sonar-batch/src/main/java/org/sonar/batch/report/ComponentsPublisher.java
index 506a7f23765..fa81851088e 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/report/ComponentsPublisher.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/report/ComponentsPublisher.java
@@ -30,10 +30,11 @@ import org.sonar.batch.index.BatchResource;
import org.sonar.batch.index.ResourceCache;
import org.sonar.batch.protocol.Constants;
import org.sonar.batch.protocol.Constants.ComponentLinkType;
-import org.sonar.batch.protocol.output.*;
+import org.sonar.batch.protocol.output.BatchReport;
import org.sonar.batch.protocol.output.BatchReport.Component.Builder;
import org.sonar.batch.protocol.output.BatchReport.ComponentLink;
import org.sonar.batch.protocol.output.BatchReport.Event;
+import org.sonar.batch.protocol.output.BatchReportWriter;
import javax.annotation.CheckForNull;
@@ -65,6 +66,7 @@ public class ComponentsPublisher implements ReportPublisher {
// non-null fields
builder.setRef(batchResource.batchId());
builder.setType(getType(r));
+ builder.setKey(r.getKey());
// protocol buffers does not accept null values