Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
a96e6090
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a96e6090
编写于
7月 09, 2013
作者:
H
henryjen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8017141: java.util/stream Spliterators from sequential sources should not catch OOME
Reviewed-by: mchung Contributed-by: paul.sandoz@oracle.com
上级
335f51e9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
54 deletion
+9
-54
src/share/classes/java/util/LinkedList.java
src/share/classes/java/util/LinkedList.java
+1
-6
src/share/classes/java/util/Spliterators.java
src/share/classes/java/util/Spliterators.java
+8
-48
未找到文件。
src/share/classes/java/util/LinkedList.java
浏览文件 @
a96e6090
...
...
@@ -1195,12 +1195,7 @@ public class LinkedList<E>
n
=
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
Object
[]
a
;
try
{
a
=
new
Object
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
Object
[]
a
=
new
Object
[
n
];
int
j
=
0
;
do
{
a
[
j
++]
=
p
.
item
;
}
while
((
p
=
p
.
next
)
!=
null
&&
j
<
n
);
current
=
p
;
...
...
src/share/classes/java/util/Spliterators.java
浏览文件 @
a96e6090
...
...
@@ -1314,12 +1314,7 @@ public final class Spliterators {
n
=
(
int
)
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
Object
[]
a
;
try
{
a
=
new
Object
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
Object
[]
a
=
new
Object
[
n
];
int
j
=
0
;
do
{
a
[
j
]
=
holder
.
value
;
}
while
(++
j
<
n
&&
tryAdvance
(
holder
));
batch
=
j
;
...
...
@@ -1429,12 +1424,7 @@ public final class Spliterators {
n
=
(
int
)
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
int
[]
a
;
try
{
a
=
new
int
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
int
[]
a
=
new
int
[
n
];
int
j
=
0
;
do
{
a
[
j
]
=
holder
.
value
;
}
while
(++
j
<
n
&&
tryAdvance
(
holder
));
batch
=
j
;
...
...
@@ -1544,12 +1534,7 @@ public final class Spliterators {
n
=
(
int
)
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
long
[]
a
;
try
{
a
=
new
long
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
long
[]
a
=
new
long
[
n
];
int
j
=
0
;
do
{
a
[
j
]
=
holder
.
value
;
}
while
(++
j
<
n
&&
tryAdvance
(
holder
));
batch
=
j
;
...
...
@@ -1659,12 +1644,7 @@ public final class Spliterators {
n
=
(
int
)
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
double
[]
a
;
try
{
a
=
new
double
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
double
[]
a
=
new
double
[
n
];
int
j
=
0
;
do
{
a
[
j
]
=
holder
.
value
;
}
while
(++
j
<
n
&&
tryAdvance
(
holder
));
batch
=
j
;
...
...
@@ -1795,12 +1775,7 @@ public final class Spliterators {
n
=
(
int
)
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
Object
[]
a
;
try
{
a
=
new
Object
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
Object
[]
a
=
new
Object
[
n
];
int
j
=
0
;
do
{
a
[
j
]
=
i
.
next
();
}
while
(++
j
<
n
&&
i
.
hasNext
());
batch
=
j
;
...
...
@@ -1910,12 +1885,7 @@ public final class Spliterators {
n
=
(
int
)
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
int
[]
a
;
try
{
a
=
new
int
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
int
[]
a
=
new
int
[
n
];
int
j
=
0
;
do
{
a
[
j
]
=
i
.
nextInt
();
}
while
(++
j
<
n
&&
i
.
hasNext
());
batch
=
j
;
...
...
@@ -2007,12 +1977,7 @@ public final class Spliterators {
n
=
(
int
)
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
long
[]
a
;
try
{
a
=
new
long
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
long
[]
a
=
new
long
[
n
];
int
j
=
0
;
do
{
a
[
j
]
=
i
.
nextLong
();
}
while
(++
j
<
n
&&
i
.
hasNext
());
batch
=
j
;
...
...
@@ -2104,12 +2069,7 @@ public final class Spliterators {
n
=
(
int
)
s
;
if
(
n
>
MAX_BATCH
)
n
=
MAX_BATCH
;
double
[]
a
;
try
{
a
=
new
double
[
n
];
}
catch
(
OutOfMemoryError
oome
)
{
return
null
;
}
double
[]
a
=
new
double
[
n
];
int
j
=
0
;
do
{
a
[
j
]
=
i
.
nextDouble
();
}
while
(++
j
<
n
&&
i
.
hasNext
());
batch
=
j
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录