On Mon, 8 Sep 2025 23:41:57 GMT, Damon Nguyen <[email protected]> wrote:

>> Some useful methods (click, glide, waitForIdle, type) in ExtendedRobot 
>> should be migrated into Robot itself so that ExtendedRobot can be removed in 
>> the future. The tests using these ExtendedRobot methods will be handled 
>> separately.
>
> Damon Nguyen has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Add one missing source of default_delay value

src/java.desktop/share/classes/java/awt/Robot.java line 849:

> 847:     public synchronized void waitForIdle(int delayValue) {
> 848:         waitForIdle();
> 849:         delay(delayValue);

think we should recheck whether new methods like this one need to be 
synchronized. Some time ago, the synchronized keyword was removed from the 
delay method because synchronization could cause the delay to last longer than 
intended and unnecessarily block other methods.

In this case, waitForIdle() might be in a synchronized block (but the method 
itself is already synchronized), but do we really want to call delay() while 
holding the lock?

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

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

Reply via email to