RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer
Daniel Gredler
dgredler at openjdk.org
Fri Mar 28 20:59:17 UTC 2025
On Fri, 28 Mar 2025 19:28:58 GMT, Alexey Ivanov <aivanov 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).
Interesting, thanks for the link!
One issue I see with [JDK-8294427](https://bugs.openjdk.org/browse/JDK-8294427) is that it didn't work all the way back to the original Windows 10 release, which conflicts with the [Oracle compatibility matrix](https://www.oracle.com/java/technologies/javase-subscription/documentation.html#sysconfig).
But besides that, I'm surprised that a fix was implemented and tested targeting Windows 7 compatibility. Is there a different OpenJDK compatibility matrix that I should be aware of? If not, what were the criteria dictating that Windows 7 compatibility be maintained (at least in 2023)?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24287#discussion_r2019367351
More information about the client-libs-dev
mailing list