RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v4]

Shaojin Wen duke at openjdk.org
Tue Oct 17 14:36:40 UTC 2023


On Tue, 17 Oct 2023 14:09:08 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

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

@lianch 's suggestion in PR #14812 : 
"Make the NoRepl methods throw IllegalArgument (like NoRepl1 do) by default; move the exception handling logic into Files implementation, the only place where it's actually needed. "

We used noRepl in UUID/HexFormat to handle CCE. I felt that the code was not clean enough, so I submitted this PR.

After the discussion above, I found that things are not that simple. Should I continue this PR?

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

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


More information about the nio-dev mailing list