On Mon, 21 Sep 2026 13:06:25 GMT, Matthias Baesken <[email protected]> wrote:
> There are some RegQueryValueEx* calls in e.g. net and nio, those can > potentially be simplified by using RegGetValue*. > Benefit is that some null termination of string results might be not needed > any more, that is missing now. > > See > https://learn.microsoft.com/de-de/windows/win32/api/winreg/nf-winreg-reggetvaluea > . > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). src/java.base/windows/native/libjava/TimeZone_md.c line 72: > 70: * Calls RegGetValue to get the value for the specified key. > 71: * First tries the Unicode version, if that fails, > 72: * falls back to the ANSI version and converts to Unicode. The fallback only made sense on non-Unicode Windows versions, the last of which was Windows ME. We should remove it, either here or in a follow up ticket. This method `getValueInRegistry` can be replaced with `RegGetValueW` then. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32987#discussion_r4064236978
