Skip to content

Commit 1f741d8

Browse files
committed
fixed equals and hashCode
1 parent 21b2314 commit 1f741d8

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

Diff for: core/src/main/java/com/arangodb/entity/DocumentCreateEntity.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ public void setOld(final T oldDocument) {
6464
@Override
6565
public boolean equals(Object o) {
6666
if (!(o instanceof DocumentCreateEntity)) return false;
67+
if (!super.equals(o)) return false;
6768
DocumentCreateEntity<?> that = (DocumentCreateEntity<?>) o;
6869
return Objects.equals(newDocument, that.newDocument) && Objects.equals(oldDocument, that.oldDocument);
6970
}
7071

7172
@Override
7273
public int hashCode() {
73-
return Objects.hash(newDocument, oldDocument);
74+
return Objects.hash(super.hashCode(), newDocument, oldDocument);
7475
}
7576
}

Diff for: core/src/main/java/com/arangodb/entity/DocumentDeleteEntity.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ public void setOld(final T oldDocument) {
5151
@Override
5252
public boolean equals(Object o) {
5353
if (!(o instanceof DocumentDeleteEntity)) return false;
54+
if (!super.equals(o)) return false;
5455
DocumentDeleteEntity<?> that = (DocumentDeleteEntity<?>) o;
5556
return Objects.equals(oldDocument, that.oldDocument);
5657
}
5758

5859
@Override
5960
public int hashCode() {
60-
return Objects.hashCode(oldDocument);
61+
return Objects.hash(super.hashCode(), oldDocument);
6162
}
6263
}

Diff for: core/src/main/java/com/arangodb/entity/arangosearch/ArangoSearchPropertiesEntity.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ public Boolean getPrimaryKeyCache() {
141141
@Override
142142
public boolean equals(Object o) {
143143
if (!(o instanceof ArangoSearchPropertiesEntity)) return false;
144+
if (!super.equals(o)) return false;
144145
ArangoSearchPropertiesEntity that = (ArangoSearchPropertiesEntity) o;
145146
return Objects.equals(consolidationIntervalMsec, that.consolidationIntervalMsec) && Objects.equals(commitIntervalMsec, that.commitIntervalMsec) && Objects.equals(cleanupIntervalStep, that.cleanupIntervalStep) && Objects.equals(consolidationPolicy, that.consolidationPolicy) && Objects.equals(primarySort, that.primarySort) && Objects.equals(links, that.links) && primarySortCompression == that.primarySortCompression && Objects.equals(storedValues, that.storedValues) && Objects.equals(optimizeTopK, that.optimizeTopK) && Objects.equals(primarySortCache, that.primarySortCache) && Objects.equals(primaryKeyCache, that.primaryKeyCache);
146147
}
147148

148149
@Override
149150
public int hashCode() {
150-
return Objects.hash(consolidationIntervalMsec, commitIntervalMsec, cleanupIntervalStep, consolidationPolicy, primarySort, links, primarySortCompression, storedValues, optimizeTopK, primarySortCache, primaryKeyCache);
151+
return Objects.hash(super.hashCode(), consolidationIntervalMsec, commitIntervalMsec, cleanupIntervalStep, consolidationPolicy, primarySort, links, primarySortCompression, storedValues, optimizeTopK, primarySortCache, primaryKeyCache);
151152
}
152153
}

Diff for: core/src/main/java/com/arangodb/entity/arangosearch/SearchAliasPropertiesEntity.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ public Collection<SearchAliasIndex> getIndexes() {
4343
@Override
4444
public boolean equals(Object o) {
4545
if (!(o instanceof SearchAliasPropertiesEntity)) return false;
46+
if (!super.equals(o)) return false;
4647
SearchAliasPropertiesEntity that = (SearchAliasPropertiesEntity) o;
4748
return Objects.equals(indexes, that.indexes);
4849
}
4950

5051
@Override
5152
public int hashCode() {
52-
return Objects.hashCode(indexes);
53+
return Objects.hash(super.hashCode(), indexes);
5354
}
5455
}

0 commit comments

Comments
 (0)