Skip to content

Commit

Permalink
Merge pull request #924 from hazendaz/main
Browse files Browse the repository at this point in the history
[ci] Use toList() instead of :: iterator
  • Loading branch information
hazendaz committed Jul 14, 2024
2 parents c7954eb + a99b9e3 commit 90cab2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/revelc/code/formatter/FormatterMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ private void storeFileHashCache(final Properties props) {
try (var sw = new StringWriter()) {
props.store(sw, null);
getLog().debug("Writing sorted files to cache without timestamp:\n\n" + props);
Files.write(cacheFile, (Iterable<String>) sw.toString().lines().skip(1).sorted()::iterator,
Files.write(cacheFile, (Iterable<String>) sw.toString().lines().skip(1).sorted().toList(),
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
} catch (final IOException e) {
this.getLog().warn("Cannot store file hash cache properties file", e);
Expand Down

0 comments on commit 90cab2d

Please sign in to comment.