RFR: 8329471: Remove GTK2
Abhishek Kumar
abhiscxk at openjdk.org
Tue Jul 30 07:40:34 UTC 2024
On Mon, 29 Jul 2024 14:55:07 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
> GTK2 support for Swing/AWT was deprecated for removal in JDK 21.
>
> It's being removed because no platform that supports the JDK needs it.
>
> Manual and automated testing is green.
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`
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))
src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKIconFactory.java line 72:
> 70: {
> 71: result = new SynthExpanderIcon(methodName);
> 72:
blank lines can be removed.
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.
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)) {
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.
test/jdk/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java line 1:
> 1: /*
copyright year and bug id needs to update.
test/jdk/javax/swing/LookAndFeel/8145547/DemandGTK.java line 1:
> 1: /*
copyright year and bug id needs to update.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1696435613
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1696457856
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1696452803
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1696446568
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1696447762
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1696465623
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1696471663
PR Review Comment: https://git.openjdk.org/jdk/pull/20378#discussion_r1696473619
More information about the build-dev
mailing list