RFR: 8150564: Migrate useful ExtendedRobot methods into awt.Robot [v30]
Alisen Chung
achung at openjdk.org
Thu Aug 7 23:04:22 UTC 2025
On Thu, 7 Aug 2025 19:05:27 GMT, Alisen Chung <achung at openjdk.org> wrote:
>> test/jdk/java/awt/datatransfer/Independence/IndependenceSwingTest.java line 29:
>>
>>> 27: * @requires (os.family == "linux")
>>> 28: * @summary To make sure that System & Primary clipboards should behave independently
>>> 29: * @library /lib/client
>>
>> Suggestion:
>>
>>
>>
>> Many tests still use `@library /lib/client`.
>>
>> Not only are they unnecessary in most cases, but they can also hide the use of `ExtendedRobot`.
>>
>> For example, in this test, the use of `ExtendedRobot` has not been removed, and it is implicitly compiled due to the presence of `@library /lib/client`. After removing `@library`, the test no longer compiles.
>>
>> error: cannot find symbol
>> private static ExtendedRobot robot;
>>
>>
>> I suggest removing all unnecessary uses of `@library/lib/client` because there are still plenty of uses of `ExtendedRobot` in other tests as well.
>>
>> This issue has been [raised](https://github.com/openjdk/jdk/pull/22044#discussion_r2140831788) before, but it has not yet been resolved for all tests.
>>
>> ---
>>
>> Also, please run a grep search for `ExtendedRobot` in the `test/jdk` directory. This pull request does not cover many tests that still use the `ExtendedRobot` (which doesn't even use the `dragAndDrop()` and can be safely removed).
>
> I planned on removing ExtendedRobot from these tests in a separate followup PR since there are many test changes in this one already.
I've updated the current tests in to remove /client/lib from the tests I already removed ER from and I'll remove the remaining tests when I remove ER in a followup PR
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22044#discussion_r2261607062
More information about the client-libs-dev
mailing list