Skip to content

Commit fea0402

Browse files
committed
DEVX-657: overriding hashCode for LocalizedStringEntry for set and map usage
1 parent b27dcaa commit fea0402

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/models/common/LocalizedStringEntry.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ public boolean equals(Object o) {
4242
return false;
4343
}
4444

45+
@Override
46+
public int hashCode() {
47+
return locale.hashCode() + value.hashCode();
48+
}
49+
4550
public Locale getLocale() {
4651
return locale;
4752
}

0 commit comments

Comments
 (0)