RFR: 8150564: Migrate useful ExtendedRobot methods into awt.Robot [v30]
Alisen Chung
achung at openjdk.org
Thu Aug 7 19:08:37 UTC 2025
On Thu, 7 Aug 2025 16:55:45 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
>> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update robot spec
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22044#discussion_r2261187869
More information about the client-libs-dev
mailing list