-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b109
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8156331 | 8u111 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8151027 | 8u102 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8162169 | emb-8u111 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8151028 | 7u111 | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
StringBuilder sb = new StringBuilder();
sb.ensureCapacity(Integer.MAX_VALUE / 2);
sb.ensureCapacity(Integer.MAX_VALUE / 2 + 1);
The exception reports:
Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit,
which means we tried to allocate Integer.MAX_VALUE elements array.
- backported by
-
JDK-8151027 Capacity of StringBuilder should not get close to Integer.MAX_VALUE unless necessary
-
- Resolved
-
-
JDK-8151028 Capacity of StringBuilder should not get close to Integer.MAX_VALUE unless necessary
-
- Resolved
-
-
JDK-8156331 Capacity of StringBuilder should not get close to Integer.MAX_VALUE unless necessary
-
- Resolved
-
-
JDK-8162169 Capacity of StringBuilder should not get close to Integer.MAX_VALUE unless necessary
-
- Resolved
-
- duplicates
-
JDK-8029587 Jdk 7u45 > java.lang.outofmemoryerror: requested array size exceeds vm limit
-
- Closed
-
- relates to
-
JDK-8219409 Clarify capacity of StringBuffer/StringBuilder near Integer.MAX_VALUE
-
- Open
-
-
JDK-8029784 (str) StringBuilder and StringBuffer fail when initialized with large strings
-
- Closed
-