New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8259729: Missed JNFInstanceOf -> IsInstanceOf conversion #2066
Conversation
|
@@ -1453,7 +1453,7 @@ - (id)accessibilityHitTest:(NSPoint)point withEnv:(JNIEnv *)env | |||
jobject jparent = fComponent; | |||
|
|||
id value = nil; | |||
if (JNFIsInstanceOf(env, jparent, &jc_Container)) { | |||
if ((*env)->IsInstanceOf(env, jparent, jc_Container)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but do we need to check the jparent to NULL? "A NULL object can be cast to any class."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know how exactly the JNFIsInstanceOf works for NULL parameters, will it return true or false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@prrace This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 64 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
/integrate |
@prrace Since your change was applied there have been 52 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit dff59d42b42effe1c2c78e74703c98a7c12a4c0b.
|
/integrate |
@prrace Since your change was applied there have been 72 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 360c722. |
One line fix of a missed update
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2066/head:pull/2066
$ git checkout pull/2066