CurrencyUnit defines equality in terms of #getCurrencyCode() and
JDKCurrencyAdapter#equals follows this specification. However
JDKCurrencyAdapter#hashCode does not and uses JDK Currency #hashCode
which uses #hashCode from Object which makes it impossible to implement
a currency that is equal to JDKCurrencyAdapter and has the same
Also there were same unnecessary null checks in hashCode and equals
methods.
CurrencyUnit defines equality in terms of #getCurrencyCode() and JDKCurrencyAdapter#equals follows this specification. However JDKCurrencyAdapter#hashCode does not and uses JDK Currency #hashCode which uses #hashCode from Object which makes it impossible to implement a currency that is equal to JDKCurrencyAdapter and has the same
Also there were same unnecessary null checks in hashCode and equals methods.
This change is