RFR: 8273986: JEditorPane HTML Demo - Accessibility issues [v9]
Abhishek Kumar
abhiscxk at openjdk.org
Wed Mar 22 19:16:21 UTC 2023
On Wed, 22 Mar 2023 18:40:56 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> test/jdk/javax/accessibility/JEditorPane/TestEditorPaneAccessibleChildCount.java line 117:
>>
>>> 115: });
>>> 116:
>>> 117: if ((childCount1 != childCount2) &&
>>
>> This version will update the childCount1/2 on EDT but then will use it in the main thread w/o synchronization.
>
> So, the if block should also be inside EDT as mentioned below. Right?
>
>
> SwingUtilities.invokeAndWait(() -> {
> childCount2 = ac.getAccessibleChildrenCount();
> if ((childCount1 != childCount2) &&
> (childCount1 != 0 && childCount2 != 0)) {
> System.out.println("passed");
> } else {
> System.out.println("Test1 html page accessible children" +
> " count is: "+ childCount1);
> System.out.println("Test2 html page accessible children" +
> " count is: "+ childCount2);
> throw new RuntimeException("getAccessibleChildrenCount" +
> " returned wrong child count");
> }
> });
> This version will update the childCount1/2 on EDT but then will use it in the main thread w/o synchronization.
Updated the childCount1/2 to be used on EDT in stead of main thread.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12707#discussion_r1145289799
More information about the client-libs-dev
mailing list