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

Fix similar compare numbers #575

Merged
merged 4 commits into from Nov 22, 2020

Conversation

johnjaylward
Copy link
Contributor

@johnjaylward johnjaylward commented Nov 19, 2020

What problem does this code solve?

Fixes #573. Similar currently requires exact types match for numeric comparisons, but in JSON there are just "numbers", not specific int, long, float, etc.

Risks

Low

Changes to the API?

No.

Will this require a new release?

Yes.

Should the documentation be updated?

No.

Does it break the unit tests?

No, we did not have a unit test for this case. A new unit test was added to demonstrate the issue.

Was any code refactored in this commit?

New methods were added to accommodate the new check. They currently are private or have default visibility. Some areas of unrelated code were modified to take advantage of the new methods where applicable

Review status

APPROVED

@johnjaylward
Copy link
Contributor Author

Actually, let me make one more change. The BigDecimal compare should probably only be used if the types are different and doesn't implement compare

@stleary
Copy link
Owner

stleary commented Nov 20, 2020

Starting 3-day comment window.

@stleary stleary merged commit a57eff2 into stleary:master Nov 22, 2020
@johnjaylward johnjaylward deleted the fix-similar-compare-numbers branch March 1, 2021 14:14
This was referenced Mar 13, 2021
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.

Support equality testing
3 participants