On Thu, 19 Mar 2026 19:04:23 GMT, Eirik Bjørsnøs <[email protected]> wrote:

> Perhaps it would be better to leave this as-is in this PR and do a follow-up 
> PR where we investigate if getBytes, toString and checkedHash can all be 
> consolidated to just throw CharacterCodingException?

A quick prototype to declare toString (with overloads), getBytes, and 
checkedHash as `throws CharacterCodingException` revealed no showstoppers. For 
convenience we may want to introduce a variant of toString which throws IEA, 
for use by clients who have already validated the encoded string though 
checkHash or similar. But those changes clutter the intent of this PR, so 
should perhaps be taken care of separately?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30319#discussion_r2962277842

Reply via email to