Skip to content

Commit 9bfa55d

Browse files
author
Vincent Potucek
committed
new step to expand java wildcard imports diffplug#2744 diffplug#2594
1 parent ff09ee4 commit 9bfa55d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ public void forbidModuleImports() {
174174
}
175175

176176
public void expandWildcardImports() {
177-
SourceSetContainer sourceSets = getSourceSets(getProject(), "expansion of wildcards requires the 'java' plugin to be applied");
178-
Set<File> typeSolverClasspath = sourceSets.stream().flatMap(s -> s.getAllJava().getSrcDirs().stream()).collect(toSet());
177+
Set<File> typeSolverClasspath = getSourceSets(getProject(), "expansion of wildcards requires the 'java' plugin to be applied").stream().flatMap(s -> s.getAllJava().getSrcDirs().stream()).collect(toSet());
179178
getProject().getConfigurations().stream().filter(Configuration::isCanBeResolved).flatMap(c -> c.getFiles().stream()).forEach(typeSolverClasspath::add);
180179
addStep(ExpandWildcardImportsStep.create(typeSolverClasspath, provisioner()));
181180
}

0 commit comments

Comments
 (0)