RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer
Alexey Ivanov
aivanov at openjdk.org
Fri Mar 28 19:32:32 UTC 2025
On Fri, 28 Mar 2025 09:41:22 GMT, Daniel Gredler <dgredler at openjdk.org> wrote:
> WTaskbarPeer contains a check as to whether the current Windows version is Windows 7 or later. The current minimum supported version is Windows 10, so this is no longer needed.
>
> There didn't seem to be a public test exercising this code, so I also added a basic Taskbar sanity test.
src/java.desktop/windows/classes/sun/awt/windows/WTaskbarPeer.java line 46:
> 44: private static synchronized void init() {
> 45: if (!initExecuted) {
> 46: supported = ShellFolder.invoke(() -> nativeInit());
I wonder what will happen if I start `java.exe` on a system with Windows Vista which doesn't support these features.
If the native code returns an error, then it's fine.
I ask this question not only out of curiosity but also because it looks like people run Java apps on Windows versions before Windows 10. We had to implement fallback for older versions of Windows in [JDK-8321151](https://bugs.openjdk.org/browse/JDK-8321151).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24287#discussion_r2019228983
More information about the client-libs-dev
mailing list