Last active
March 29, 2020 09:54
-
-
Save eaiman-shoshi/4cca92f5d5861baa23362aa175a56e07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private List<String> processAndGetLinesAsList(String string) { | |
Supplier<Stream<String>> streamSupplier = string::lines; | |
var isFileOk = streamSupplier.get().allMatch(line -> line.matches(MultipartFileUploadUtils.REGEX_RULES)); | |
return isFileOk ? streamSupplier.get().collect(Collectors.toList()) : new ArrayList<>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment