diff options
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++) { |