RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v2]
Alan Bateman
alanb at openjdk.org
Tue Oct 17 10:36:14 UTC 2023
On Tue, 17 Oct 2023 03:09:09 GMT, Chen Liang <liach at openjdk.org> wrote:
> The thrown CCE was intended for `Files.readString` and `Files.writeString`, and is in reality, only used by those 2 sites. However, you missed updating those sites, so they now throw IAE instead of CCE, which should be fixed.
Right, these APIs are specified to throw an IOException "If an I/O error occurs reading from the file or a malformed or unmappable byte sequence is read". Changing this to throw an unexpected IAE would be a breaking change. So good to spot this. Need to make sure that tier2 tests are run with this change.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16209#issuecomment-1766104613
More information about the nio-dev
mailing list