You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the implementation incorrect or is this the expected behavior
Well it's probaby incorrect, but removing that behavior would probably break compatibility, so we're stuck with it. It's been that way for 11 years, so I doubt there's any value in changing it now.
and the Javadoc should be adjusted?
Given we have another documented method for REG_EXPAND_SZ I'd just leave it as-is.
I'll note the exception message for registryGetExpandableStringValue() is wrong as it refers to REG_SZ, probably as a result of copy-paste. There may be other such errors if you're eager to submit a PR.
The Javadoc of
Advapi32Util.registryGetStringValue()
https://github.com/java-native-access/jna/blob/e96f30192e9455e7cc4117cce06fc3fa80bead55/contrib/platform/src/com/sun/jna/platform/win32/Advapi32Util.java#LL754C32-L754C32
says
Get a registry REG_SZ value.,
however the implementation
https://github.com/java-native-access/jna/blob/e96f30192e9455e7cc4117cce06fc3fa80bead55/contrib/platform/src/com/sun/jna/platform/win32/Advapi32Util.java#LL772C52-L772C52
also returns the value if its type is
REG_EXPAND_SZ
.My expectation was that
REG_EXPAND_SZ
would be rejected for symmetry reasons:#registrySetStringValue()
<-REG_SZ
#registryGetStringValue()
->REG_SZ
/REG_EXPAND_SZ
#registrySetExpandableStringValue()
<-REG_EXPAND_SZ
#registryGetExpandableStringValue()
->REG_EXPAND_SZ
Is the implementation incorrect or is this the expected behavior and the Javadoc should be adjusted?
The text was updated successfully, but these errors were encountered: