-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8323965: modify fix for 8317771 to remove reflection instantiation of the inner class #18867
Conversation
…the inner class
👋 Welcome back asemenov! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
/issue add 8322239 |
@savoptik |
/issue remove8322239 |
@savoptik Command syntax:
Some examples:
If issues are specified only by their ID, the title will be automatically retrieved from JBS. The project prefix ( |
/issue remove 8322239 |
@savoptik |
/issue add 8329667 |
@savoptik |
public static AccessibleJTreeNodeCreateAccessor getAccessibleJTreeNodeCreateAccessor() { | ||
var access = accessibleJTreeNodeCreateAccessor; | ||
if (access == null) { | ||
ensureClassInitialized(JTree.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.
This probably doesn't work as JTree class initialization does not seem to trigger AccessibleJTree class initialization. The other one for AccessibleJTreeNode is dubious too, maybe it just happens that all accesses are correctly made only after the related classes are initialized.
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.
This line calls the ensureClassInitialized()
method, which performs a full initialization of the class... It calls: MethodHandles.lookup().ensureInitialized()
, which, as stated in the documentation , performs a full initialization.
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 know, but initializing a class does not necessarily initialize its nested/inner classes
The problem with this fix is that on the test example attached to the bug any attempt of navigation trough the items of JTree whole voice over is enabled causes java to stop responding. I see in the logs that it does call this exact place thousands of time constantly. So it seems like it makes the problem with java stalling on large size trees to re-appear. |
@azuev-java |
@@ -4272,6 +4272,10 @@ protected class AccessibleJTree extends AccessibleJComponent | |||
TreePath leadSelectionPath; | |||
Accessible leadSelectionAccessible; | |||
|
|||
static { | |||
SwingAccessor.setAccessibleJTreeNodeCreateAccessor(new AccessibleTreNodeACreateccessor()); |
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 think there is a typo here. AccessibleTreNodeACreateccessor does not sound right. Should be AccessibleTreeNodeCreateAccessor.
@savoptik This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@savoptik this pull request can not be integrated into git checkout asemenov/JDK-8323965
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
@savoptik This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@savoptik This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
I replaced reflection with using an accessor
@azuev-java please review
Progress
Warning
8323965: modify fix for 8317771 to remove reflection instantiation of the inner class
Issues
Backport <hash>
with the hash of the original commit. See Backports.Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18867/head:pull/18867
$ git checkout pull/18867
Update a local copy of the PR:
$ git checkout pull/18867
$ git pull https://git.openjdk.org/jdk.git pull/18867/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18867
View PR using the GUI difftool:
$ git pr show -t 18867
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18867.diff
Webrev
Link to Webrev Comment