Duplicate :
|
The OutOfMemoryError instead IndexOutOfBoundsException was thrown in StringBuffer.append(char[] str, int offset, int len) method when the "offset" and "len" are out of range. Same for StringBuilder.append(), StringBuilder.ensureCapacity(), ArrayList.ensureCapacity() methods. The failure is not reproducible in the JDK 7 b93.