On Sat, 17 Jul 2021 03:05:35 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> Maxim Kartashev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   1. Marked the test as headful so that it doesn't fail on a headless
>>   system.
>>   2. Added exception checks to Windows-specific code.
>
> src/java.desktop/windows/native/libawt/windows/awt_Component.cpp line 6575:
> 
>> 6573:     jintArray obj = (jintArray)JNU_CallStaticMethodByName(env, 
>> &ignoreException,
>> 6574:                                                           
>> "java/awt/event/InputEvent",
>> 6575:                                                           
>> "getButtonDownMasks", "()[I").l;
> 
> obj might be null? Can not we just add CHECK_NULL(obj) here?

obj indeed might be null, especially since all kinds of things could go wrong 
during class/method resolution. Added `CHECK_NULL(obj)` here.

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

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

Reply via email to