On Thu, 4 Sep 2025 10:03:10 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:

>> Volkan Yazici has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Improve docs
>
> src/java.base/share/classes/java/lang/String.java line 961:
> 
>> 959:      * @throws CharacterCodingException For malformed input or 
>> unmappable characters
>> 960:      */
>> 961:     static byte[] getBytesUTF8OrThrow(String s) throws 
>> CharacterCodingException {
> 
> `encodeUTF8OrThrow(s.coder(), s.value());` specified to throw 
> `UnmappableCharacterException`. May we should to it here too?

UCE extends from CCE, hence `throws UCE` is already covered. Plus, what I see 
from `JLA::*OrThrow` methods, we only declare and document the CCE, not its 
subclasses.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27084#discussion_r2321722048

Reply via email to