@Override
    public boolean equals(Object other) {
        if (this == other)
            return true;
        if (other == null)
            return false;

        // we intentionally use the function to compute hashcode here
        if (this.hashCode() != other.hashCode())
            return false;

        if (other instanceof Bytes)
            return Arrays.equals(this.bytes, ((Bytes) other).get());

        return false;
    }
The hashcode is cached except for the case where it is computed as 0, in which
case we compute the hashcode on every call.

@return the hashcode
clients/src/main/java/org/apache/kafka/common/utils/Bytes.java