Skip to content

Commit

Permalink
Auto-detect style if the list of styles is empty in MavenMojoProjectP…
Browse files Browse the repository at this point in the history
…arser. (#379)

fixes #1916
  • Loading branch information
traceyyoshima authored Jun 15, 2022
1 parent 7f96b3b commit f202e68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ private Set<Path> pathsToOtherMavenProjects(MavenProject mavenProject) {
}

private List<J.CompilationUnit> maybeAutodetectStyles(List<J.CompilationUnit> sourceFiles, @Nullable Iterable<NamedStyles> styles) {
if (styles != null) {
if (styles != null && styles.spliterator().getExactSizeIfKnown() > 0) {
return sourceFiles;
}
Autodetect autodetect = Autodetect.detect(sourceFiles);
Expand Down

0 comments on commit f202e68

Please sign in to comment.