RFR: 8307934 JRobot.moveMouseTo must access component on EDT
Alexey Ivanov
aivanov at openjdk.org
Wed Jun 21 10:39:16 UTC 2023
On Thu, 15 Jun 2023 22:57:25 GMT, Phil Race <prr at openjdk.org> wrote:
> I still quibble with the premise of this bug. No exceptions or any nasty stuff will happen if you don't use the EDT to call getSize(). It is more a case of you may get stale results.
Stale result may lead to a test failure because robot moved mouse to an incorrect location.
I submitted this bug after I noticed it in a code review. It might have been the reason why that test failed intermittently. That test was rewritten without using `JRobot` if my memory serves me right.
> And nothing in the AWT docs say you need to do this.
AWT docs don't say AWT is thread-safe either, at least explicitly.
Yet this case is for Swing components where the docs always say Swing is not thread-safe. The `JRobot` class is `test/jdk/javax/swing/regtesthelpers/` which implies it's used for testing Swing.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14354#issuecomment-1600597862
More information about the client-libs-dev
mailing list