RFR: JDK-8353755 : Add a helper method to Util - findComponent() [v3]

Harshitha Onkar honkar at openjdk.org
Wed Nov 5 22:11:03 UTC 2025


On Tue, 4 Nov 2025 13:36:39 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review changes: EDT check
>
> test/jdk/javax/swing/JFileChooser/bug4759934.java line 74:
> 
>> 72:             robot.mousePress(MouseEvent.BUTTON1_DOWN_MASK);
>> 73:             robot.mouseRelease(MouseEvent.BUTTON1_DOWN_MASK);
>> 74:             robot.delay(500);
> 
> All the clicks above are to click a button… Should we replace these clicks with programmatic clicks?
> 
> However, I'd like to ensure the updated test still reproduces the original bug. Updating this test could better pull out into its own issue. (Yes, I remember that this refactoring comes from an internal comment I made when `javax/swing/JFileChooser/bug4759934.java` was open-sourced.)

I'll be updating the tests in another PR. 

To answer your question.
> All the clicks above are to click a button… Should we replace these clicks with programmatic clicks?

I'm for keeping the other clicks as-is (via Robot) since we have reference to these buttons unlike the cancel button of JFileChooser and this way we keep much of the original test case intact without overly modifying it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27944#discussion_r2496343433


More information about the client-libs-dev mailing list