RFR: 8298644 JNI call of getCurrentComponent on a wrong thread [v4]
Sergey Bylokhov
serb at openjdk.org
Thu Dec 29 20:56:51 UTC 2022
On Thu, 29 Dec 2022 14:23:40 GMT, Artem Semenov <asemenov at openjdk.org> 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
More information about the client-libs-dev
mailing list