Hello!

It is yet another instance of integer overflow under certain extreme circumstances.

This time it is when calculating the initial capacity of a StringBuilder in BitSet.toString.

If there are too many elements in the set, we can't do much anyway.

The best effort is to avoid confusing NegativeArraySizeException and let the method throw OOM.

Would you please help review the fix?

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8225397
WEBREV: http://cr.openjdk.java.net/~igerasim/8225397/00/webrev/

--
With kind regards,
Ivan Gerasimov

Reply via email to