RFR: 8364808: Make BasicDesktopPaneUI.Actions.MOVE_RESIZE_INCREMENT static
Andrey Turbanov
aturbanov at openjdk.org
Thu Aug 7 09:23:23 UTC 2025
On Wed, 6 Aug 2025 12:44:48 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
>> Looks like no reasons for it to be instance field
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java line 377:
>
>> 375: private static String NAVIGATE_NEXT = "navigateNext";
>> 376: private static String NAVIGATE_PREVIOUS = "navigatePrevious";
>> 377: private static final int MOVE_RESIZE_INCREMENT = 10;
>
> It appears that all of the above strings in `Actions` class can be final.
Yep. I noticed that in JDK some of constant String's are not marked as `final`. Not sure what the reason for that.
It deserves a separate issue for investigation/fix.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25893#discussion_r2259675372
More information about the client-libs-dev
mailing list