RFR: 8325590: Regression in round-tripping UTF-16 strings after JDK-8311906
Alan Bateman
alanb at openjdk.org
Tue Feb 13 07:24:03 UTC 2024
On Mon, 12 Feb 2024 21:29:02 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> Correct the result string coder of a string encoded using a CharsetDecoder with multi-byte encoded input.
> Added tests for UTF16 strings and a regression test.
test/jdk/java/nio/file/Files/ReadWriteString.java line 322:
> 320: }
> 321: assertEquals(actual, original, "Round trip string mismatch with multi-byte encoding");
> 322: }
The update to newStringNoRepl1 looks fine.
The added test is very different to the tests in this source file. We really need to expand the test to exercise a lot more charsets and input cases. It's okay to have a targeted test for now but needs to be renamed to be consistent with the other tests. Also the other tests use testFiles as the file paths rather than putting files in /tmp.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17817#discussion_r1487326652
More information about the nio-dev
mailing list