On Fri, 18 Apr 2025 19:11:15 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> Without over-rotating on performance concerns, [...]

Or just for the sake of silliness:

    public List<String> readAllLines() throws IOException {
        String regex = "(?:\n)|(?:\r)|\r(?=\n)";
        return Arrays.asList(readString().split(regex));
    }


(My regex knowledge is poor so that might not even be correct.)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24728#issuecomment-2816164684

Reply via email to