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

Phil Race prr at openjdk.java.net
Wed Jan 13 21:28:03 UTC 2021


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

>> One line fix of a missed update
>
> src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m line 1456:
> 
>> 1454: 
>> 1455:     id value = nil;
>> 1456:     if ((*env)->IsInstanceOf(env, jparent, jc_Container)) {
> 
> Not sure, but do we need to check the jparent to NULL? "A NULL object can be cast to any class."

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.

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

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


More information about the awt-dev mailing list