Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions client/src/com/aerospike/client/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -1541,9 +1541,16 @@ public String toString() {

@Override
public boolean equals(Object other) {
return (other != null &&
this.getClass().equals(other.getClass()) &&
this.list.equals(((ListValue)other).list));
// Preserve original semantics: return false if other is null, require exact same runtime class,
// and delegate equality to the wrapped list. Use reference equality for Class to avoid extra method call.
if (other == null) {
return false;
}
if (this.getClass() != other.getClass()) {
return false;
}
ListValue o = (ListValue) other;
return this.list.equals(o.list);
}

@Override
Expand Down