On Thu, 29 Dec 2022 14:23:40 GMT, Artem Semenov <[email protected]> wrote:

>> [OutlineRowAccessibility currentAccessibleWithENV:] defines the 
>> getCurrentComponent method on the AccessibleContext instance of 
>> AccessibleJTreeNode class, however the call should go through CAccessibility 
>> so that it is executed on the Event Dispatch thread.
>
> Artem Semenov has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains four commits:
> 
>  - Merge master
>  - update accessor
>  - Please split the long lines to have 80 chars per line.
>  - 8298644 JNI call of getCurrentComponent on a wrong thread

src/java.desktop/share/classes/sun/swing/SwingAccessor.java line 60:

> 58: 
> 59:     public static AccessibleComponentAccessor 
> getAccessibleComponentAccessor() {
> 60:         return accessibleComponentAccessor;

It is better to force the "ensureClassInitialized" as any other getters in this 
class. To make sure the field is up-to-date even if it was initialized on 
another thread.

src/java.desktop/share/classes/sun/swing/SwingAccessor.java line 71:

> 69:      * For example, the renderer of a list element, a table cell, or a 
> tree node
> 70:      */
> 71:     public interface AccessibleComponentAccessor {

Note that this class declares interfaces at the top, and then field/get/set at 
the bottom of the file.

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

PR: https://git.openjdk.org/jdk/pull/11670

Reply via email to