RFR(S): 8007986: GrowableArray should implement binary search

Roland Westrelin roland.westrelin at oracle.com
Fri Feb 12 15:31:50 UTC 2016


Hi John,

Thanks for looking at this.

>> overflow issue in the binary search 
> 
> The outer parens look wrong on the fix.  You want to cast to int *after* dividing by two, I think.

You’re right obviously. Is it good to go if I add the missing parentheses?

int mid = (int)(((uint)max + min) / 2);

Roland.




More information about the hotspot-compiler-dev mailing list