Run this test:
public void testPCJ() throws Exception
{
LongKeyIntOpenHashMap myMap = new LongKeyIntOpenHashMap(50);
long value = ((long) Integer.MAX_VALUE) + 1;
System.out.println("getid: i = " + 1 + ", value: " + value); // PCJ bug
myMap.put(value, 1);
}
It fails with:
getid: i = 1, value: 2147483648
Aug 31, 2010 10:43:11 AM com.skytide.xolap.server.system.systemmgr: INFO: stopping
E
Time: 2.313
There was 1 error:
1) testPCJ(com.skytide.xolap.server.cm.dml.ValueAndIdMapUnitTest)java.lang.ArrayIndexOutOfBoundsException: -21
at bak.pcj.map.LongKeyIntOpenHashMap.put(LongKeyIntOpenHashMap.java:532)
at com.skytide.xolap.server.cm.dml.ValueAndIdMapUnitTest.testPCJ(ValueAndIdMapUnitTest.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at com.skytide.xolap.server.cm.dml.ValueAndIdMapUnitTest.main(ValueAndIdMapUnitTest.java:33)
It appears to only fail with (Integer.MAX_VALUE + 1) and Long.MAX_VALUE.