提交 4fd7975e 编写于 作者: M mchung

7103957: NegativeArraySizeException while initializing class IntegerCache

Reviewed-by: darcy, mchung
Contributed-by: brian.burkhalter@oracle.com
上级 57bcefdb
......@@ -772,7 +772,7 @@ public final class Integer extends Number implements Comparable<Integer> {
int i = parseInt(integerCacheHighPropValue);
i = Math.max(i, 127);
// Maximum array size is Integer.MAX_VALUE
h = Math.min(i, Integer.MAX_VALUE - (-low));
h = Math.min(i, Integer.MAX_VALUE - (-low) -1);
}
high = h;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册