RFR: 8288589: Files.readString ignores encoding errors for UTF-16 [v2]

Naoto Sato naoto at openjdk.org
Tue Jun 21 18:27:20 UTC 2022


On Tue, 21 Jun 2022 08:55:09 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> My comment was mostly asking if we need to add more tests for Files.writeString. I would have expected a test for that method to fail with this bug. Maybe we need to create a new issue to expand the tests for this method.

Added a test case in ReadWriteString.java, which is the unit test for `Files.read/writeString()` methods.

> It looks like description for IOException was copied from the 4-arg writeString to the 3-arg writeString. I've created JDK-8288836 to track this.

Thanks for filing the issue.

> One other thing, this is a regression in 19 so I assume the PR should be against openjdk/jdk19 rather than the main line.

Since this PR already got a few approvals, I will backport the changeset to the jdk19 line after this PR gets integrated.

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

PR: https://git.openjdk.org/jdk/pull/9193


More information about the core-libs-dev mailing list