Re: RFR: 8288589: Files.readString ignores encoding errors for UTF-16

2022-06-23 Thread Iris Clark
On Thu, 23 Jun 2022 16:12:31 GMT, Naoto Sato wrote: > Hi all, > > This pull request contains a backport of commit > [2728770e](https://urldefense.com/v3/__https://github.com/openjdk/jdk/commit/2728770e3d73bb11c4d6e54b5aff91588a1a780b__;!!ACWV5N9M2RV99hQ!JWTXtcOlxAlKs1OamoE2hbweIBcqRBtUZoAQmPyrE

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

2022-06-23 Thread Naoto Sato
Hi all, This pull request contains a backport of commit [2728770e](https://urldefense.com/v3/__https://github.com/openjdk/jdk/commit/2728770e3d73bb11c4d6e54b5aff91588a1a780b__;!!ACWV5N9M2RV99hQ!N3mEnVUKBkymH2i4wvdNdT17pAtXF6773dQA7XG_uBo8CmAZNuaRhs6MMY2TvgGZ6WI7Xst8ex_Eul_yWGyTcg$ ) from the [op

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

2022-06-23 Thread Alan Bateman
On Wed, 22 Jun 2022 17:41:45 GMT, Naoto Sato wrote: > Done. Thanks, that will be helpful if the test fails. - PR: https://git.openjdk.org/jdk/pull/9193

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

2022-06-23 Thread Alan Bateman
On Wed, 22 Jun 2022 17:46:58 GMT, Naoto Sato wrote: >> This is a regression caused by the fix to >> [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed >> the method `String.decodeWithDecoder()` was only invoked with cs.REPLACE >> mode based on the comment "should not hap

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

2022-06-22 Thread Naoto Sato
On Wed, 22 Jun 2022 10:48:47 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Moved `@Test` annotations > > test/jdk/java/nio/file/Files/ReadWriteString.java line 304: > >> 302: throws I

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

2022-06-22 Thread Naoto Sato
On Wed, 22 Jun 2022 10:50:56 GMT, Alan Bateman wrote: > > > 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 lin

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

2022-06-22 Thread Naoto Sato
> This is a regression caused by the fix to > [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the > method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode > based on the comment "should not happen". Possibly this refers to the > `String(byte[], int,

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

2022-06-22 Thread Alan Bateman
On Tue, 21 Jun 2022 21:49:58 GMT, Naoto Sato wrote: >> This is a regression caused by the fix to >> [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed >> the method `String.decodeWithDecoder()` was only invoked with cs.REPLACE >> mode based on the comment "should not hap

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

2022-06-22 Thread Alan Bateman
On Tue, 21 Jun 2022 18:23:35 GMT, Naoto Sato wrote: > > 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 g

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

2022-06-21 Thread Naoto Sato
On Tue, 21 Jun 2022 20:59:40 GMT, Andrey Turbanov wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding a test case in ReadWriteString.java > > test/jdk/java/lang/String/NoReplTest.java line 47: > >> 45: privat

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

2022-06-21 Thread Naoto Sato
> This is a regression caused by the fix to > [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the > method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode > based on the comment "should not happen". Possibly this refers to the > `String(byte[], int,

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

2022-06-21 Thread Naoto Sato
> This is a regression caused by the fix to > [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the > method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode > based on the comment "should not happen". Possibly this refers to the > `String(byte[], int,

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

2022-06-21 Thread Andrey Turbanov
On Tue, 21 Jun 2022 18:12:23 GMT, Naoto Sato wrote: >> This is a regression caused by the fix to >> [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed >> the method `String.decodeWithDecoder()` was only invoked with cs.REPLACE >> mode based on the comment "should not hap

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

2022-06-21 Thread Naoto Sato
On Tue, 21 Jun 2022 08:55:09 GMT, Alan Bateman 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 t

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

2022-06-21 Thread Naoto Sato
> This is a regression caused by the fix to > [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the > method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode > based on the comment "should not happen". Possibly this refers to the > `String(byte[], int,

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

2022-06-21 Thread Alan Bateman
On Sat, 18 Jun 2022 00:31:06 GMT, Naoto Sato wrote: >> This is a regression caused by the fix to >> [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed >> the method `String.decodeWithDecoder()` was only invoked with cs.REPLACE >> mode based on the comment "should not hap

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

2022-06-17 Thread kristylee88
On Sat, 18 Jun 2022 00:31:06 GMT, Naoto Sato wrote: >> This is a regression caused by the fix to >> [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed >> the method `String.decodeWithDecoder()` was only invoked with cs.REPLACE >> mode based on the comment "should not hap

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

2022-06-17 Thread Naoto Sato
> This is a regression caused by the fix to > [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the > method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode > based on the comment "should not happen". Possibly this refers to the > `String(byte[], int,

Re: RFR: 8288589: Files.readString ignores encoding errors for UTF-16

2022-06-17 Thread Naoto Sato
On Fri, 17 Jun 2022 10:43:31 GMT, Alan Bateman wrote: > Files.readString has been broken several times by the changes in to String in > this area. Would it be possible to survey the tests that we have for this > method, esp. the error cases, to see if we need more tests. I looked for similar t

Re: RFR: 8288589: Files.readString ignores encoding errors for UTF-16

2022-06-16 Thread Iris Clark
On Thu, 16 Jun 2022 22:21:23 GMT, Naoto Sato wrote: > This is a regression caused by the fix to > [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the > method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode > based on the comment "should not happen"

Re: RFR: 8288589: Files.readString ignores encoding errors for UTF-16

2022-06-16 Thread Roger Riggs
On Thu, 16 Jun 2022 22:21:23 GMT, Naoto Sato wrote: > This is a regression caused by the fix to > [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the > method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode > based on the comment "should not happen"

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

2022-06-16 Thread Naoto Sato
This is a regression caused by the fix to [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode based on the comment "should not happen". Possibly this refers to the `String(byte[], int, int, Chars