On Wed, 22 Mar 2023 18:40:56 GMT, Abhishek Kumar <abhis...@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