I think, for 0.90, it should suffice to just remove
result ^= stringValue.hashCode();
Even if a.stringValue != b.stringValue, it's okay for a.hashCode() == b.hashCode() && !a.equals(b), just can't have the other way around. This wouldn't solve the case where stringValue matches but address doesn't, however that's not the common case and I'm pretty sure that's not possible anymore because of
However, it seems like the stringValue is sort of unnecessary and can be removed in 0.92. Because of checkBindAddressCanBeResolved() from
HBASE-2806, you're guaranteed that the hostname will always be resolved when working with an HServerAddress. Because of HBASE-3286, we use address.getHostName() to generate stringValue anyways. It seems like stringValue is just a legacy variable that can be removed. JD, Stack, or any other people who worked on this class, am I missing something?