aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java
index ef6dcc60278..d15fa2d0961 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java
@@ -85,7 +85,7 @@ public class ChangedLinesPublisher implements ReportPublisherStep {
Set<Integer> changedLines = pathSetMap.get(e.getKey());
// if the file got no information returned by the SCM, we write nothing in the report and
// the compute engine will use SCM dates to estimate which lines are new
- if (changedLines != null) {
+ if (changedLines != null && !changedLines.isEmpty()) {
count++;
writeChangedLines(writer, e.getValue().batchId(), changedLines);
}