From 3ede1b35d04dcff7e7c9d1b6c9230bdeae3417c7 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Thu, 24 Mar 2016 10:33:29 +0100 Subject: [PATCH] Fix some quality flaws --- .../src/main/java/org/sonar/batch/issue/ModuleIssues.java | 2 +- .../src/main/java/org/sonar/batch/mediumtest/TaskResult.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ModuleIssues.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ModuleIssues.java index d120e018acd..23fb5820954 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ModuleIssues.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ModuleIssues.java @@ -123,7 +123,7 @@ public class ModuleIssues { } } - private ScannerReport.TextRange toProtobufTextRange(ScannerReport.TextRange.Builder textRangeBuilder, TextRange primaryTextRange) { + private static ScannerReport.TextRange toProtobufTextRange(ScannerReport.TextRange.Builder textRangeBuilder, TextRange primaryTextRange) { textRangeBuilder.clear(); textRangeBuilder.setStartLine(primaryTextRange.start().line()); textRangeBuilder.setStartOffset(primaryTextRange.start().lineOffset()); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/TaskResult.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/TaskResult.java index 9edee3c7208..8d10ad0b202 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/TaskResult.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/TaskResult.java @@ -87,9 +87,9 @@ public class TaskResult implements org.sonar.batch.mediumtest.ScanTaskObserver { private void storeReportComponents(int componentRef, String parentModuleKey, String branch) { Component component = getReportReader().readComponent(componentRef); if (isNotEmpty(component.getKey())) { - reportComponents.put(component.getKey() + (isNotEmpty(branch) ? ":" + branch : ""), component); + reportComponents.put(component.getKey() + (isNotEmpty(branch) ? (":" + branch) : ""), component); } else { - reportComponents.put(parentModuleKey + (isNotEmpty(branch) ? ":" + branch : "") + ":" + component.getPath(), component); + reportComponents.put(parentModuleKey + (isNotEmpty(branch) ? (":" + branch) : "") + ":" + component.getPath(), component); } for (int childId : component.getChildRefList()) { storeReportComponents(childId, isNotEmpty(component.getKey()) ? component.getKey() : parentModuleKey, branch); -- 2.39.5