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 DefaultExchangeRate's equals and hashCode methods #147

Merged
merged 1 commit into from
Jan 4, 2017
Merged

Fix DefaultExchangeRate's equals and hashCode methods #147

merged 1 commit into from
Jan 4, 2017

Conversation

sgrimm-sg
Copy link
Contributor

This changes DefaultExchangeRate to fix two related issues, #145 and #146.
The two are tied together because x.equals(y) should imply (and require)
x.hashCode() == y.hashCode().

This changes DefaultExchangeRate to fix two related issues, #145 and #146.
The two are tied together because x.equals(y) should imply (and require)
x.hashCode() == y.hashCode().
@sgrimm-sg
Copy link
Contributor Author

If you just want the fix for the infinite recursion in hashCode() but not the behavior change in equals() I'll be happy to make a separate PR just for that change.

@otaviojava otaviojava merged commit 5638b14 into JavaMoney:master Jan 4, 2017
@otaviojava
Copy link
Member

Thanks.

@keilw
Copy link
Member

keilw commented Jan 4, 2017

Is both Moneta and Moneta-BP addressed in the same way?;-) IMHO maybe it would even require additional TCK or other tests in both implementations.

@sgrimm-sg
Copy link
Contributor Author

sgrimm-sg commented Jan 4, 2017 via email

@keilw
Copy link
Member

keilw commented Jan 4, 2017

It would make it easier and consistent and allow you to test against both if the behavior changed the same way.

@sgrimm-sg
Copy link
Contributor Author

sgrimm-sg commented Jan 4, 2017 via email

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.

3 participants