<AWT Dev> RFR: 8259729: Missed JNFInstanceOf -> IsInstanceOf conversion

Phil Race prr at openjdk.java.net
Wed Jan 13 22:04:03 UTC 2021


On Wed, 13 Jan 2021 21:30:24 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Fair question but there was no NULL check there before so I assume it isn't expected to be NULL.
>> I could add a NULL check but then we'd skip over the following code and maybe hide something that could be a problem. I don't mind either way.
>
> I do not know how exactly the JNFIsInstanceOf works for NULL parameters, will it return true or false?

I just hacked a usage in A11Y in JDK 16 :
    printf("OBJ %d\n", JNFIsInstanceOf(env, NULL, &sjc_CAccessible));

it returns TRUE for NULL - same as JNI.

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

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


More information about the awt-dev mailing list