Thank you for attacking the hashCode/equals warnings, they've been
screaming to get fixed for a long time.
It's hard to judge SDE.hashCode but it looks like the straum and line
table index values are used twice (by way of computing the line
number). I agree with the multiplication to spread the bits and maybe
it can be simplified to (lineNumber() * 17) ^ refType.hashCode().
I agree, this works just fine.
XObject.hashCode looks good but I wonder why the equals method is
catching Throwable (it might be a left-over from debugging a long
time ago but it could be masking an issue too).
Correct me if I am wrong, if we are doing the instance check on the
argument before casting it into an XObject instance, can it every
reach the catch block? We can then just get rid of the try-catch block
here.
- Maybe a webrev helps:
http://cr.openjdk.java.net/~khazra/8016576/webrev.01/
<http://cr.openjdk.java.net/%7Ekhazra/8016576/webrev.01/>