On Wed, 15 Mar 2023 14:23:06 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. > > Leonid Mesnik has updated the pull request incrementally with one additional > commit since the last revision: > > fixed test test/lib/jdk/test/lib/process/StreamPumper.java line 145: > 143: } > 144: } > 145: final String line = lineBos.toString(); The code in 'lastcrlf == -1' as well as in 'lastcrlf < len - 1' writes remaining buf into lineBos. This lineBos is used to make line which is processed in line 127. However, if the stream is emptied then the chunk after last '\n' is written in in the lineBos but we never reach line 127 to call processLine for it. ------------- PR: https://git.openjdk.org/jdk/pull/13034