[OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v3]

Maxim Kartashev github.com+28651297+mkartashev at openjdk.java.net
Fri Jul 23 09:07:10 UTC 2021


On Sat, 17 Jul 2021 03:05:35 GMT, Sergey Bylokhov <serb at 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


More information about the 2d-dev mailing list