This commit is contained in:
Andrea Cavalli 2022-07-19 02:59:14 +02:00
parent 07015e1799
commit 15075631e9

View File

@ -124,10 +124,10 @@ public class SourcesGenerator {
} }
// Get the files list // Get the files list
var generatedFilesToDelete = Files HashSet<Path> generatedFilesToDelete;
.find(outPath, Integer.MAX_VALUE, (filePath, fileAttr) -> fileAttr.isRegularFile()) try (var stream = Files.find(outPath, Integer.MAX_VALUE, (filePath, fileAttr) -> fileAttr.isRegularFile())) {
.map(outPath::relativize) generatedFilesToDelete = stream.map(outPath::relativize).collect(Collectors.toCollection(HashSet::new));
.collect(Collectors.toCollection(HashSet::new)); }
// Update the hash // Update the hash
Files.writeString(hashPath, basePackageName + '\n' + useRecordBuilders + '\n' + curHash + '\n', Files.writeString(hashPath, basePackageName + '\n' + useRecordBuilders + '\n' + curHash + '\n',