Skip to content

Commit

Permalink
Create singleton ImmutableSortedSets directly instead of using `Lis…
Browse files Browse the repository at this point in the history
…ts.partition`. (#169)
  • Loading branch information
netdpb authored Apr 3, 2024
1 parent c6f916d commit fae43cf
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static com.google.common.base.Strings.nullToEmpty;
import static com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet;
import static com.google.common.collect.Lists.partition;
import static com.google.common.io.MoreFiles.asCharSink;
import static com.google.common.io.MoreFiles.asCharSource;
import static com.google.common.truth.Truth.assertThat;
Expand Down Expand Up @@ -76,10 +75,9 @@ public ConformanceTestReport runTests(Path testDirectory, ImmutableList<Path> te
directory -> {
Stream<ImmutableSortedSet<Path>> groups = javaFileGroups(directory);
return directory.equals(testDirectory)
? groups.flatMap(files -> partition(files.asList(), 1).stream())
? groups.flatMap(files -> files.stream().map(ImmutableSortedSet::of))
: groups;
})
.map(ImmutableSortedSet::copyOf)
.forEach(
files -> report.addFiles(files, analyzer.analyze(testDirectory, files, testDeps)));
return report.build();
Expand Down

0 comments on commit fae43cf

Please sign in to comment.