RFR 8005698 : Handle Frequent HashMap Collisions with Balanced Trees

Jeff Hain jeffhain at rocketmail.com
Fri May 24 12:27:53 UTC 2013


Doug Lea wrote:
>maximize the probability that they'll eventually
>get a CME or related exception rather than a stuck loop.
 
 
Yes, but I was only considering removing logically not needed null checks,
just before dereferencing the pointer, and I don't see how it could
(directly, i.e. without wrapping catch(NPE)) hurt:
If the pointer is not null, it has no effect.
If the pointer is null, a NPE will be thrown so no stuck loop.
 
 
On the contrary, it could even help with a NPE getting us
out of an otherwise infinite loop.
 
 
-Jeff


More information about the core-libs-dev mailing list