From: Julien HENRY Date: Thu, 24 Mar 2016 09:33:29 +0000 (+0100) Subject: Fix some quality flaws X-Git-Tag: 5.5-M11~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3ede1b35d04dcff7e7c9d1b6c9230bdeae3417c7;p=sonarqube.git Fix some quality flaws --- 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);