Skip to content

Commit

Permalink
use toList instead of collect(toList)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolo101 committed Oct 21, 2023
1 parent 3bfd56c commit 0e7187d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -70,7 +68,7 @@ void setOpenAfterConvert(boolean openAfterConvert) {
void work() {
List<String> 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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -88,6 +86,6 @@ private static List<String> splitTextForMaximumLen(String descr, int fill_len_to

return Arrays.stream(breaked_array)
.map(s -> addWithFillSpacesLeading(fill_len_to_short_description) + s)
.collect(toList());
.toList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -253,7 +252,7 @@ private static void writeFileAttachment(FileAttachment attachment, DirectoryEntr

List<PropType> props = entries.stream()
.map(SubStorageEntry::getPropType)
.collect(Collectors.toList());
.toList();

ByteBuffer bytes = createPropertiesEntryContent(props);

Expand Down

0 comments on commit 0e7187d

Please sign in to comment.