On Tue, 8 Mar 2022 13:37:44 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> ??? You want to check and cleanup if NewStringUTF fails. You only want to >> call SetObjectElementArray if NewStringUTF succeeds. > > Can `SetObjectElementArray` raise an exception? > The index is within the array length and we store a string. I assume > `cacheDirArray` is a string array. > ??? You want to check and cleanup if NewStringUTF fails. You only want to > call SetObjectElementArray if NewStringUTF succeeds. If the SetObjectArrayElement will throw an exception we will call the NewStringUTF while the exception is raised which is a kind of "jni" issue. If such an exception is possible we should check and cleanup. ------------- PR: https://git.openjdk.java.net/jdk/pull/7691