RFR: 8307934 JRobot.moveMouseTo must access component on EDT

Phil Race prr at openjdk.org
Thu Jun 15 23:00:03 UTC 2023


On Thu, 8 Jun 2023 03:21:18 GMT, Renjith Kannath Pariyangad <duke at openjdk.org> wrote:

>> test/jdk/javax/swing/regtesthelpers/JRobot.java line 260:
>> 
>>> 258:      */
>>> 259:     public void convertRectToScreen(Rectangle r, Component c) {
>>> 260:         AtomicReference<Point> p = new AtomicReference<>();
>> 
>> So this change must be documented on all affected entry points, so that people understand
>> what it does.
>> Also touching Robot means you need to run ALL tests that use this utility and make sure you didn't break any. 
>> Have you done that ?
>
> Thanks @prrace for the reviews, 
> I have added EDT support for 'getCenterPoint' and 'convertRectToScreen' functions, executed all the tests which are using this function and confirmed its working.

But you seem to have ignored my comment about documenting it on 'all entry points' meaning EVERY exported API from this class which can end up here should say something like
"This method will invoke code on the Event Dispatch Thread".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14354#discussion_r1231607943



More information about the client-libs-dev mailing list