On Tue, 8 Mar 2022 21:12:33 GMT, Zhengyu Gu <z...@openjdk.org> wrote:

>>> I think `NewStringUTF()` can throw OOM and also return `NULL`, just which 
>>> one you pick.
>> 
>> Yes.
>> 
>> But we're discussing whether a check for exception is necessary after 
>> `(*env)->SetObjectArrayElement`.
>
> `SetObjectArrayElement()` may throw `ArrayIndexOutOfBoundsException` and 
> `ArrayStoreException`, but I don't see it is possible here.

That's exactly my point. Therefore the check for exception after 
`SetObjectArrayElement` is unnecessary.

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

PR: https://git.openjdk.java.net/jdk/pull/7691

Reply via email to