aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java18
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/DefaultProjectFileSystem2Test.java3
2 files changed, 18 insertions, 3 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 941ff57269e..c263fa9b20f 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java
@@ -23,6 +23,7 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import org.apache.commons.io.FileUtils;
import org.apache.maven.project.MavenProject;
+import org.sonar.api.batch.FileFilter;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.resources.DefaultProjectFileSystem;
import org.sonar.api.resources.Languages;
@@ -41,8 +42,21 @@ public class DefaultProjectFileSystem2 extends DefaultProjectFileSystem {
private ProjectDefinition def;
private MavenProject pom;
+ public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def, FileFilter[] fileFilters) {
+ super(project, languages, fileFilters);
+ this.def = def;
+ }
+
+ /**
+ * For Maven.
+ */
+ public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def, FileFilter[] fileFilters, MavenProject pom) {
+ this(project, languages, def, fileFilters);
+ this.pom = pom;
+ }
+
public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def) {
- super(project, languages);
+ super(project, languages, new FileFilter[0]);
this.def = def;
}
@@ -50,7 +64,7 @@ public class DefaultProjectFileSystem2 extends DefaultProjectFileSystem {
* For Maven.
*/
public DefaultProjectFileSystem2(Project project, Languages languages, ProjectDefinition def, MavenProject pom) {
- this(project, languages, def);
+ this(project, languages, def, new FileFilter[0]);
this.pom = pom;
}
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 7fd4cb02745..fce0afd7282 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/DefaultProjectFileSystem2Test.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/DefaultProjectFileSystem2Test.java
@@ -22,6 +22,7 @@ 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;
@@ -39,7 +40,7 @@ public class DefaultProjectFileSystem2Test {
ProjectDefinition definition = ProjectDefinition.create().addSourceDirs(exists, notExists);
- DefaultProjectFileSystem2 fs = new DefaultProjectFileSystem2(new Project("foo"), new Languages(), definition);
+ DefaultProjectFileSystem2 fs = new DefaultProjectFileSystem2(new Project("foo"), new Languages(), definition, new FileFilter[0]);
assertThat(fs.getSourceDirs().size(), Is.is(1));
assertThat(fs.getSourceDirs(), hasItem(exists));