On Mon, 31 Aug 2026 14:15:54 GMT, Matthias Baesken <[email protected]> wrote:

> Some RegCloseKey calls on hSubKey are missing; and the "NT 4.0 SP3" coding in 
> the file looks a bit outdated - is it maybe some leftover from older coding ? 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

The whole coding below (line 320 and following) looks strange

            if (ret != ERROR_SUCCESS) {
                /*
                 * NT 4.0 SP3 fails here since it doesn't have the "Std"
                 * entry in the Time Zones registry.
                 */
                RegCloseKey(hSubKey);
                ret = RegOpenKeyExW(hKey, stdNamePtr, 0, KEY_READ, 
(PHKEY)&hSubKey);
                if (ret != ERROR_SUCCESS) {
                    goto err;
                }
                break;


If I get the comment right, it is for NT 4.0 SP3 but this is not supported for 
a very long time. Additionally it does another RegOpenKeyExW but in case of 
success it breaks out of the for loop - so why are we doing the additional 
RegOpenKeyExW ?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/32608#issuecomment-5479716015

Reply via email to