aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-07-27 18:20:10 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-07-27 18:20:10 +0200
commit79e08b37ee316ccd238e272aabb5313cee60bc00 (patch)
tree2843c0d257ee24f8a5a0b2363f39d1f8f9494f08
parent686c30bef232feed93d16d335d2848ba62700bd9 (diff)
downloadsonarqube-79e08b37ee316ccd238e272aabb5313cee60bc00.tar.gz
sonarqube-79e08b37ee316ccd238e272aabb5313cee60bc00.zip
SONAR-2650 reduce number of constructors
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java16
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/DefaultProjectFileSystem2Test.java3
2 files changed, 3 insertions, 16 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java
index c263fa9b20f..49516407078 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java
@@ -42,7 +42,7 @@ public class DefaultProjectFileSystem2 extends DefaultProjectFileSystem {
private ProjectDefinition def;
private MavenProject pom;
- public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def, FileFilter[] fileFilters) {
+ public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def, FileFilter... fileFilters) {
super(project, languages, fileFilters);
this.def = def;
}
@@ -50,23 +50,11 @@ public class DefaultProjectFileSystem2 extends DefaultProjectFileSystem {
/**
* For Maven.
*/
- public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def, FileFilter[] fileFilters, MavenProject pom) {
+ public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def, MavenProject pom, FileFilter... fileFilters) {
this(project, languages, def, fileFilters);
this.pom = pom;
}
- public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def) {
- super(project, languages, new FileFilter[0]);
- this.def = def;
- }
-
- /**
- * For Maven.
- */
- public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def, MavenProject pom) {
- this(project, languages, def, new FileFilter[0]);
- this.pom = pom;
- }
public File getBasedir() {
return def.getBaseDir();
diff --git a/sonar-batch/src/test/java/org/sonar/batch/DefaultProjectFileSystem2Test.java b/sonar-batch/src/test/java/org/sonar/batch/DefaultProjectFileSystem2Test.java
index fce0afd7282..7fd4cb02745 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/DefaultProjectFileSystem2Test.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/DefaultProjectFileSystem2Test.java
@@ -22,7 +22,6 @@ package org.sonar.batch;
import org.apache.commons.io.FileUtils;
import org.hamcrest.core.Is;
import org.junit.Test;
-import org.sonar.api.batch.FileFilter;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.resources.Languages;
import org.sonar.api.resources.Project;
@@ -40,7 +39,7 @@ public class DefaultProjectFileSystem2Test {
ProjectDefinition definition = ProjectDefinition.create().addSourceDirs(exists, notExists);
- DefaultProjectFileSystem2 fs = new DefaultProjectFileSystem2(new Project("foo"), new Languages(), definition, new FileFilter[0]);
+ DefaultProjectFileSystem2 fs = new DefaultProjectFileSystem2(new Project("foo"), new Languages(), definition);
assertThat(fs.getSourceDirs().size(), Is.is(1));
assertThat(fs.getSourceDirs(), hasItem(exists));