Index: core/src/main/java/org/yes/cart/service/domain/impl/ProductServiceImpl.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/src/main/java/org/yes/cart/service/domain/impl/ProductServiceImpl.java (revision 437) +++ core/src/main/java/org/yes/cart/service/domain/impl/ProductServiceImpl.java (revision ) @@ -597,7 +597,7 @@ */ List getSingleValueNavigationRecords(final String locale, final long productTypeId) { List list; - final List records = new ArrayList(); + final Set records = new HashSet(); final Map singleNavAttrCodes = attributeService.getSingleNavigatableAttributeCodesByProductType(productTypeId); if (!singleNavAttrCodes.isEmpty()) { @@ -611,7 +611,7 @@ "PRODUCTSKUS.ATTR.CODE.VALUES.BY.ATTRCODES", singleNavAttrCodes.keySet()); appendFilteredNavigationRecords(records, locale, list, attrNames, singleNavAttrCodes); } - return records; + return new ArrayList(records); } @@ -655,7 +655,7 @@ private static final I18NModel BLANK = new FailoverStringI18NModel(null, "-"); - private void appendFilteredNavigationRecords(final List toAppendTo, + private void appendFilteredNavigationRecords(final Set toAppendTo, final String locale, final List list, final Map attrNames, Index: domain-api/src/main/java/org/yes/cart/domain/queryobject/impl/FilteredNavigationRecordImpl.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- domain-api/src/main/java/org/yes/cart/domain/queryobject/impl/FilteredNavigationRecordImpl.java (revision 437) +++ domain-api/src/main/java/org/yes/cart/domain/queryobject/impl/FilteredNavigationRecordImpl.java (revision ) @@ -200,5 +200,27 @@ } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FilteredNavigationRecordImpl that = (FilteredNavigationRecordImpl) o; + + if (rank != that.rank) return false; + if (code != null ? !code.equals(that.code) : that.code != null) return false; + if (type != null ? !type.equals(that.type) : that.type != null) return false; + if (value != null ? !value.equals(that.value) : that.value != null) return false; + + return true; + } + + @Override + public int hashCode() { + int result = code != null ? code.hashCode() : 0; + result = 31 * result + (value != null ? value.hashCode() : 0); + result = 31 * result + rank; + result = 31 * result + (type != null ? type.hashCode() : 0); + return result; + } }