From 46dfa139944cb0ff94e5f05f18a55533b489ef10 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 25 Mar 2015 19:01:01 +0100 Subject: SONAR-6257 Fix duplication issue when there's folder in project structure and add component key in report --- .../src/main/java/org/sonar/batch/report/ComponentsPublisher.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sonar-batch/src/main/java') 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 -- cgit v1.2.3