Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 4016d08

Browse files
JAVAMONEY-160: equal an return false for the same CurrencyUnits
1 parent 6bdd5f6 commit 4016d08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/javamoney/moneta/BuildableCurrencyUnit.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ public boolean equals(Object obj) {
116116
if (obj == this) {
117117
return true;
118118
}
119-
if (obj instanceof BuildableCurrencyUnit) {
120-
BuildableCurrencyUnit other = (BuildableCurrencyUnit) obj;
121-
return Objects.equals(currencyCode, other.currencyCode);
119+
if (obj instanceof CurrencyUnit) {
120+
CurrencyUnit other = (CurrencyUnit) obj;
121+
return Objects.equals(getCurrencyCode(), other.getCurrencyCode());
122122
}
123123
return false;
124124
}

0 commit comments

Comments
 (0)