提交 ccea694d authored 作者: noelgrandin@gmail.com's avatar noelgrandin@gmail.com

fix comment

上级 c197c0ec
......@@ -304,7 +304,7 @@ public class WriteBuffer {
long grow = Math.max(needed, MIN_GROW);
// grow at least 50% of the current size
grow = Math.max(temp.capacity() / 2, grow);
// the new capacity is at least Integer.MAX_VALUE
// the new capacity is at most Integer.MAX_VALUE
int newCapacity = (int) Math.min(Integer.MAX_VALUE, temp.capacity() + grow);
if (newCapacity < needed) {
throw new OutOfMemoryError("Capacity: " + newCapacity + " needed: " + needed);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论