Skip to content

Conversation

Jean-Eudes
Copy link
Contributor

Hi,

The comparaison between BigDecimal with the equals method is different of comparaison with compareTo method. The equals method compare the value and the scale. For example, with BigDecimal, 1 is not equal to 1.0. This problem must be resolve using the compareTo method.

In this pull request, we add configuration and annotation to specify if an object must be comparing with equals or with compareTo method. We update the code to use compareTo instead of equals for BigDecimal.

Jean-Eudes

@SQiShER
Copy link
Owner

SQiShER commented Jul 6, 2013

Great job! This looks very good. I'll merge it right away!

SQiShER added a commit that referenced this pull request Jul 6, 2013
New feature to allow equality check by using the compareTo method of comparable types. Thanks to Jean-Eudes
@SQiShER SQiShER merged commit d29515d into SQiShER:master Jul 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants