Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LdapAttributeSet GetAttribute documentation has conflicting information #139

Closed
mattj23 opened this issue Oct 20, 2020 · 1 comment
Closed

Comments

@mattj23
Copy link

mattj23 commented Oct 20, 2020

The LdapAttributeSet's GetAttribute method states that if an attribute is not found a null will be returned

LdapAttributeSet.cs, see line 70 and106

However, the actual implementation (line 86 and 154) simply uses the [...] operator on the dictionary base class, which instead throws a KeyNotFoundException when the key is missing (as is also specified in the documentation in lines 83 and 150).

It seems that older versions of this library did return a null value if the key wasn't found, as I discovered this issue through broken code in another project. It would be helpful to clarify in the documentation which the intended behavior is.

@dsbenghe
Copy link
Owner

dsbenghe commented Oct 23, 2020

The most recent version has the documentation corrected. Reported previously here - #121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants