Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
3b247e37
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看板
提交
3b247e37
编写于
4月 11, 2014
作者:
M
mduigou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8035284: Remove redundant initializations to null
Reviewed-by: lancea, martin, chegar, shade
上级
2ffacafc
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
37 addition
and
37 deletion
+37
-37
src/share/classes/java/util/AbstractMap.java
src/share/classes/java/util/AbstractMap.java
+2
-2
src/share/classes/java/util/Collections.java
src/share/classes/java/util/Collections.java
+11
-11
src/share/classes/java/util/EnumMap.java
src/share/classes/java/util/EnumMap.java
+2
-2
src/share/classes/java/util/Hashtable.java
src/share/classes/java/util/Hashtable.java
+5
-5
src/share/classes/java/util/IdentityHashMap.java
src/share/classes/java/util/IdentityHashMap.java
+2
-2
src/share/classes/java/util/LinkedList.java
src/share/classes/java/util/LinkedList.java
+1
-1
src/share/classes/java/util/TreeMap.java
src/share/classes/java/util/TreeMap.java
+9
-9
src/share/classes/java/util/WeakHashMap.java
src/share/classes/java/util/WeakHashMap.java
+5
-5
未找到文件。
src/share/classes/java/util/AbstractMap.java
浏览文件 @
3b247e37
...
@@ -305,8 +305,8 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
...
@@ -305,8 +305,8 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* appropriate view the first time this view is requested. The views are
* appropriate view the first time this view is requested. The views are
* stateless, so there's no reason to create more than one of each.
* stateless, so there's no reason to create more than one of each.
*/
*/
transient
volatile
Set
<
K
>
keySet
=
null
;
transient
volatile
Set
<
K
>
keySet
;
transient
volatile
Collection
<
V
>
values
=
null
;
transient
volatile
Collection
<
V
>
values
;
/**
/**
* {@inheritDoc}
* {@inheritDoc}
...
...
src/share/classes/java/util/Collections.java
浏览文件 @
3b247e37
...
@@ -1466,9 +1466,9 @@ public class Collections {
...
@@ -1466,9 +1466,9 @@ public class Collections {
throw
new
UnsupportedOperationException
();
throw
new
UnsupportedOperationException
();
}
}
private
transient
Set
<
K
>
keySet
=
null
;
private
transient
Set
<
K
>
keySet
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
=
null
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
;
private
transient
Collection
<
V
>
values
=
null
;
private
transient
Collection
<
V
>
values
;
public
Set
<
K
>
keySet
()
{
public
Set
<
K
>
keySet
()
{
if
(
keySet
==
null
)
if
(
keySet
==
null
)
...
@@ -2597,9 +2597,9 @@ public class Collections {
...
@@ -2597,9 +2597,9 @@ public class Collections {
synchronized
(
mutex
)
{
m
.
clear
();}
synchronized
(
mutex
)
{
m
.
clear
();}
}
}
private
transient
Set
<
K
>
keySet
=
null
;
private
transient
Set
<
K
>
keySet
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
=
null
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
;
private
transient
Collection
<
V
>
values
=
null
;
private
transient
Collection
<
V
>
values
;
public
Set
<
K
>
keySet
()
{
public
Set
<
K
>
keySet
()
{
synchronized
(
mutex
)
{
synchronized
(
mutex
)
{
...
@@ -3082,7 +3082,7 @@ public class Collections {
...
@@ -3082,7 +3082,7 @@ public class Collections {
return
c
.
add
(
e
);
return
c
.
add
(
e
);
}
}
private
E
[]
zeroLengthElementArray
=
null
;
// Lazily initialized
private
E
[]
zeroLengthElementArray
;
// Lazily initialized
private
E
[]
zeroLengthElementArray
()
{
private
E
[]
zeroLengthElementArray
()
{
return
zeroLengthElementArray
!=
null
?
zeroLengthElementArray
:
return
zeroLengthElementArray
!=
null
?
zeroLengthElementArray
:
...
@@ -3643,7 +3643,7 @@ public class Collections {
...
@@ -3643,7 +3643,7 @@ public class Collections {
m
.
put
(
e
.
getKey
(),
e
.
getValue
());
m
.
put
(
e
.
getKey
(),
e
.
getValue
());
}
}
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
=
null
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
;
public
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
()
{
public
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
()
{
if
(
entrySet
==
null
)
if
(
entrySet
==
null
)
...
@@ -4877,9 +4877,9 @@ public class Collections {
...
@@ -4877,9 +4877,9 @@ public class Collections {
public
boolean
containsValue
(
Object
value
)
{
return
eq
(
value
,
v
);}
public
boolean
containsValue
(
Object
value
)
{
return
eq
(
value
,
v
);}
public
V
get
(
Object
key
)
{
return
(
eq
(
key
,
k
)
?
v
:
null
);}
public
V
get
(
Object
key
)
{
return
(
eq
(
key
,
k
)
?
v
:
null
);}
private
transient
Set
<
K
>
keySet
=
null
;
private
transient
Set
<
K
>
keySet
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
=
null
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
;
private
transient
Collection
<
V
>
values
=
null
;
private
transient
Collection
<
V
>
values
;
public
Set
<
K
>
keySet
()
{
public
Set
<
K
>
keySet
()
{
if
(
keySet
==
null
)
if
(
keySet
==
null
)
...
...
src/share/classes/java/util/EnumMap.java
浏览文件 @
3b247e37
...
@@ -367,7 +367,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
...
@@ -367,7 +367,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
* view the first time this view is requested. The view is stateless,
* view the first time this view is requested. The view is stateless,
* so there's no reason to create more than one.
* so there's no reason to create more than one.
*/
*/
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
=
null
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
;
/**
/**
* Returns a {@link Set} view of the keys contained in this map.
* Returns a {@link Set} view of the keys contained in this map.
...
@@ -562,7 +562,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
...
@@ -562,7 +562,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
}
}
private
class
EntryIterator
extends
EnumMapIterator
<
Map
.
Entry
<
K
,
V
>>
{
private
class
EntryIterator
extends
EnumMapIterator
<
Map
.
Entry
<
K
,
V
>>
{
private
Entry
lastReturnedEntry
=
null
;
private
Entry
lastReturnedEntry
;
public
Map
.
Entry
<
K
,
V
>
next
()
{
public
Map
.
Entry
<
K
,
V
>
next
()
{
if
(!
hasNext
())
if
(!
hasNext
())
...
...
src/share/classes/java/util/Hashtable.java
浏览文件 @
3b247e37
...
@@ -617,9 +617,9 @@ public class Hashtable<K,V>
...
@@ -617,9 +617,9 @@ public class Hashtable<K,V>
* appropriate view the first time this view is requested. The views are
* appropriate view the first time this view is requested. The views are
* stateless, so there's no reason to create more than one of each.
* stateless, so there's no reason to create more than one of each.
*/
*/
private
transient
volatile
Set
<
K
>
keySet
=
null
;
private
transient
volatile
Set
<
K
>
keySet
;
private
transient
volatile
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
=
null
;
private
transient
volatile
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
;
private
transient
volatile
Collection
<
V
>
values
=
null
;
private
transient
volatile
Collection
<
V
>
values
;
/**
/**
* Returns a {@link Set} view of the keys contained in this map.
* Returns a {@link Set} view of the keys contained in this map.
...
@@ -1303,8 +1303,8 @@ public class Hashtable<K,V>
...
@@ -1303,8 +1303,8 @@ public class Hashtable<K,V>
private
class
Enumerator
<
T
>
implements
Enumeration
<
T
>,
Iterator
<
T
>
{
private
class
Enumerator
<
T
>
implements
Enumeration
<
T
>,
Iterator
<
T
>
{
Entry
<?,?>[]
table
=
Hashtable
.
this
.
table
;
Entry
<?,?>[]
table
=
Hashtable
.
this
.
table
;
int
index
=
table
.
length
;
int
index
=
table
.
length
;
Entry
<?,?>
entry
=
null
;
Entry
<?,?>
entry
;
Entry
<?,?>
lastReturned
=
null
;
Entry
<?,?>
lastReturned
;
int
type
;
int
type
;
/**
/**
...
...
src/share/classes/java/util/IdentityHashMap.java
浏览文件 @
3b247e37
...
@@ -842,7 +842,7 @@ public class IdentityHashMap<K,V>
...
@@ -842,7 +842,7 @@ public class IdentityHashMap<K,V>
private
class
EntryIterator
private
class
EntryIterator
extends
IdentityHashMapIterator
<
Map
.
Entry
<
K
,
V
>>
extends
IdentityHashMapIterator
<
Map
.
Entry
<
K
,
V
>>
{
{
private
Entry
lastReturnedEntry
=
null
;
private
Entry
lastReturnedEntry
;
public
Map
.
Entry
<
K
,
V
>
next
()
{
public
Map
.
Entry
<
K
,
V
>
next
()
{
lastReturnedEntry
=
new
Entry
(
nextIndex
());
lastReturnedEntry
=
new
Entry
(
nextIndex
());
...
@@ -928,7 +928,7 @@ public class IdentityHashMap<K,V>
...
@@ -928,7 +928,7 @@ public class IdentityHashMap<K,V>
* view the first time this view is requested. The view is stateless,
* view the first time this view is requested. The view is stateless,
* so there's no reason to create more than one.
* so there's no reason to create more than one.
*/
*/
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
=
null
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
;
/**
/**
* Returns an identity-based set view of the keys contained in this map.
* Returns an identity-based set view of the keys contained in this map.
...
...
src/share/classes/java/util/LinkedList.java
浏览文件 @
3b247e37
...
@@ -869,7 +869,7 @@ public class LinkedList<E>
...
@@ -869,7 +869,7 @@ public class LinkedList<E>
}
}
private
class
ListItr
implements
ListIterator
<
E
>
{
private
class
ListItr
implements
ListIterator
<
E
>
{
private
Node
<
E
>
lastReturned
=
null
;
private
Node
<
E
>
lastReturned
;
private
Node
<
E
>
next
;
private
Node
<
E
>
next
;
private
int
nextIndex
;
private
int
nextIndex
;
private
int
expectedModCount
=
modCount
;
private
int
expectedModCount
=
modCount
;
...
...
src/share/classes/java/util/TreeMap.java
浏览文件 @
3b247e37
...
@@ -120,7 +120,7 @@ public class TreeMap<K,V>
...
@@ -120,7 +120,7 @@ public class TreeMap<K,V>
*/
*/
private
final
Comparator
<?
super
K
>
comparator
;
private
final
Comparator
<?
super
K
>
comparator
;
private
transient
Entry
<
K
,
V
>
root
=
null
;
private
transient
Entry
<
K
,
V
>
root
;
/**
/**
* The number of entries in the tree
* The number of entries in the tree
...
@@ -784,9 +784,9 @@ public class TreeMap<K,V>
...
@@ -784,9 +784,9 @@ public class TreeMap<K,V>
* the first time this view is requested. Views are stateless, so
* the first time this view is requested. Views are stateless, so
* there's no reason to create more than one.
* there's no reason to create more than one.
*/
*/
private
transient
EntrySet
entrySet
=
null
;
private
transient
EntrySet
entrySet
;
private
transient
KeySet
<
K
>
navigableKeySet
=
null
;
private
transient
KeySet
<
K
>
navigableKeySet
;
private
transient
NavigableMap
<
K
,
V
>
descendingMap
=
null
;
private
transient
NavigableMap
<
K
,
V
>
descendingMap
;
/**
/**
* Returns a {@link Set} view of the keys contained in this map.
* Returns a {@link Set} view of the keys contained in this map.
...
@@ -1585,9 +1585,9 @@ public class TreeMap<K,V>
...
@@ -1585,9 +1585,9 @@ public class TreeMap<K,V>
}
}
// Views
// Views
transient
NavigableMap
<
K
,
V
>
descendingMapView
=
null
;
transient
NavigableMap
<
K
,
V
>
descendingMapView
;
transient
EntrySetView
entrySetView
=
null
;
transient
EntrySetView
entrySetView
;
transient
KeySet
<
K
>
navigableKeySetView
=
null
;
transient
KeySet
<
K
>
navigableKeySetView
;
public
final
NavigableSet
<
K
>
navigableKeySet
()
{
public
final
NavigableSet
<
K
>
navigableKeySet
()
{
KeySet
<
K
>
nksv
=
navigableKeySetView
;
KeySet
<
K
>
nksv
=
navigableKeySetView
;
...
@@ -2048,8 +2048,8 @@ public class TreeMap<K,V>
...
@@ -2048,8 +2048,8 @@ public class TreeMap<K,V>
static
final
class
Entry
<
K
,
V
>
implements
Map
.
Entry
<
K
,
V
>
{
static
final
class
Entry
<
K
,
V
>
implements
Map
.
Entry
<
K
,
V
>
{
K
key
;
K
key
;
V
value
;
V
value
;
Entry
<
K
,
V
>
left
=
null
;
Entry
<
K
,
V
>
left
;
Entry
<
K
,
V
>
right
=
null
;
Entry
<
K
,
V
>
right
;
Entry
<
K
,
V
>
parent
;
Entry
<
K
,
V
>
parent
;
boolean
color
=
BLACK
;
boolean
color
=
BLACK
;
...
...
src/share/classes/java/util/WeakHashMap.java
浏览文件 @
3b247e37
...
@@ -759,21 +759,21 @@ public class WeakHashMap<K,V>
...
@@ -759,21 +759,21 @@ public class WeakHashMap<K,V>
private
abstract
class
HashIterator
<
T
>
implements
Iterator
<
T
>
{
private
abstract
class
HashIterator
<
T
>
implements
Iterator
<
T
>
{
private
int
index
;
private
int
index
;
private
Entry
<
K
,
V
>
entry
=
null
;
private
Entry
<
K
,
V
>
entry
;
private
Entry
<
K
,
V
>
lastReturned
=
null
;
private
Entry
<
K
,
V
>
lastReturned
;
private
int
expectedModCount
=
modCount
;
private
int
expectedModCount
=
modCount
;
/**
/**
* Strong reference needed to avoid disappearance of key
* Strong reference needed to avoid disappearance of key
* between hasNext and next
* between hasNext and next
*/
*/
private
Object
nextKey
=
null
;
private
Object
nextKey
;
/**
/**
* Strong reference needed to avoid disappearance of key
* Strong reference needed to avoid disappearance of key
* between nextEntry() and any use of the entry
* between nextEntry() and any use of the entry
*/
*/
private
Object
currentKey
=
null
;
private
Object
currentKey
;
HashIterator
()
{
HashIterator
()
{
index
=
isEmpty
()
?
0
:
table
.
length
;
index
=
isEmpty
()
?
0
:
table
.
length
;
...
@@ -848,7 +848,7 @@ public class WeakHashMap<K,V>
...
@@ -848,7 +848,7 @@ public class WeakHashMap<K,V>
// Views
// Views
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
=
null
;
private
transient
Set
<
Map
.
Entry
<
K
,
V
>>
entrySet
;
/**
/**
* Returns a {@link Set} view of the keys contained in this map.
* Returns a {@link Set} view of the keys contained in this map.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录