aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java3
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java3
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/batch/report/AnalysisContextReportPublisherTest.java2
3 files changed, 5 insertions, 3 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java
index dfab90ea7e8..5794a8a0314 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionInstaller.java
@@ -23,7 +23,6 @@ import java.util.List;
import javax.annotation.Nullable;
import org.sonar.api.ExtensionProvider;
import org.sonar.api.Plugin;
-import org.sonar.api.SonarPlugin;
import org.sonar.api.SonarQubeVersion;
import org.sonar.api.batch.AnalysisMode;
import org.sonar.core.platform.ComponentContainer;
@@ -52,7 +51,7 @@ public class ExtensionInstaller {
// plugin extensions
for (PluginInfo pluginInfo : pluginRepository.getPluginInfos()) {
Plugin plugin = pluginRepository.getPluginInstance(pluginInfo.getKey());
- Plugin.Context context = new Plugin.Context(sonarQubeVersion);
+ Plugin.Context context = new Plugin.Context(sonarQubeVersion.get());
plugin.define(context);
for (Object extension : context.getExtensions()) {
doInstall(container, matcher, pluginInfo, extension);
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java
index e76d215eb0b..d294f55db65 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java
@@ -29,6 +29,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.TreeSet;
+import org.sonar.api.CoreProperties;
import org.sonar.api.batch.AnalysisMode;
import org.sonar.api.batch.BatchSide;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
@@ -174,6 +175,6 @@ public class AnalysisContextReportPublisher {
}
private static boolean sensitive(String key) {
- return key.contains(".password") || key.contains(".secured");
+ return key.equals(CoreProperties.LOGIN) || key.contains(".password") || key.contains(".secured");
}
}
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/batch/report/AnalysisContextReportPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/batch/report/AnalysisContextReportPublisherTest.java
index 9d82457263c..82e3346ca60 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/batch/report/AnalysisContextReportPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/batch/report/AnalysisContextReportPublisherTest.java
@@ -190,11 +190,13 @@ public class AnalysisContextReportPublisherTest {
publisher.dumpModuleSettings(ProjectDefinition.create()
.setProperty("sonar.projectKey", "foo")
.setProperty("sonar.projectKey", "foo")
+ .setProperty("sonar.login", "my_token")
.setProperty("sonar.password", "azerty")
.setProperty("sonar.cpp.license.secured", "AZERTY"));
assertThat(FileUtils.readFileToString(writer.getFileStructure().analysisLog())).containsSequence(
"sonar.cpp.license.secured=******",
+ "sonar.login=******",
"sonar.password=******",
"sonar.projectKey=foo");
}