Open xwdeng opened 7 years ago
does the second else if(this.highbits==that.hightbits) redundant?
public int compareTo(IPv6Address that) { if (this.highBits == that.highBits) if (this.lowBits == that.lowBits) return 0; else return IPv6AddressHelpers.isLessThanUnsigned(this.lowBits, that.lowBits) ? -1 : 1; else if (this.highBits == that.highBits) return 0; else return IPv6AddressHelpers.isLessThanUnsigned(this.highBits, that.highBits) ? -1 : 1; }
Yes indeed. I'll fix it.
Hard to fix? It is still there ... I just removed the two lines in my code ... ;)
does the second else if(this.highbits==that.hightbits) redundant?
public int compareTo(IPv6Address that) { if (this.highBits == that.highBits) if (this.lowBits == that.lowBits) return 0; else return IPv6AddressHelpers.isLessThanUnsigned(this.lowBits, that.lowBits) ? -1 : 1; else if (this.highBits == that.highBits) return 0; else return IPv6AddressHelpers.isLessThanUnsigned(this.highBits, that.highBits) ? -1 : 1; }