Replaced Stream.collect(Collectors.toList()) with Stream.toList() (Sonar) (#1018)

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
This commit is contained in:
pixeebot[bot] 2024-04-03 22:41:24 +01:00 committed by GitHub
parent a63c0a3625
commit 54c3bee205
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,7 +144,7 @@ public class ExtractImageScansController {
// Read the output photos in temp directory
List<Path> tempOutputFiles =
Files.list(tempDir).sorted().collect(Collectors.toList());
Files.list(tempDir).sorted().toList();
for (Path tempOutputFile : tempOutputFiles) {
byte[] imageBytes = Files.readAllBytes(tempOutputFile);
processedImageBytes.add(imageBytes);