Opened 10 months ago
Closed 9 months ago
#18776 closed bug (fixed)
Bug in KeyStore api documentation (easy)
Reported by: | ilzu | Owned by: | nielx |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | Documentation | Version: | R1/beta4 |
Keywords: | KeyStore | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
In KeyStore API documentation (https://www.haiku-os.org/docs/api/classBKeyStore.html , https://git.haiku-os.org/haiku/tree/docs/user/app/KeyStore.dox) it is said in multiple variants of GetKey -function that "This is a convenience method that calls GetKey(const char* keyring, BKeyType type, const char* identifier, const char* secondaryIdentifier, bool secondaryIdentifierOptional, BKey& key). It sets secondaryIdentifierOptional to false, meaning it both identifiers are required to match."
But in the source code (https://git.haiku-os.org/haiku/tree/src/kits/app/KeyStore.cpp), in all cases I looked for, those functions set the secondaryIdentifierOptional to true, which is opposite to what the documentation says.
Change History (5)
comment:1 by , 10 months ago
Summary: | Bug in KeyStore api documentation → Bug in KeyStore api documentation (easy) |
---|
comment:2 by , 10 months ago
comment:3 by , 10 months ago
I looked in the commit log to see if there was a reason for it being this way, but didn't find anything. So, yes, changing the code to match the documentation would also be fine.
comment:4 by , 10 months ago
I've pushed a fix for this for review. https://review.haiku-os.org/c/haiku/+/7398
comment:5 by , 9 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Merged in hrev57580
Personally I think it is a bug in the code, as the logic seems more correct on the documentation. Which one should be fixed, the logic of the code or the documentation?