RFR: 8307934 JRobot.moveMouseTo must access component on EDT
Renjith Kannath Pariyangad
duke at openjdk.org
Wed Jun 21 10:04:18 UTC 2023
On Thu, 15 Jun 2023 22:51:16 GMT, Phil Race <prr at openjdk.org> wrote:
>> Hi Reviewers,
>>
>> I have updated the JRobot.java file for enabling EDT support, along with I have removed warning BUTTON1_MASK with 'BUTTON1_DOWN_MASK'.
>>
>> Regards,
>> Renjith
>
> test/jdk/javax/swing/regtesthelpers/JRobot.java line 171:
>
>> 169: */
>> 170: public void clickMouse() {
>> 171: clickMouse(InputEvent.BUTTON1_DOWN_MASK);
>
> Note that this is a different int value than the old MASK constant so it is important that you ran all tests (which you say you did) in case some test is not consistently using the Robot API and will end up mixing old and new which will likely cause failures.
In this case presses and release happening inside clickMouse overloaded function, this will not mix old and new key
```
public void clickMouse(int buttons) {
mousePress(buttons);
mouseRelease(buttons);
delay();
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14354#discussion_r1236737071
More information about the client-libs-dev
mailing list