Mantis - Hessian
Viewing Issue Advanced Details
5487 block always 07-11-13 00:29 07-11-13 00:55
sander  
 
normal  
new 4.0.7  
open  
none    
none  
0005487: issue 5239 is not fixed .ArrayIndexOutOfBoundsException
issue 5239 is not fixed

int hash = System.identityHashCode(key) % prime;

can return negative integers
1. because ibm sdk 1.6 AIX can give negative identityHashCode
2. because java returns negative modulo result for negative first operand

addition:
if (hash < 0) {
            hash += prime;
}
guarantees >=0 integers (and maintains modulo)



Notes
(0006285)
sander   
07-11-13 00:55   
geez I missed 0005385...
but this is not minor to us and Math.abs is likely to yield hash collisions reducing efficiency