diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-10-15 13:31:21 -0500 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-10-21 20:21:11 +0200 |
commit | fe3c5105bd62267bf8365101066f6ded7e6a6d33 (patch) | |
tree | b9da0fb0913a260e517e2ae762bfdf12de1e7066 /sonar-plugin-api | |
parent | 80f0a0e9ab86be120d6e3edf3499d7dce828198a (diff) | |
download | sonarqube-fe3c5105bd62267bf8365101066f6ded7e6a6d33.tar.gz sonarqube-fe3c5105bd62267bf8365101066f6ded7e6a6d33.zip |
Remove deprecated code in scanner
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java | 44 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java | 7 |
2 files changed, 4 insertions, 47 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java index 40d293da8de..c4b910ef65e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java @@ -52,7 +52,6 @@ public class ProjectDefinition { private File baseDir; private File workDir; - private File buildDir; private Map<String, String> properties = new LinkedHashMap<>(); private ProjectDefinition parent = null; private List<ProjectDefinition> subProjects = new ArrayList<>(); @@ -85,53 +84,10 @@ public class ProjectDefinition { return workDir; } - /** - * @deprecated since 6.1 notion of buildDir is not well defined - */ - @Deprecated - public ProjectDefinition setBuildDir(File d) { - this.buildDir = d; - return this; - } - - /** - * @deprecated since 6.1 notion of buildDir is not well defined - */ - @Deprecated - public File getBuildDir() { - return buildDir; - } - - /** - * @deprecated since 5.0 use {@link #properties()} - */ - @Deprecated - public Properties getProperties() { - Properties result = new Properties(); - for (Map.Entry<String, String> entry : properties.entrySet()) { - result.setProperty(entry.getKey(), entry.getValue()); - } - return result; - } - public Map<String, String> properties() { return properties; } - /** - * Copies specified properties into this object. - * - * @since 2.12 - * @deprecated since 5.0 use {@link #setProperties(Map)} - */ - @Deprecated - public ProjectDefinition setProperties(Properties properties) { - for (Entry<Object, Object> entry : properties.entrySet()) { - this.properties.put(entry.getKey().toString(), entry.getValue().toString()); - } - return this; - } - public ProjectDefinition setProperties(Map<String, String> properties) { this.properties.putAll(properties); return this; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java index a69dad61ada..b62f21f4a11 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java @@ -19,7 +19,8 @@ */ package org.sonar.api.batch.bootstrap; -import java.util.Properties; +import java.util.HashMap; +import java.util.Map; import org.junit.Test; import org.sonar.api.CoreProperties; @@ -67,8 +68,8 @@ public class ProjectDefinitionTest { @Test public void shouldGetKeyFromProperties() { - Properties props = new Properties(); - props.setProperty(CoreProperties.PROJECT_KEY_PROPERTY, "foo"); + Map<String, String> props = new HashMap<>(); + props.put(CoreProperties.PROJECT_KEY_PROPERTY, "foo"); ProjectDefinition def = ProjectDefinition.create(); def.setProperties(props); assertThat(def.getKey()).isEqualTo("foo"); |