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

Update Claim#asString documentation #615

Merged
merged 3 commits into from
Oct 15, 2022
Merged

Update Claim#asString documentation #615

merged 3 commits into from
Oct 15, 2022

Conversation

jimmyjames
Copy link
Contributor

The documentation for a claim's asString() method is misleading. We don't return the toString() result of all underlying claim types, as the JavaDoc's somewhat currently imply. Instead, we check if it is a text-based claim (i.e., a string) before returning its textual value.

Perhaps in the future we should just get the textual value regardless of underlying type, but that could have impact on clients relying on the null return values for non-string based claims.

This change updates the docs to reflect the actual behavior.

Closes #614

@jimmyjames jimmyjames merged commit 9840e74 into master Oct 15, 2022
@jimmyjames jimmyjames deleted the iss-614 branch October 15, 2022 01:37
@jimmyjames jimmyjames mentioned this pull request Oct 19, 2022
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

Successfully merging this pull request may close these issues.

Claim asString returns null for types with valid string representations
2 participants