RFR: 8150564: Migrate useful ExtendedRobot methods into awt.Robot [v4]

Damon Nguyen dnguyen at openjdk.org
Mon Sep 8 23:31:50 UTC 2025


On Wed, 3 Sep 2025 23:46:50 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add finally block
>
> src/java.desktop/share/classes/java/awt/Robot.java line 792:
> 
>> 790:     /**
>> 791:      * A convenience method that simulates clicking a mouse button by calling {@code mousePress}, {@code mouseRelease},
>> 792:      * and {@code waitForIdle}. Invokes {@code waitForIdle} with a default delay of 20 milliseconds after
> 
> Suggestion:
> 
>      * and {@code waitForIdle}. Invokes {@code waitForIdle} with a default delay of {@value #DEFAULT_STEP_DELAY} milliseconds after
> 
> This renders `20` as a link that links to the constant that users can use.

Updated, thanks.

> src/java.desktop/share/classes/java/awt/Robot.java line 855:
> 
>> 853:      *
>> 854:      * @implSpec Invokes {@link #mouseMove(int, int) mouseMove} with a default
>> 855:      * {@link #DEFAULT_STEP_LENGTH step-length} and {@link #DEFAULT_STEP_DELAY step-delay}.
> 
> You can use:
> 
>      * @implSpec Invokes {@link #mouseMove(int, int) mouseMove} with a step-length
>      * of {@value #DEFAULT_STEP_LENGTH} and a step-delay of {@value #DEFAULT_STEP_DELAY}.
> 
> 
> Renders like:
> 
>> Invokes [`mouseMove`]() with a step-length of [`2`]() and a a step-delay of [`20`]().
> 
> Same for other sites.

Updated this and in similar spots. Let me know if you see any other issues with this. Thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26969#discussion_r2331578071
PR Review Comment: https://git.openjdk.org/jdk/pull/26969#discussion_r2331579028


More information about the client-libs-dev mailing list