diff --git a/client/src/com/aerospike/client/Value.java b/client/src/com/aerospike/client/Value.java index 0dc598846..54f1b526e 100644 --- a/client/src/com/aerospike/client/Value.java +++ b/client/src/com/aerospike/client/Value.java @@ -680,9 +680,13 @@ public String toString() { @Override public boolean equals(Object other) { - return (other != null && - this.getClass().equals(other.getClass()) && - this.value == ((ByteValue)other).value); + if (this == other) { + return true; + } + if (!(other instanceof ByteValue)) { + return false; + } + return this.value == ((ByteValue) other).value; } @Override