From 0e7187d7e85712802c720fbc89e917f155824dfb Mon Sep 17 00:00:00 2001 From: lolo101 Date: Sat, 23 Sep 2023 13:30:30 +0200 Subject: [PATCH] use toList instead of collect(toList) --- .../main/java/net/sourceforge/MSGViewer/CLIFileConverter.java | 4 +--- .../java/net/sourceforge/MSGViewer/CLIHelp/CLIOption.java | 4 +--- .../net/sourceforge/MSGViewer/factory/msg/MsgContainer.java | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/MSGViewer/src/main/java/net/sourceforge/MSGViewer/CLIFileConverter.java b/MSGViewer/src/main/java/net/sourceforge/MSGViewer/CLIFileConverter.java index f89f8486..2069666c 100644 --- a/MSGViewer/src/main/java/net/sourceforge/MSGViewer/CLIFileConverter.java +++ b/MSGViewer/src/main/java/net/sourceforge/MSGViewer/CLIFileConverter.java @@ -16,8 +16,6 @@ import java.util.Arrays; import java.util.List; -import static java.util.stream.Collectors.toList; - public abstract class CLIFileConverter { private static final Logger LOGGER = BaseModuleLauncher.logger; @@ -70,7 +68,7 @@ void setOpenAfterConvert(boolean openAfterConvert) { void work() { List processableFiles = Arrays.stream(module_launcher.args) .filter(sourcePath -> sourcePath.toLowerCase().endsWith(String.format(".%s", sourceType))) - .collect(toList()); + .toList(); processableFiles.forEach(this::processFile); if (processableFiles.isEmpty()) { diff --git a/MSGViewer/src/main/java/net/sourceforge/MSGViewer/CLIHelp/CLIOption.java b/MSGViewer/src/main/java/net/sourceforge/MSGViewer/CLIHelp/CLIOption.java index fe1fa6a7..b92723b0 100644 --- a/MSGViewer/src/main/java/net/sourceforge/MSGViewer/CLIHelp/CLIOption.java +++ b/MSGViewer/src/main/java/net/sourceforge/MSGViewer/CLIHelp/CLIOption.java @@ -5,8 +5,6 @@ import java.util.Arrays; import java.util.List; -import static java.util.stream.Collectors.toList; - public class CLIOption { private final String name; private final String short_description; @@ -88,6 +86,6 @@ private static List splitTextForMaximumLen(String descr, int fill_len_to return Arrays.stream(breaked_array) .map(s -> addWithFillSpacesLeading(fill_len_to_short_description) + s) - .collect(toList()); + .toList(); } } diff --git a/MSGViewer/src/main/java/net/sourceforge/MSGViewer/factory/msg/MsgContainer.java b/MSGViewer/src/main/java/net/sourceforge/MSGViewer/factory/msg/MsgContainer.java index fbb381f9..e208beaf 100644 --- a/MSGViewer/src/main/java/net/sourceforge/MSGViewer/factory/msg/MsgContainer.java +++ b/MSGViewer/src/main/java/net/sourceforge/MSGViewer/factory/msg/MsgContainer.java @@ -19,7 +19,6 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.*; -import java.util.stream.Collectors; import static com.auxilii.msgparser.Pid.*; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -253,7 +252,7 @@ private static void writeFileAttachment(FileAttachment attachment, DirectoryEntr List props = entries.stream() .map(SubStorageEntry::getPropType) - .collect(Collectors.toList()); + .toList(); ByteBuffer bytes = createPropertiesEntryContent(props);