diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-01-17 17:45:09 +0100 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-01-27 16:26:30 +0100 |
commit | eea589c564a924993e8edba9d8fa9691e756bce4 (patch) | |
tree | c112f6d41d7f4dfeb7ad8d14f895e1b879a68411 /sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest | |
parent | 211a993bd85b5d12ace1686b133677381da8c597 (diff) | |
download | sonarqube-eea589c564a924993e8edba9d8fa9691e756bce4.tar.gz sonarqube-eea589c564a924993e8edba9d8fa9691e756bce4.zip |
Refactor resources API
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java index 879e4a016fd..0366c780caa 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/TaskResult.java @@ -50,7 +50,7 @@ import org.sonar.scanner.protocol.output.ScannerReport.Symbol; import org.sonar.scanner.report.ReportPublisher; import org.sonar.scanner.report.ScannerReportUtils; import org.sonar.scanner.scan.ProjectScanContainer; -import org.sonar.scanner.scan.filesystem.InputPathCache; +import org.sonar.scanner.scan.filesystem.InputComponentStore; import org.sonar.scanner.protocol.output.ScannerReportReader; import static org.apache.commons.lang.StringUtils.isNotEmpty; @@ -87,9 +87,9 @@ public class TaskResult implements org.sonar.scanner.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(), component); } else { - reportComponents.put(parentModuleKey + (isNotEmpty(branch) ? (":" + branch) : "") + ":" + component.getPath(), component); + reportComponents.put(parentModuleKey + ":" + component.getPath(), component); } for (int childId : component.getChildRefList()) { storeReportComponents(childId, isNotEmpty(component.getKey()) ? component.getKey() : parentModuleKey, branch); @@ -102,7 +102,7 @@ public class TaskResult implements org.sonar.scanner.mediumtest.ScanTaskObserver } private void storeFs(ProjectScanContainer container) { - InputPathCache inputFileCache = container.getComponentByType(InputPathCache.class); + InputComponentStore inputFileCache = container.getComponentByType(InputComponentStore.class); for (InputFile inputPath : inputFileCache.allFiles()) { inputFiles.put(inputPath.relativePath(), inputPath); } |