On Tue, 17 Oct 2023 14:30:26 GMT, Shaojin Wen <d...@openjdk.org> wrote:

> @wenshao The proposal changes the exception types for seemingly no reason.
> What concrete problem does this enhancement PR address?

@rgiulietti The API was exposed to create a String without duplicating an array 
in compatible encoding. Initially they are added for Files.readString and 
writeString, which has a custom exception logic. However, in the coming years, 
the usages for no-replication has grown, but no other user needs the CCE 
behavior, which makes code complex. As a result, we are proposing to localize 
the CCE logoc to Files.readString and writeString so other use sites can call 
the APIs without try-catch.

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

PR Comment: https://git.openjdk.org/jdk/pull/16209#issuecomment-1766561936

Reply via email to