diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-09-14 14:05:32 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-09-14 15:40:11 +0200 |
commit | d37a06d8bb263713e3e2c99b977806a41dec15a6 (patch) | |
tree | b42c27ab89a4965d9f68c61dcf707eb7686bc797 /sonar-scanner-engine | |
parent | c9975c3520d55d9f79cb04468fa5a64da8ed5dfa (diff) | |
download | sonarqube-d37a06d8bb263713e3e2c99b977806a41dec15a6.tar.gz sonarqube-d37a06d8bb263713e3e2c99b977806a41dec15a6.zip |
Improve quality
Diffstat (limited to 'sonar-scanner-engine')
2 files changed, 5 insertions, 4 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java index 4f24f13b3dd..1504f3e06dc 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java @@ -67,6 +67,7 @@ public class ReportPublisher implements Startable { public static final String KEEP_REPORT_PROP_KEY = "sonar.scanner.keepReport"; public static final String VERBOSE_KEY = "sonar.verbose"; public static final String METADATA_DUMP_FILENAME = "report-task.txt"; + private static final String CHARACTERISTIC = "characteristic"; private final Configuration settings; private final ScannerWsClient wsClient; @@ -181,13 +182,13 @@ public class ReportPublisher implements Startable { .setPart("report", filePart); if (analysisFlags.isIncremental()) { - post.setParam("characteristic", "incremental=true"); + post.setParam(CHARACTERISTIC, "incremental=true"); } String branchName = branchConfiguration.branchName(); if (branchName != null) { - post.setParam("characteristic", "branch=" + branchName); - post.setParam("characteristic", "branchType=" + branchConfiguration.branchType().name()); + post.setParam(CHARACTERISTIC, "branch=" + branchName); + post.setParam(CHARACTERISTIC, "branchType=" + branchConfiguration.branchType().name()); } WsResponse response; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/branch/BranchConfigurationProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/branch/BranchConfigurationProvider.java index 505cbb51293..0b2fb671e72 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/branch/BranchConfigurationProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/branch/BranchConfigurationProvider.java @@ -53,7 +53,7 @@ public class BranchConfigurationProvider extends ProviderAdapter { return branchConfiguration; } - private Supplier<Map<String, String>> createSettingsSupplier(GlobalConfiguration globalConfiguration, ProjectKey projectKey, SettingsLoader settingsLoader) { + private static Supplier<Map<String, String>> createSettingsSupplier(GlobalConfiguration globalConfiguration, ProjectKey projectKey, SettingsLoader settingsLoader) { return () -> { Map<String, String> settings = new HashMap<>(); settings.putAll(globalConfiguration.getProperties()); |