]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10122 remove dead code in DefaultInputModule
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 9 Jan 2018 17:07:19 +0000 (18:07 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 25 Jan 2018 16:23:09 +0000 (17:23 +0100)
sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputModule.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputModuleTest.java

index f2683b613a9678b6aa37fc609e98ec91ddfa30fe..8bd22e1877a69f073c215ab5fc769550946cc09d 100644 (file)
@@ -23,10 +23,8 @@ import java.io.File;
 import java.io.IOException;
 import java.nio.file.LinkOption;
 import java.nio.file.Path;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import javax.annotation.CheckForNull;
 import javax.annotation.concurrent.Immutable;
@@ -47,8 +45,6 @@ public class DefaultInputModule extends DefaultInputComponent implements InputMo
   private final String description;
   private final String keyWithBranch;
   private final String branch;
-  private final List<String> sources;
-  private final List<String> tests;
   private final Map<String, String> properties;
 
   private final String moduleKey;
@@ -72,8 +68,6 @@ public class DefaultInputModule extends DefaultInputComponent implements InputMo
     this.description = definition.getDescription();
     this.keyWithBranch = definition.getKeyWithBranch();
     this.branch = definition.getBranch();
-    this.sources = Collections.unmodifiableList(new ArrayList<>(definition.sources()));
-    this.tests = Collections.unmodifiableList(new ArrayList<>(definition.tests()));
     this.properties = Collections.unmodifiableMap(new HashMap<>(definition.properties()));
 
     this.definition = definition;
@@ -155,15 +149,4 @@ public class DefaultInputModule extends DefaultInputComponent implements InputMo
     return description;
   }
 
-  /**
-   * @return Source files and folders.
-   */
-  public List<String> sources() {
-    return sources;
-  }
-
-  public List<String> tests() {
-    return tests;
-  }
-
 }
index 9f03c27b11e80bac0cfd68f6b0253a031ae52e82..853a94c3fe57f8b40dfe44ec1b2d0e5594db45ec 100644 (file)
@@ -21,7 +21,6 @@ package org.sonar.api.batch.fs.internal;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.Collections;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
@@ -60,8 +59,6 @@ public class DefaultInputModuleTest {
     assertThat(module.getOriginalVersion()).isEqualTo("version");
     assertThat(module.getDescription()).isEqualTo("desc");
     assertThat(module.getWorkDir()).isEqualTo(workDir.toPath());
-    assertThat(module.sources()).isEqualTo(Collections.singletonList("file1"));
-    assertThat(module.tests()).isEqualTo(Collections.singletonList("test1"));
 
     assertThat(module.properties()).hasSize(6);