diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2016-07-01 12:35:42 +0200 |
---|---|---|
committer | Julien HENRY <henryju@yahoo.fr> | 2016-07-05 14:00:16 +0200 |
commit | b7343f0f17e5ae2e430b1fa7561986a9df2a107d (patch) | |
tree | 6f81e336dcbb7f9ed67d3dfb5e8644a84a40462b /sonar-scanner-engine | |
parent | c7206381a3e009e4b19b0844fe1ac732daead2b2 (diff) | |
download | sonarqube-b7343f0f17e5ae2e430b1fa7561986a9df2a107d.tar.gz sonarqube-b7343f0f17e5ae2e430b1fa7561986a9df2a107d.zip |
SONAR-7727 Remove some deprecated properties
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java | 19 | ||||
-rw-r--r-- | sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java | 27 |
2 files changed, 1 insertions, 45 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java index 1ba17667560..aee2aab3d71 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java @@ -57,8 +57,7 @@ public class ProjectConfigurator { Date analysisDate = loadAnalysisDate(); project .setAnalysisDate(analysisDate) - .setAnalysisVersion(loadAnalysisVersion()) - .setAnalysisType(loadAnalysisType()); + .setAnalysisVersion(loadAnalysisVersion()); return this; } @@ -78,22 +77,6 @@ public class ProjectConfigurator { return date; } - private Project.AnalysisType loadAnalysisType() { - String value = settings.getString(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY); - if (value == null) { - return Project.AnalysisType.DYNAMIC; - } - - LOG.warn("'sonar.dynamicAnalysis' is deprecated since version 4.3 and should no longer be used."); - if ("true".equals(value)) { - return Project.AnalysisType.DYNAMIC; - } - if ("reuseReports".equals(value)) { - return Project.AnalysisType.REUSE_REPORTS; - } - return Project.AnalysisType.STATIC; - } - private String loadAnalysisVersion() { return settings.getString(CoreProperties.PROJECT_VERSION_PROPERTY); } diff --git a/sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java index 6a30188454c..84b725007d8 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java @@ -89,33 +89,6 @@ public class ProjectConfiguratorTest { } @Test - public void explicit_dynamic_analysis() { - Settings configuration = new Settings(); - configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "true"); - Project project = new Project("key"); - new ProjectConfigurator(configuration, system2).configure(project); - assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.DYNAMIC); - } - - @Test - public void explicit_static_analysis() { - Settings configuration = new Settings(); - configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "false"); - Project project = new Project("key"); - new ProjectConfigurator(configuration, system2).configure(project); - assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.STATIC); - } - - @Test - public void explicit_dynamic_analysis_reusing_reports() { - Settings configuration = new Settings(); - configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "reuseReports"); - Project project = new Project("key"); - new ProjectConfigurator(configuration, system2).configure(project); - assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.REUSE_REPORTS); - } - - @Test public void is_dynamic_analysis() { assertThat(Project.AnalysisType.DYNAMIC.isDynamic(false)).isTrue(); assertThat(Project.AnalysisType.DYNAMIC.isDynamic(true)).isTrue(); |