On Mon, 29 Jan 2024 21:29:53 GMT, Phil Race <p...@openjdk.org> wrote:

>> Christoph Langer has updated the pull request with a new target base due to 
>> a merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains six additional 
>> commits since the last revision:
>> 
>>  - Move Exception Check to the right place
>>  - Merge branch 'master' into JDK-8323664
>>  - Changes to assertion function and test as discussed
>>  - Revert "JDK-8323664"
>>    
>>    This reverts commit 32128744252d75104e0d19f5eb701ffdc7b3d417.
>>  - Merge branch 'master' into JDK-8323664
>>  - JDK-8323664
>
> src/java.desktop/windows/native/libawt/windows/awt_Debug.cpp line 160:
> 
>> 158:     env->ExceptionCheck();
>> 159:     jclass graphicsEnvClass = 
>> env->FindClass("java/awt/GraphicsEnvironment");
>> 160: 
> 
> FindClass may also throw an Exception, (see 
> https://docs.oracle.com/en/java/javase/21/docs/specs/jni/functions.html#findclass)
> and in fact so can GetStaticMethodID.
> 
>  So now I'm wondering why these don't also get complained about ..

In fact, any method can throw an exception…

Is there a guide which clearly states where  `ExceptionCheck` is required? The 
function returns a boolean indicating whether there's a pending exception. 
Shall we back out if there is?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17404#discussion_r1471187806

Reply via email to