RFR: 8329471: Remove GTK2 [v3]
Alexander Zvegintsev
azvegint at openjdk.org
Tue Jul 30 17:35:03 UTC 2024
On Tue, 30 Jul 2024 07:12:17 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> revert spacing
>
> src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKIconFactory.java line 1:
>
>> 1: /*
>
> Should we remove this comment too ?
>
> `static final int DEFAULT_TOGGLE_MENU_ITEM_SIZE = 12; // For pre-gtk2.4`
Updated.
> src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKIconFactory.java line 69:
>
>> 67: if (result == null) {
>> 68: if (TREE_COLLAPSED_ICON.equals(methodName) ||
>> 69: TREE_EXPANDED_ICON.equals(methodName))
>
> can wrap the line before || operator
>
> Suggestion:
>
> if (TREE_COLLAPSED_ICON.equals(methodName)
> || TREE_EXPANDED_ICON.equals(methodName))
Actually, there are many cases where strings are compared using "==" instead of equals in `com/sun/java/swing/plaf/gtk`, so I reverted this change in favor of [JDK-8337498](https://bugs.openjdk.org/browse/JDK-8337498) to keep this PR away from unrelated changes.
> src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java line 492:
>
>> 490: String version = AccessController.doPrivileged(
>> 491: new GetPropertyAction("jdk.gtk.version"));
>> 492: if (version == null) {
>
> `null` check for version can be removed as if version is not 3.... `GtkVersions.ANY` is returned.
Updated.
> src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java line 494:
>
>> 492: if (version == null) {
>> 493: return GtkVersions.ANY;
>> 494: } else if("3".equals(version) ){
>
> spacing
> Suggestion:
>
> } else if ("3".equals(version)) {
Updated
> test/jdk/java/awt/Gtk/GtkVersionTest/GtkVersionTest.java line 1:
>
>> 1: /*
>
> Should we modify summary as well ?
>
> copyright year and bug id needs to update.
added clarifying comment instead
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1697326437
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1697292629
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1697327024
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1697326988
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1697328432
More information about the client-libs-dev
mailing list