]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 24 Mar 2016 09:33:29 +0000 (10:33 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Thu, 24 Mar 2016 09:33:29 +0000 (10:33 +0100)
sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ModuleIssues.java
sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/TaskResult.java

index d120e018acdba691dec2cd64426a17c58cbc34c9..23fb5820954ea7498c3b45b133e18a773555774b 100644 (file)
@@ -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());
index 9edee3c7208aefa5afa3c7e0372e53ea2ceed0ca..8d10ad0b2026bff70c6010d533586d0f7fcf50c4 100644 (file)
@@ -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);