Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
0878054f
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0878054f
编写于
12月 05, 2011
作者:
W
weijun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7116857: Warnings in javax.security and some sun.misc
Reviewed-by: smarks
上级
e5894de1
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
84 addition
and
74 deletion
+84
-74
src/share/classes/javax/security/auth/kerberos/ServicePermission.java
...asses/javax/security/auth/kerberos/ServicePermission.java
+1
-1
src/share/classes/sun/misc/CEFormatException.java
src/share/classes/sun/misc/CEFormatException.java
+5
-3
src/share/classes/sun/misc/CEStreamExhausted.java
src/share/classes/sun/misc/CEStreamExhausted.java
+4
-1
src/share/classes/sun/misc/ClassLoaderUtil.java
src/share/classes/sun/misc/ClassLoaderUtil.java
+3
-3
src/share/classes/sun/misc/CompoundEnumeration.java
src/share/classes/sun/misc/CompoundEnumeration.java
+3
-3
src/share/classes/sun/misc/ExtensionInstallationException.java
...hare/classes/sun/misc/ExtensionInstallationException.java
+2
-0
src/share/classes/sun/misc/FloatingDecimal.java
src/share/classes/sun/misc/FloatingDecimal.java
+10
-9
src/share/classes/sun/misc/FormattedFloatingDecimal.java
src/share/classes/sun/misc/FormattedFloatingDecimal.java
+6
-6
src/share/classes/sun/misc/InvalidJarIndexException.java
src/share/classes/sun/misc/InvalidJarIndexException.java
+2
-0
src/share/classes/sun/misc/LRUCache.java
src/share/classes/sun/misc/LRUCache.java
+3
-1
src/share/classes/sun/misc/Queue.java
src/share/classes/sun/misc/Queue.java
+31
-31
src/share/classes/sun/misc/RequestProcessor.java
src/share/classes/sun/misc/RequestProcessor.java
+8
-11
src/share/classes/sun/misc/ServiceConfigurationError.java
src/share/classes/sun/misc/ServiceConfigurationError.java
+2
-0
src/share/classes/sun/misc/URLClassPath.java
src/share/classes/sun/misc/URLClassPath.java
+4
-5
未找到文件。
src/share/classes/javax/security/auth/kerberos/ServicePermission.java
浏览文件 @
0878054f
...
...
@@ -369,7 +369,7 @@ public final class ServicePermission extends Permission
switch
(
a
[
i
-
matchlen
])
{
case
','
:
seencomma
=
true
;
/*FALLTHROUGH*/
break
;
case
' '
:
case
'\r'
:
case
'\n'
:
case
'\f'
:
case
'\t'
:
break
;
...
...
src/share/classes/sun/misc/CEFormatException.java
浏览文件 @
0878054f
...
...
@@ -28,7 +28,9 @@ package sun.misc;
import
java.io.IOException
;
public
class
CEFormatException
extends
IOException
{
static
final
long
serialVersionUID
=
-
7139121221067081482L
;
public
CEFormatException
(
String
s
)
{
super
(
s
);
}
}
src/share/classes/sun/misc/CEStreamExhausted.java
浏览文件 @
0878054f
...
...
@@ -27,4 +27,7 @@ package sun.misc;
import
java.io.IOException
;
/** This exception is thrown when EOF is reached */
public
class
CEStreamExhausted
extends
IOException
{
};
public
class
CEStreamExhausted
extends
IOException
{
static
final
long
serialVersionUID
=
-
5889118049525891904L
;
}
src/share/classes/sun/misc/ClassLoaderUtil.java
浏览文件 @
0878054f
...
...
@@ -79,9 +79,9 @@ public class ClassLoaderUtil {
URLClassPath
ucp
=
SharedSecrets
.
getJavaNetAccess
()
.
getURLClassPath
(
classLoader
);
ArrayList
loaders
=
ucp
.
loaders
;
Stack
urls
=
ucp
.
urls
;
HashMap
lmap
=
ucp
.
lmap
;
ArrayList
<?>
loaders
=
ucp
.
loaders
;
Stack
<?>
urls
=
ucp
.
urls
;
HashMap
<?,?>
lmap
=
ucp
.
lmap
;
/*
*The urls variable in the URLClassPath object holds URLs that have not yet
...
...
src/share/classes/sun/misc/CompoundEnumeration.java
浏览文件 @
0878054f
...
...
@@ -33,10 +33,10 @@ import java.util.NoSuchElementException;
* enumerations.
*/
public
class
CompoundEnumeration
<
E
>
implements
Enumeration
<
E
>
{
private
Enumeration
[]
enums
;
private
Enumeration
<
E
>
[]
enums
;
private
int
index
=
0
;
public
CompoundEnumeration
(
Enumeration
[]
enums
)
{
public
CompoundEnumeration
(
Enumeration
<
E
>
[]
enums
)
{
this
.
enums
=
enums
;
}
...
...
@@ -58,6 +58,6 @@ public class CompoundEnumeration<E> implements Enumeration<E> {
if
(!
next
())
{
throw
new
NoSuchElementException
();
}
return
(
E
)
enums
[
index
].
nextElement
();
return
enums
[
index
].
nextElement
();
}
}
src/share/classes/sun/misc/ExtensionInstallationException.java
浏览文件 @
0878054f
...
...
@@ -34,6 +34,8 @@ package sun.misc;
public
class
ExtensionInstallationException
extends
Exception
{
static
final
long
serialVersionUID
=
3139688306909345924L
;
/*
* <p>
* Construct a new exception with an exception reason
...
...
src/share/classes/sun/misc/FloatingDecimal.java
浏览文件 @
0878054f
...
...
@@ -325,7 +325,7 @@ public class FloatingDecimal{
// can do int arithmetic rather than long!
int
ivalue
=
(
int
)
lvalue
;
ndigits
=
10
;
digits
=
(
char
[])(
perThreadBuffer
.
get
()
);
digits
=
perThreadBuffer
.
get
(
);
digitno
=
ndigits
-
1
;
c
=
ivalue
%
10
;
ivalue
/=
10
;
...
...
@@ -345,7 +345,7 @@ public class FloatingDecimal{
// same algorithm as above (same bugs, too )
// but using long arithmetic.
ndigits
=
20
;
digits
=
(
char
[])(
perThreadBuffer
.
get
()
);
digits
=
perThreadBuffer
.
get
(
);
digitno
=
ndigits
-
1
;
c
=
(
int
)(
lvalue
%
10L
);
lvalue
/=
10L
;
...
...
@@ -477,9 +477,9 @@ public class FloatingDecimal{
}
// Begin to unpack
// Discover obvious special cases of NaN and Infinity.
binExp
=
(
int
)(
(
fBits
&
singleExpMask
)
>>
singleExpShift
)
;
binExp
=
(
fBits
&
singleExpMask
)
>>
singleExpShift
;
fractBits
=
fBits
&
singleFractMask
;
if
(
binExp
==
(
int
)(
singleExpMask
>>
singleExpShift
)
)
{
if
(
binExp
==
(
singleExpMask
>>
singleExpShift
)
)
{
isExceptional
=
true
;
if
(
fractBits
==
0L
){
digits
=
infinity
;
...
...
@@ -900,7 +900,7 @@ public class FloatingDecimal{
}
public
String
toJavaFormatString
()
{
char
result
[]
=
(
char
[])(
perThreadBuffer
.
get
()
);
char
result
[]
=
perThreadBuffer
.
get
(
);
int
i
=
getChars
(
result
);
return
new
String
(
result
,
0
,
i
);
}
...
...
@@ -978,14 +978,14 @@ public class FloatingDecimal{
}
// Per-thread buffer for string/stringbuffer conversion
private
static
ThreadLocal
perThreadBuffer
=
new
ThreadLocal
()
{
protected
synchronized
Object
initialValue
()
{
private
static
ThreadLocal
<
char
[]>
perThreadBuffer
=
new
ThreadLocal
<
char
[]>
()
{
protected
synchronized
char
[]
initialValue
()
{
return
new
char
[
26
];
}
};
public
void
appendTo
(
Appendable
buf
)
{
char
result
[]
=
(
char
[])(
perThreadBuffer
.
get
()
);
char
result
[]
=
perThreadBuffer
.
get
(
);
int
i
=
getChars
(
result
);
if
(
buf
instanceof
StringBuilder
)
((
StringBuilder
)
buf
).
append
(
result
,
0
,
i
);
...
...
@@ -995,6 +995,7 @@ public class FloatingDecimal{
assert
false
;
}
@SuppressWarnings
(
"fallthrough"
)
public
static
FloatingDecimal
readJavaFormatString
(
String
in
)
throws
NumberFormatException
{
boolean
isNegative
=
false
;
...
...
@@ -2209,7 +2210,7 @@ public class FloatingDecimal{
// exponent correctly, even in the case of
// Double.MAX_VALUE overflowing to infinity.
significand
=
((
(
(
long
)
exponent
+
significand
=
((
(
exponent
+
(
long
)
DoubleConsts
.
EXP_BIAS
)
<<
(
DoubleConsts
.
SIGNIFICAND_WIDTH
-
1
))
&
DoubleConsts
.
EXP_BIT_MASK
)
|
...
...
src/share/classes/sun/misc/FormattedFloatingDecimal.java
浏览文件 @
0878054f
...
...
@@ -333,7 +333,7 @@ public class FormattedFloatingDecimal{
// can do int arithmetic rather than long!
int
ivalue
=
(
int
)
lvalue
;
ndigits
=
10
;
digits
=
(
char
[])(
perThreadBuffer
.
get
()
);
digits
=
perThreadBuffer
.
get
(
);
digitno
=
ndigits
-
1
;
c
=
ivalue
%
10
;
ivalue
/=
10
;
...
...
@@ -353,7 +353,7 @@ public class FormattedFloatingDecimal{
// same algorithm as above (same bugs, too )
// but using long arithmetic.
ndigits
=
20
;
digits
=
(
char
[])(
perThreadBuffer
.
get
()
);
digits
=
perThreadBuffer
.
get
(
);
digitno
=
ndigits
-
1
;
c
=
(
int
)(
lvalue
%
10L
);
lvalue
/=
10L
;
...
...
@@ -554,9 +554,9 @@ public class FormattedFloatingDecimal{
}
// Begin to unpack
// Discover obvious special cases of NaN and Infinity.
binExp
=
(
int
)(
(
fBits
&
singleExpMask
)
>>
singleExpShift
)
;
binExp
=
(
fBits
&
singleExpMask
)
>>
singleExpShift
;
fractBits
=
fBits
&
singleFractMask
;
if
(
binExp
==
(
int
)(
singleExpMask
>>
singleExpShift
)
)
{
if
(
binExp
==
(
singleExpMask
>>
singleExpShift
)
)
{
isExceptional
=
true
;
if
(
fractBits
==
0L
){
digits
=
infinity
;
...
...
@@ -1140,8 +1140,8 @@ public class FormattedFloatingDecimal{
}
// Per-thread buffer for string/stringbuffer conversion
private
static
ThreadLocal
perThreadBuffer
=
new
ThreadLocal
()
{
protected
synchronized
Object
initialValue
()
{
private
static
ThreadLocal
<
char
[]>
perThreadBuffer
=
new
ThreadLocal
<
char
[]>
()
{
protected
synchronized
char
[]
initialValue
()
{
return
new
char
[
26
];
}
};
...
...
src/share/classes/sun/misc/InvalidJarIndexException.java
浏览文件 @
0878054f
...
...
@@ -38,6 +38,8 @@ import java.lang.LinkageError;
public
class
InvalidJarIndexException
extends
RuntimeException
{
static
final
long
serialVersionUID
=
-
6159797516569680148L
;
/**
* Constructs an <code>InvalidJarIndexException</code> with no
* detail message.
...
...
src/share/classes/sun/misc/LRUCache.java
浏览文件 @
0878054f
...
...
@@ -52,7 +52,9 @@ public abstract class LRUCache<N,V> {
public
V
forName
(
N
name
)
{
if
(
oa
==
null
)
{
oa
=
(
V
[])
new
Object
[
size
];
@SuppressWarnings
(
"unchecked"
)
V
[]
temp
=
(
V
[])
new
Object
[
size
];
oa
=
temp
;
}
else
{
for
(
int
i
=
0
;
i
<
oa
.
length
;
i
++)
{
V
ob
=
oa
[
i
];
...
...
src/share/classes/sun/misc/Queue.java
浏览文件 @
0878054f
...
...
@@ -35,12 +35,12 @@ import java.util.NoSuchElementException;
* @author Herb Jellinek
*/
public
class
Queue
{
public
class
Queue
<
T
>
{
int
length
=
0
;
QueueElement
head
=
null
;
QueueElement
tail
=
null
;
QueueElement
<
T
>
head
=
null
;
QueueElement
<
T
>
tail
=
null
;
public
Queue
()
{
}
...
...
@@ -48,9 +48,9 @@ public class Queue {
/**
* Enqueue an object.
*/
public
synchronized
void
enqueue
(
Object
obj
)
{
public
synchronized
void
enqueue
(
T
obj
)
{
QueueElement
newElt
=
new
QueueElement
(
obj
);
QueueElement
<
T
>
newElt
=
new
QueueElement
<>
(
obj
);
if
(
head
==
null
)
{
head
=
newElt
;
...
...
@@ -72,7 +72,7 @@ public class Queue {
* @exception java.lang.InterruptedException if any thread has
* interrupted this thread.
*/
public
Object
dequeue
()
throws
InterruptedException
{
public
T
dequeue
()
throws
InterruptedException
{
return
dequeue
(
0L
);
}
...
...
@@ -85,13 +85,13 @@ public class Queue {
* @exception java.lang.InterruptedException if any thread has
* interrupted this thread.
*/
public
synchronized
Object
dequeue
(
long
timeOut
)
public
synchronized
T
dequeue
(
long
timeOut
)
throws
InterruptedException
{
while
(
tail
==
null
)
{
wait
(
timeOut
);
}
QueueElement
elt
=
tail
;
QueueElement
<
T
>
elt
=
tail
;
tail
=
elt
.
prev
;
if
(
tail
==
null
)
{
head
=
null
;
...
...
@@ -115,8 +115,8 @@ public class Queue {
* order. Use the Enumeration methods on the returned object to
* fetch the elements sequentially.
*/
public
final
synchronized
Enumeration
elements
()
{
return
new
LIFOQueueEnumerator
(
this
);
public
final
synchronized
Enumeration
<
T
>
elements
()
{
return
new
LIFOQueueEnumerator
<>
(
this
);
}
/**
...
...
@@ -124,8 +124,8 @@ public class Queue {
* order. Use the Enumeration methods on the returned object to
* fetch the elements sequentially.
*/
public
final
synchronized
Enumeration
reverseElements
()
{
return
new
FIFOQueueEnumerator
(
this
);
public
final
synchronized
Enumeration
<
T
>
reverseElements
()
{
return
new
FIFOQueueEnumerator
<>
(
this
);
}
public
synchronized
void
dump
(
String
msg
)
{
...
...
@@ -133,8 +133,8 @@ public class Queue {
System
.
err
.
println
(
"["
+
length
+
" elt(s); head = "
+
(
head
==
null
?
"null"
:
(
head
.
obj
)+
""
)+
" tail = "
+(
tail
==
null
?
"null"
:
(
tail
.
obj
)+
""
));
QueueElement
cursor
=
head
;
QueueElement
last
=
null
;
QueueElement
<
T
>
cursor
=
head
;
QueueElement
<
T
>
last
=
null
;
while
(
cursor
!=
null
)
{
System
.
err
.
println
(
" "
+
cursor
);
last
=
cursor
;
...
...
@@ -147,11 +147,11 @@ public class Queue {
}
}
final
class
FIFOQueueEnumerator
implements
Enumeration
{
Queue
queue
;
QueueElement
cursor
;
final
class
FIFOQueueEnumerator
<
T
>
implements
Enumeration
<
T
>
{
Queue
<
T
>
queue
;
QueueElement
<
T
>
cursor
;
FIFOQueueEnumerator
(
Queue
q
)
{
FIFOQueueEnumerator
(
Queue
<
T
>
q
)
{
queue
=
q
;
cursor
=
q
.
tail
;
}
...
...
@@ -160,10 +160,10 @@ final class FIFOQueueEnumerator implements Enumeration {
return
(
cursor
!=
null
);
}
public
Object
nextElement
()
{
public
T
nextElement
()
{
synchronized
(
queue
)
{
if
(
cursor
!=
null
)
{
QueueElement
result
=
cursor
;
QueueElement
<
T
>
result
=
cursor
;
cursor
=
cursor
.
prev
;
return
result
.
obj
;
}
...
...
@@ -172,11 +172,11 @@ final class FIFOQueueEnumerator implements Enumeration {
}
}
final
class
LIFOQueueEnumerator
implements
Enumeration
{
Queue
queue
;
QueueElement
cursor
;
final
class
LIFOQueueEnumerator
<
T
>
implements
Enumeration
<
T
>
{
Queue
<
T
>
queue
;
QueueElement
<
T
>
cursor
;
LIFOQueueEnumerator
(
Queue
q
)
{
LIFOQueueEnumerator
(
Queue
<
T
>
q
)
{
queue
=
q
;
cursor
=
q
.
head
;
}
...
...
@@ -185,10 +185,10 @@ final class LIFOQueueEnumerator implements Enumeration {
return
(
cursor
!=
null
);
}
public
Object
nextElement
()
{
public
T
nextElement
()
{
synchronized
(
queue
)
{
if
(
cursor
!=
null
)
{
QueueElement
result
=
cursor
;
QueueElement
<
T
>
result
=
cursor
;
cursor
=
cursor
.
next
;
return
result
.
obj
;
}
...
...
@@ -197,13 +197,13 @@ final class LIFOQueueEnumerator implements Enumeration {
}
}
class
QueueElement
{
QueueElement
next
=
null
;
QueueElement
prev
=
null
;
class
QueueElement
<
T
>
{
QueueElement
<
T
>
next
=
null
;
QueueElement
<
T
>
prev
=
null
;
Object
obj
=
null
;
T
obj
=
null
;
QueueElement
(
Object
obj
)
{
QueueElement
(
T
obj
)
{
this
.
obj
=
obj
;
}
...
...
src/share/classes/sun/misc/RequestProcessor.java
浏览文件 @
0878054f
...
...
@@ -36,7 +36,7 @@ package sun.misc;
public
class
RequestProcessor
implements
Runnable
{
private
static
Queue
requestQueue
;
private
static
Queue
<
Request
>
requestQueue
;
private
static
Thread
dispatcher
;
/**
...
...
@@ -55,16 +55,13 @@ public class RequestProcessor implements Runnable {
lazyInitialize
();
while
(
true
)
{
try
{
Object
obj
=
requestQueue
.
dequeue
();
if
(
obj
instanceof
Request
)
{
// ignore bogons
Request
req
=
(
Request
)
obj
;
Request
req
=
requestQueue
.
dequeue
();
try
{
req
.
execute
();
}
catch
(
Throwable
t
)
{
// do nothing at the moment...maybe report an error
// in the future
}
}
}
catch
(
InterruptedException
e
)
{
// do nothing at the present time.
}
...
...
@@ -92,7 +89,7 @@ public class RequestProcessor implements Runnable {
*/
private
static
synchronized
void
lazyInitialize
()
{
if
(
requestQueue
==
null
)
{
requestQueue
=
new
Queue
();
requestQueue
=
new
Queue
<
Request
>
();
}
}
...
...
src/share/classes/sun/misc/ServiceConfigurationError.java
浏览文件 @
0878054f
...
...
@@ -43,6 +43,8 @@ package sun.misc;
public
class
ServiceConfigurationError
extends
Error
{
static
final
long
serialVersionUID
=
8769866263384244465L
;
/**
* Constructs a new instance with the specified detail string.
*/
...
...
src/share/classes/sun/misc/URLClassPath.java
浏览文件 @
0878054f
...
...
@@ -836,10 +836,9 @@ public class URLClassPath {
Set
<
String
>
visited
)
{
Resource
res
;
Object
[]
jarFiles
;
boolean
done
=
false
;
String
[]
jarFiles
;
int
count
=
0
;
LinkedList
jarFilesList
=
null
;
LinkedList
<
String
>
jarFilesList
=
null
;
/* If there no jar files in the index that can potential contain
* this resource then return immediately.
...
...
@@ -848,11 +847,11 @@ public class URLClassPath {
return
null
;
do
{
jarFiles
=
jarFilesList
.
toArray
();
int
size
=
jarFilesList
.
size
();
jarFiles
=
jarFilesList
.
toArray
(
new
String
[
size
]);
/* loop through the mapped jar file list */
while
(
count
<
size
)
{
String
jarName
=
(
String
)
jarFiles
[
count
++];
String
jarName
=
jarFiles
[
count
++];
JarLoader
newLoader
;
final
URL
url
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录