mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-13 16:15:27 +00:00
perf[stream]: stream.toList() replaces collect(Collectors.toList())
This commit is contained in:
1 parent
ac2d01e6fb
commit
ad7e4f3481
17 files changed
+29
-29
No files matched your search
@@ -119,7 +119,7 @@ public class ResourceInterpreter {
|
||||
}
|
||||
}
|
||||
}
|
||||
return fieldList.stream().map(it -> new FieldInfo(cellFieldMap.get(getExcelFieldName(it)), it)).toList();;
|
||||
return fieldList.stream().map(it -> new FieldInfo(cellFieldMap.get(getExcelFieldName(it)), it)).toList();
|
||||
}
|
||||
|
||||
private static class FieldInfo {
|
||||
|
||||
@@ -83,14 +83,14 @@ public abstract class ExportUtils {
|
||||
return FileUtils.getAllReadableFiles(new File(inputDir))
|
||||
.stream()
|
||||
.filter(it -> StorageEnum.isExcel(FileUtils.fileExtName(it.getName())))
|
||||
.toList();;
|
||||
.toList();
|
||||
}
|
||||
|
||||
public static List<File> scanCsvFiles(String inputDir) {
|
||||
return FileUtils.getAllReadableFiles(new File(inputDir))
|
||||
.stream()
|
||||
.filter(it -> StorageEnum.getResourceEnumByType(FileUtils.fileExtName(it.getName())) == StorageEnum.CSV)
|
||||
.toList();;
|
||||
.toList();
|
||||
}
|
||||
|
||||
// 将class里的map自动赋值storage
|
||||
|
||||
Reference in new issue
Block a user