Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
0d8b6ec9
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
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看板
提交
0d8b6ec9
编写于
8月 06, 2013
作者:
H
henryjen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8022446: Fix serial warnings in java.util.stream
Reviewed-by: darcy
上级
40ea1ff2
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
31 addition
and
1 deletion
+31
-1
src/share/classes/java/util/stream/AbstractShortCircuitTask.java
...re/classes/java/util/stream/AbstractShortCircuitTask.java
+1
-0
src/share/classes/java/util/stream/AbstractTask.java
src/share/classes/java/util/stream/AbstractTask.java
+4
-0
src/share/classes/java/util/stream/FindOps.java
src/share/classes/java/util/stream/FindOps.java
+1
-0
src/share/classes/java/util/stream/ForEachOps.java
src/share/classes/java/util/stream/ForEachOps.java
+2
-0
src/share/classes/java/util/stream/MatchOps.java
src/share/classes/java/util/stream/MatchOps.java
+1
-0
src/share/classes/java/util/stream/Nodes.java
src/share/classes/java/util/stream/Nodes.java
+19
-0
src/share/classes/java/util/stream/ReduceOps.java
src/share/classes/java/util/stream/ReduceOps.java
+2
-1
src/share/classes/java/util/stream/SliceOps.java
src/share/classes/java/util/stream/SliceOps.java
+1
-0
未找到文件。
src/share/classes/java/util/stream/AbstractShortCircuitTask.java
浏览文件 @
0d8b6ec9
...
...
@@ -39,6 +39,7 @@ import java.util.concurrent.atomic.AtomicReference;
* @param <K> type of child and sibling tasks
* @since 1.8
*/
@SuppressWarnings
(
"serial"
)
abstract
class
AbstractShortCircuitTask
<
P_IN
,
P_OUT
,
R
,
K
extends
AbstractShortCircuitTask
<
P_IN
,
P_OUT
,
R
,
K
>>
extends
AbstractTask
<
P_IN
,
P_OUT
,
R
,
K
>
{
...
...
src/share/classes/java/util/stream/AbstractTask.java
浏览文件 @
0d8b6ec9
...
...
@@ -73,6 +73,9 @@ import java.util.concurrent.ForkJoinPool;
* }
* }</pre>
*
* <p>Serialization is not supported as there is no intention to serialize
* tasks managed by stream ops.
*
* @param <P_IN> Type of elements input to the pipeline
* @param <P_OUT> Type of elements output from the pipeline
* @param <R> Type of intermediate result, which may be different from operation
...
...
@@ -80,6 +83,7 @@ import java.util.concurrent.ForkJoinPool;
* @param <K> Type of parent, child and sibling tasks
* @since 1.8
*/
@SuppressWarnings
(
"serial"
)
abstract
class
AbstractTask
<
P_IN
,
P_OUT
,
R
,
K
extends
AbstractTask
<
P_IN
,
P_OUT
,
R
,
K
>>
extends
CountedCompleter
<
R
>
{
...
...
src/share/classes/java/util/stream/FindOps.java
浏览文件 @
0d8b6ec9
...
...
@@ -246,6 +246,7 @@ final class FindOps {
* @param <P_OUT> Output element type from the stream pipeline
* @param <O> Result type from the find operation
*/
@SuppressWarnings
(
"serial"
)
private
static
final
class
FindTask
<
P_IN
,
P_OUT
,
O
>
extends
AbstractShortCircuitTask
<
P_IN
,
P_OUT
,
O
,
FindTask
<
P_IN
,
P_OUT
,
O
>>
{
private
final
FindOp
<
P_OUT
,
O
>
op
;
...
...
src/share/classes/java/util/stream/ForEachOps.java
浏览文件 @
0d8b6ec9
...
...
@@ -249,6 +249,7 @@ final class ForEachOps {
}
/** A {@code ForkJoinTask} for performing a parallel for-each operation */
@SuppressWarnings
(
"serial"
)
static
final
class
ForEachTask
<
S
,
T
>
extends
CountedCompleter
<
Void
>
{
private
Spliterator
<
S
>
spliterator
;
private
final
Sink
<
S
>
sink
;
...
...
@@ -314,6 +315,7 @@ final class ForEachOps {
* A {@code ForkJoinTask} for performing a parallel for-each operation
* which visits the elements in encounter order
*/
@SuppressWarnings
(
"serial"
)
static
final
class
ForEachOrderedTask
<
S
,
T
>
extends
CountedCompleter
<
Void
>
{
private
final
PipelineHelper
<
T
>
helper
;
private
Spliterator
<
S
>
spliterator
;
...
...
src/share/classes/java/util/stream/MatchOps.java
浏览文件 @
0d8b6ec9
...
...
@@ -274,6 +274,7 @@ final class MatchOps {
* @param <P_IN> the type of source elements for the pipeline
* @param <P_OUT> the type of output elements for the pipeline
*/
@SuppressWarnings
(
"serial"
)
private
static
final
class
MatchTask
<
P_IN
,
P_OUT
>
extends
AbstractShortCircuitTask
<
P_IN
,
P_OUT
,
Boolean
,
MatchTask
<
P_IN
,
P_OUT
>>
{
private
final
MatchOp
<
P_OUT
>
op
;
...
...
src/share/classes/java/util/stream/Nodes.java
浏览文件 @
0d8b6ec9
...
...
@@ -1786,6 +1786,10 @@ final class Nodes {
}
}
/*
* This and subclasses are not intended to be serializable
*/
@SuppressWarnings
(
"serial"
)
private
static
abstract
class
SizedCollectorTask
<
P_IN
,
P_OUT
,
T_SINK
extends
Sink
<
P_OUT
>,
K
extends
SizedCollectorTask
<
P_IN
,
P_OUT
,
T_SINK
,
K
>>
extends
CountedCompleter
<
Void
>
...
...
@@ -1855,6 +1859,7 @@ final class Nodes {
fence
=
(
int
)
offset
+
(
int
)
length
;
}
@SuppressWarnings
(
"serial"
)
static
final
class
OfRef
<
P_IN
,
P_OUT
>
extends
SizedCollectorTask
<
P_IN
,
P_OUT
,
Sink
<
P_OUT
>,
OfRef
<
P_IN
,
P_OUT
>>
implements
Sink
<
P_OUT
>
{
...
...
@@ -1886,6 +1891,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
static
final
class
OfInt
<
P_IN
>
extends
SizedCollectorTask
<
P_IN
,
Integer
,
Sink
.
OfInt
,
OfInt
<
P_IN
>>
implements
Sink
.
OfInt
{
...
...
@@ -1917,6 +1923,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
static
final
class
OfLong
<
P_IN
>
extends
SizedCollectorTask
<
P_IN
,
Long
,
Sink
.
OfLong
,
OfLong
<
P_IN
>>
implements
Sink
.
OfLong
{
...
...
@@ -1948,6 +1955,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
static
final
class
OfDouble
<
P_IN
>
extends
SizedCollectorTask
<
P_IN
,
Double
,
Sink
.
OfDouble
,
OfDouble
<
P_IN
>>
implements
Sink
.
OfDouble
{
...
...
@@ -1980,6 +1988,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
abstract
class
ToArrayTask
<
T
,
T_NODE
extends
Node
<
T
>,
K
extends
ToArrayTask
<
T
,
T_NODE
,
K
>>
extends
CountedCompleter
<
Void
>
{
...
...
@@ -2025,6 +2034,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
final
class
OfRef
<
T
>
extends
ToArrayTask
<
T
,
Node
<
T
>,
OfRef
<
T
>>
{
private
final
T
[]
array
;
...
...
@@ -2050,6 +2060,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
class
OfPrimitive
<
T
,
T_CONS
,
T_ARR
,
T_SPLITR
extends
Spliterator
.
OfPrimitive
<
T
,
T_CONS
,
T_SPLITR
>,
T_NODE
extends
Node
.
OfPrimitive
<
T
,
T_CONS
,
T_ARR
,
T_SPLITR
,
T_NODE
>>
...
...
@@ -2077,6 +2088,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
final
class
OfInt
extends
OfPrimitive
<
Integer
,
IntConsumer
,
int
[],
Spliterator
.
OfInt
,
Node
.
OfInt
>
{
private
OfInt
(
Node
.
OfInt
node
,
int
[]
array
,
int
offset
)
{
...
...
@@ -2084,6 +2096,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
final
class
OfLong
extends
OfPrimitive
<
Long
,
LongConsumer
,
long
[],
Spliterator
.
OfLong
,
Node
.
OfLong
>
{
private
OfLong
(
Node
.
OfLong
node
,
long
[]
array
,
int
offset
)
{
...
...
@@ -2091,6 +2104,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
final
class
OfDouble
extends
OfPrimitive
<
Double
,
DoubleConsumer
,
double
[],
Spliterator
.
OfDouble
,
Node
.
OfDouble
>
{
private
OfDouble
(
Node
.
OfDouble
node
,
double
[]
array
,
int
offset
)
{
...
...
@@ -2099,6 +2113,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
class
CollectorTask
<
P_IN
,
P_OUT
,
T_NODE
extends
Node
<
P_OUT
>,
T_BUILDER
extends
Node
.
Builder
<
P_OUT
>>
extends
AbstractTask
<
P_IN
,
P_OUT
,
T_NODE
,
CollectorTask
<
P_IN
,
P_OUT
,
T_NODE
,
T_BUILDER
>>
{
protected
final
PipelineHelper
<
P_OUT
>
helper
;
...
...
@@ -2141,6 +2156,7 @@ final class Nodes {
super
.
onCompletion
(
caller
);
}
@SuppressWarnings
(
"serial"
)
private
static
final
class
OfRef
<
P_IN
,
P_OUT
>
extends
CollectorTask
<
P_IN
,
P_OUT
,
Node
<
P_OUT
>,
Node
.
Builder
<
P_OUT
>>
{
OfRef
(
PipelineHelper
<
P_OUT
>
helper
,
...
...
@@ -2150,6 +2166,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
final
class
OfInt
<
P_IN
>
extends
CollectorTask
<
P_IN
,
Integer
,
Node
.
OfInt
,
Node
.
Builder
.
OfInt
>
{
OfInt
(
PipelineHelper
<
Integer
>
helper
,
Spliterator
<
P_IN
>
spliterator
)
{
...
...
@@ -2157,6 +2174,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
final
class
OfLong
<
P_IN
>
extends
CollectorTask
<
P_IN
,
Long
,
Node
.
OfLong
,
Node
.
Builder
.
OfLong
>
{
OfLong
(
PipelineHelper
<
Long
>
helper
,
Spliterator
<
P_IN
>
spliterator
)
{
...
...
@@ -2164,6 +2182,7 @@ final class Nodes {
}
}
@SuppressWarnings
(
"serial"
)
private
static
final
class
OfDouble
<
P_IN
>
extends
CollectorTask
<
P_IN
,
Double
,
Node
.
OfDouble
,
Node
.
Builder
.
OfDouble
>
{
OfDouble
(
PipelineHelper
<
Double
>
helper
,
Spliterator
<
P_IN
>
spliterator
)
{
...
...
src/share/classes/java/util/stream/ReduceOps.java
浏览文件 @
0d8b6ec9
...
...
@@ -43,7 +43,7 @@ import java.util.function.ObjLongConsumer;
import
java.util.function.Supplier
;
/**
* Factory for
the creating instances of {@code TerminalOp)
that implement
* Factory for
creating instances of {@code TerminalOp}
that implement
* reductions.
*
* @since 1.8
...
...
@@ -718,6 +718,7 @@ final class ReduceOps {
/**
* A {@code ForkJoinTask} for performing a parallel reduce operation.
*/
@SuppressWarnings
(
"serial"
)
private
static
final
class
ReduceTask
<
P_IN
,
P_OUT
,
R
,
S
extends
AccumulatingSink
<
P_OUT
,
R
,
S
>>
extends
AbstractTask
<
P_IN
,
P_OUT
,
S
,
ReduceTask
<
P_IN
,
P_OUT
,
R
,
S
>>
{
...
...
src/share/classes/java/util/stream/SliceOps.java
浏览文件 @
0d8b6ec9
...
...
@@ -550,6 +550,7 @@ final class SliceOps {
* @param <P_IN> Input element type to the stream pipeline
* @param <P_OUT> Output element type from the stream pipeline
*/
@SuppressWarnings
(
"serial"
)
private
static
final
class
SliceTask
<
P_IN
,
P_OUT
>
extends
AbstractShortCircuitTask
<
P_IN
,
P_OUT
,
Node
<
P_OUT
>,
SliceTask
<
P_IN
,
P_OUT
>>
{
private
final
AbstractPipeline
<
P_OUT
,
P_OUT
,
?>
op
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录