From 54c3bee205b5745a59c6571ce0090f54e899b47c Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <104101892+pixeebot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 22:41:24 +0100 Subject: [PATCH] Replaced `Stream.collect(Collectors.toList())` with `Stream.toList()` (Sonar) (#1018) Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com> --- .../SPDF/controller/api/misc/ExtractImageScansController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java index 732106f5..dc17dc9c 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java @@ -144,7 +144,7 @@ public class ExtractImageScansController { // Read the output photos in temp directory List 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);