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

JSONObject.similar() numeric compare bug fix #617

Merged
merged 3 commits into from Jul 26, 2021

Conversation

johnjaylward
Copy link
Contributor

@johnjaylward johnjaylward commented Jul 23, 2021

What problem does this code solve?
JSONObject isSimilar() may fail when comparing decimal values. Fixes #616

Risks
Low

Changes to the API?
No change to the API. Internal behavior in the way that double values get created has changed, but in this case, it is considered worth the possible risk.

Will this require a new release?
Yes

Should the documentation be updated?
No

Does it break the unit tests?
No, New unit tests were added to show the bug.

Was any code refactored in this commit?
Several unrelated files in this commit contain minor documentation updates.

Review status
APPROVED

@johnjaylward johnjaylward changed the title DRAFT: Issue 616 similar bug Issue 616 similar bug Jul 23, 2021
@johnjaylward johnjaylward changed the title Issue 616 similar bug Issue 616 similar bug fix Jul 23, 2021
@stleary
Copy link
Owner

stleary commented Jul 23, 2021

Starting 3-day comment window.
Thanks, @johnjaylward for the quick fix!
I am going to merge this commit ahead of #613, which changes one of the same files.

@stleary stleary changed the title Issue 616 similar bug fix Fixes #616 isSimilar() problem comparing double vs BigInteger Jul 23, 2021
@stleary stleary changed the title Fixes #616 isSimilar() problem comparing double vs BigInteger Fixes #616 similar() problem comparing double vs BigDecimal Jul 23, 2021
@stleary stleary merged commit bb048e3 into stleary:master Jul 26, 2021
@stleary stleary changed the title Fixes #616 similar() problem comparing double vs BigDecimal JSONObject.similar() numeric compare bug fix Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with JSONObject::similar
2 participants