@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
        return this.hashCode() == other.hashCode() && other instanceof Bytes
               && Arrays.equals(this.bytes, ((Bytes) other).get());
    }
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
jraft-core/src/main/java/com/alipay/sofa/jraft/util/Bytes.java