]> source.dussan.org Git - sonarqube.git/commitdiff
Fix compatibility with ant task
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 8 Jun 2011 08:27:53 +0000 (10:27 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 8 Jun 2011 08:28:07 +0000 (10:28 +0200)
sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java

index b1b21a1bb3801436f4754318eb379f8916164de9..e824d4e0a8732bffe5533a4eace42dd4ce7111e3 100644 (file)
@@ -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() {
index ad1cf8686661892dd26cd368c09d77f2a4bb9dc3..581e9ff3361b6d44fa7ca4797924e6d329338e85 100644 (file)
@@ -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++) {