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

Remove getNumberStripped call from Money.equals #258

Merged

Conversation

marschall
Copy link
Member

@marschall marschall commented Dec 28, 2018

Money.equals currently calls getNumberStripped on the receiver and the
argument to compare two BigDecimals for equality. This ends up calling
stripTrailingZeros for both BigDecimals.
The same can be achieved without allocations using
BigDecimal.compareTo.


This change is Reviewable

Money.equals currently calls getNumberStripped on the receiver and the
argument to compare two BigDecimals for equality. This ends up calling
stripTrailingZeros for both BigDecimals.
The same can be achieved without allocations using
BigDecimal.compareTo.
Copy link
Member

@stokito stokito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good

@keilw keilw merged commit ee80fc3 into JavaMoney:master Dec 29, 2018
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.

None yet

4 participants