RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor
Alexey Ivanov
aivanov at openjdk.org
Wed Dec 4 13:47:43 UTC 2024
On Tue, 3 Dec 2024 18:02:45 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> src/java.desktop/share/classes/java/awt/Cursor.java line 303:
>>
>>> 301: String key = prefix + DOT_FILE_SUFFIX;
>>> 302:
>>> 303: String fileName = systemCustomCursorProperties.getProperty(key);
>>
>> You can keep the `final` modifier, probably.
>
> I really like how this line now fits in 80 characters limit. But if you insist - I will return it.
That's what I thought. At the same time, it's only two columns longer than 80 chars a line.
The usage of `final` modifiers seems inconsistent in the method. Maybe remove `final` from `localized` too? Then there would be no `final` modifiers till `hotPoint`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21824#discussion_r1869522599
More information about the client-libs-dev
mailing list