Daniel

Show:

What's happening?

  • ArrayIndexOutOfBoundsException in HashMap.get(2147483648L)

    The following will produce an ArrayIndexOutOfBoundsException: LongKeyOpenHashMap m2 = new LongKeyOpenHashMap(64); m2.get(2147483648L); It's because Math.abs() can return a negative number, when the input is Integer.MIN_VALUE. When the input of get is 2147483648L, the following operations will be performed: 1- hash using DefaultLongHashFunction (v = 2147483648L) return (int)(v ^...

    2006-08-21 15:25:48 UTC in Primitive Collections for Java

About Me

  • 2006-08-21 (3 years ago)
  • 1580579
  • dan666 (My Site)
  • Daniel

Send me a message