RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v3]
Claes Redestad
redestad at openjdk.org
Tue Oct 17 10:45:22 UTC 2023
On Tue, 17 Oct 2023 10:42:59 GMT, Shaojin Wen <duke at openjdk.org> wrote:
>> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to use try...catch to handle CharacterCodingException and throw IllegalArgumentException instead of CharacterCodingException to make the calling code cleaner.
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>
> Files.readString/writeString throws CCE
test/jdk/java/lang/String/NoReplTest.java line 62:
> 60: .withUpperCase()
> 61: .formatHex(read.getBytes(UTF_16)));
> 62: } catch (CharacterCodingException cce) {
Shouldn't these test changes be completely reverted now?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16209#discussion_r1361904067
More information about the nio-dev
mailing list