On Wed, 2 Sep 2026 13:19:39 GMT, Matthias Baesken <[email protected]> wrote:
>> sun/awt/OSInfo.java contains very old Windows versions like Windows 95,98, >> ME. Those can be removed. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last revision: > > WindowsLookAndFeel.isOnVista remove more calls src/java.desktop/share/classes/sun/swing/WindowsPlacesBar.java line 79: > 77: putClientProperty("JToolBar.isRollover", Boolean.TRUE); > 78: > 79: boolean isXPPlatform = (OSInfo.getOSType() == > OSInfo.OSType.WINDOWS); I wonder whether `isXPPlatform` is needed at all, seemingly `WindowsPlacesBar` is a Windows-specific class. We may remove `isXPPlatform` and hard-code the height, `buttonSize = new Dimension(83, isXPPlatform ? 65 : 54)`, as if `isXPPlatform` is always `true`. The class is used in `WindowsFileChooserUI` only, it should never be instantiated on other platforms but Windows. src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java line 1880: > 1878: // we could probably remove the whole method > 1879: return false; > 1880: } It may be safer to remove the `isClassicWindows` method in a follow-up fix. src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java line 2105: > 2103: // This desktop property is needed to trigger reloading > the icon. > 2104: // It is kept in member variable to avoid GC. > 2105: this.desktopProperty = new > TriggerDesktopProperty(desktopPropertyName) { The `desktopProperty` field can be removed too. src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.java line 200: > 198: SortOrder sortOrder = getColumnSortOrder(header.getTable(), > column); > 199: if (sortOrder != null) { > 200: switch(sortOrder) { Suggestion: switch (sortOrder) { For consistency with the inner `switch`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32419#discussion_r3993116401 PR Review Comment: https://git.openjdk.org/jdk/pull/32419#discussion_r3993230609 PR Review Comment: https://git.openjdk.org/jdk/pull/32419#discussion_r3993307790 PR Review Comment: https://git.openjdk.org/jdk/pull/32419#discussion_r3993272744
