RFR: 8150564: Migrate useful ExtendedRobot methods into awt.Robot [v2]
Damon Nguyen
dnguyen at openjdk.org
Wed Aug 27 21:22:01 UTC 2025
On Wed, 27 Aug 2025 19:38:48 GMT, Phil Race <prr at openjdk.org> wrote:
>> src/java.desktop/share/classes/java/awt/Robot.java line 137:
>>
>>> 135: * Default pixel step-length for mouse {@link #glide(int, int, int, int) glide}.
>>> 136: */
>>> 137: public final int DEFAULT_STEP_LENGTH = 2;
>>
>> Is there a reason these fields are not static? Non-static final fields like these are constant only in the class and not constant when used by other classes, and require an instance to access, but I don't find these differences convincing as the reason.
>
>> Is there a reason these fields are not static? Non-static final fields like these are constant only in the class and not constant when used by other classes, and require an instance to access, but I don't find these differences convincing as the reason.
>
> This looks like a mistake. In an earlier version of this change there were also variables to over-ride these for this instance named "stepDelay" and "stepLength" and they were inadvertently marked as static.
> I said they should be instance variables .. and that seems to have then been applied to the DEFAULT_* variables too which was not the request.
Updated. Will update in the CSR as well. Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26969#discussion_r2305317763
More information about the client-libs-dev
mailing list