On Wed, 15 Mar 2023 05:41:33 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:
> The StreamPumper is fixed to process the last line even it is not finishes > with '\n' or '\r'. The test included. Testing with tier1-3 also to verify > that tests are not broken. Not clear on this one sorry. I would have thought the: if (lastcrlf == -1) { was supposed to handle lines without final \n. But I really can't follow this code. test/lib-test/jdk/test/lib/process/ProcessToolsLastLineTest.java line 56: > 54: test("ARG1\nARG2\n"); > 55: test("\nARG1\nARG2\n"); > 56: > test("\nARG1\nVERYVERYLONGLINEVERYVERYLONGLINEVERYVERYLONGLINEVERYVERYLONGLINEVERYVERYLONGLINE" > + "" + Probably easier/clearer to use String.repeat to create as long a line as you want. ------------- PR: https://git.openjdk.org/jdk/pull/13034