On Mon, 11 Apr 2022 10:07:40 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

> The user explicitly added a text with Windows line end into the text model. 
> When such a text is written out on Windows, an extra `\r` gets added. Then 
> when this text is read in, the `\r` which is not followed by `\n` gets 
> converted to `\n` which results in a new line break.
> 
> The `else` block is needed, and it's the most common branch. The text model 
> doesn't contain `\r` (should not contain). When the text is written out on 
> Windows, line ends of `\n` are converted to `\r\n`.

Yes, exactly......

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

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

Reply via email to