On Mon, 22 Apr 2024 09:57:28 GMT, Artem Semenov <[email protected]> wrote:

>> src/java.desktop/share/classes/sun/swing/SwingAccessor.java line 331:
>> 
>>> 329:         var access = accessibleJTreeNodeCreateAccessor;
>>> 330:         if (access == null) {
>>> 331:             ensureClassInitialized(JTree.class);
>> 
>> 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.
>
> 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.

I know, but initializing a class does not necessarily initialize its 
nested/inner classes

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18867#discussion_r1574623725

Reply via email to