java-ipv6 icon indicating copy to clipboard operation
java-ipv6 copied to clipboard

redundant code

Open xwdeng opened this issue 7 years ago • 2 comments

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; }

xwdeng avatar May 23 '17 12:05 xwdeng

Yes indeed. I'll fix it.

janvanbesien avatar May 23 '17 13:05 janvanbesien

Hard to fix? It is still there ... I just removed the two lines in my code ... ;)

mambistats avatar Sep 09 '17 14:09 mambistats