diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-06-08 10:27:53 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-06-08 10:28:07 +0200 |
commit | eae41c396cc953fe2d3afff2987883d87a200a86 (patch) | |
tree | 24e1c74288d24a3c2dc5518ac4155812bfb08bdb /sonar-plugin-api | |
parent | 3b355cf7e3b6ae46b60d242474b54a860c4f7ffd (diff) | |
download | sonarqube-eae41c396cc953fe2d3afff2987883d87a200a86.tar.gz sonarqube-eae41c396cc953fe2d3afff2987883d87a200a86.zip |
Fix compatibility with ant task
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java | 2 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java | 11 |
2 files changed, 1 insertions, 12 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 b1b21a1bb38..e824d4e0a87 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 @@ -59,7 +59,7 @@ public final class ProjectDefinition implements BatchComponent { } public static ProjectDefinition create(Properties properties) { - return new ProjectDefinition((Properties)properties.clone()); + return new ProjectDefinition(properties); } public static ProjectDefinition create() { 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 ad1cf868666..581e9ff3361 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 @@ -146,17 +146,6 @@ public class ProjectDefinitionTest { assertThat(root.getTestDirs().size(), is(0)); } - @Test - public void shouldCloneProperties() { - Properties rootProps = new Properties(); - rootProps.setProperty(CoreProperties.PROJECT_NAME_PROPERTY, "root"); - ProjectDefinition def = ProjectDefinition.create(rootProps); - def.setName("child"); - - assertThat(def.getName(), is("child")); - assertThat(rootProps.getProperty(CoreProperties.PROJECT_NAME_PROPERTY), is("root")); - } - private static void assertFiles(List<String> paths, String... values) { assertThat(paths.size(), is(values.length)); for (int i = 0; i < values.length; i++) { |