Integrated: 8261949: fileStream::readln returns incorrect line string

Yang Yi github.com+5010047+kelthuzadx at openjdk.java.net
Mon Feb 22 02:24:39 UTC 2021


On Thu, 18 Feb 2021 12:31:29 GMT, Yang Yi <github.com+5010047+kelthuzadx at openjdk.org> wrote:

> When the last line does not contain a NEWLINE character, fileStream::readln would read
> truncated line string:
> 
> $ cat file_content:
> AA
> BB
> CC<EOF>
> 
> fileStream::readln result:
> "AA"
> "BB"
> "C"
> 
> This patch address this problem, it works for Posix and Windows since the last character
> of these systems is always '\n'.

This pull request has now been integrated.

Changeset: 2b555015
Author:    Yang Yi <qingfeng.yy at alibaba-inc.com>
Committer: Jie Fu <jiefu at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/2b555015
Stats:     5 lines in 1 file changed: 3 ins; 0 del; 2 mod

8261949: fileStream::readln returns incorrect line string

Reviewed-by: dcubed, dholmes

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

PR: https://git.openjdk.java.net/jdk/pull/2626


More information about the hotspot-dev mailing list