Advapi32Util.registryGetStringValue Javadoc says only REG_SZ values are allowed, but implementation also allows REG_EXPAND_SZ
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- operating-systems
Research direction
Read contrib/platform/src/com/sun/jna/platform/win32/Advapi32Util.java around registryGetStringValue(), registrySetStringValue(), and registryGetExpandableStringValue(). Determine whether REG_EXPAND_SZ is intended to be accepted, then align the Javadoc or implementation with that contract. Done means the documented behavior and the registry value handling agree.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- Java
- Stars
- 8.9k
- Forks
- 1.7k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from java-native-access/jna
-
Difficulty 4/5 3-5 days Newbie friendliness 66/100
java-native-access/jna#1738 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
java-native-access/jna#1736 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
java-native-access/jna#1717 ·
-
Windows32Exception - The parameter is incorrectPossibly taken @marktech0813 claimed this 332 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
java-native-access/jna#1700 · 11 comments ·
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
java-native-access/jna#1698 · 1 comment ·
All issues in java-native-access/jna
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Netcracker/qubership-integration-platform#1046 ·
Maintainers usually reply within 2 days
-
`check_java_version()` fails when Java path contains spaces (Windows / Git Bash, `C:\Program Files`)Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Fix Math.ceilDiv wrong result for exact positive divisionsPossibly taken @pamod-madubashana claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
scala-native/scala-native#5094 ·
Maintainers usually reply within 1 day
-
NullPointerException in blocking command completion callback when the command succeeds (3.52.0)Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days