Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
eea48c18
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看板
提交
eea48c18
编写于
8月 22, 2011
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7080020: Add conventional constructors to InternalError and VirtualMachineError
Reviewed-by: darcy Contributed-by: nsebastian.sickelmann@gmx.de
上级
6b43f370
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
107 addition
and
73 deletion
+107
-73
src/share/classes/com/sun/servicetag/SunConnection.java
src/share/classes/com/sun/servicetag/SunConnection.java
+6
-14
src/share/classes/java/lang/InternalError.java
src/share/classes/java/lang/InternalError.java
+41
-6
src/share/classes/java/lang/VirtualMachineError.java
src/share/classes/java/lang/VirtualMachineError.java
+40
-7
src/share/classes/java/util/prefs/Preferences.java
src/share/classes/java/util/prefs/Preferences.java
+4
-8
src/share/classes/sun/font/FontManagerFactory.java
src/share/classes/sun/font/FontManagerFactory.java
+4
-13
src/share/classes/sun/misc/URLClassPath.java
src/share/classes/sun/misc/URLClassPath.java
+3
-3
src/share/classes/sun/reflect/MethodAccessorGenerator.java
src/share/classes/sun/reflect/MethodAccessorGenerator.java
+2
-4
src/share/classes/sun/security/x509/X500Name.java
src/share/classes/sun/security/x509/X500Name.java
+1
-2
src/share/classes/sun/tools/jconsole/ProxyClient.java
src/share/classes/sun/tools/jconsole/ProxyClient.java
+5
-13
src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java
...lasses/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java
+1
-3
未找到文件。
src/share/classes/com/sun/servicetag/SunConnection.java
浏览文件 @
eea48c18
...
@@ -101,10 +101,7 @@ class SunConnection {
...
@@ -101,10 +101,7 @@ class SunConnection {
return
new
URL
(
registerURL
);
return
new
URL
(
registerURL
);
}
catch
(
MalformedURLException
ex
)
{
}
catch
(
MalformedURLException
ex
)
{
// should never reach here
// should never reach here
InternalError
x
=
throw
new
InternalError
(
ex
.
getMessage
(),
ex
);
new
InternalError
(
ex
.
getMessage
());
x
.
initCause
(
ex
);
throw
x
;
}
}
}
}
...
@@ -171,9 +168,7 @@ class SunConnection {
...
@@ -171,9 +168,7 @@ class SunConnection {
try
{
try
{
BrowserSupport
.
browse
(
url
.
toURI
());
BrowserSupport
.
browse
(
url
.
toURI
());
}
catch
(
URISyntaxException
ex
)
{
}
catch
(
URISyntaxException
ex
)
{
InternalError
x
=
new
InternalError
(
"Error in registering: "
+
ex
.
getMessage
());
throw
new
InternalError
(
"Error in registering: "
+
ex
.
getMessage
(),
ex
);
x
.
initCause
(
ex
);
throw
x
;
}
catch
(
IllegalArgumentException
ex
)
{
}
catch
(
IllegalArgumentException
ex
)
{
if
(
Util
.
isVerbose
())
{
if
(
Util
.
isVerbose
())
{
ex
.
printStackTrace
();
ex
.
printStackTrace
();
...
@@ -232,9 +227,7 @@ class SunConnection {
...
@@ -232,9 +227,7 @@ class SunConnection {
return
(
returnCode
==
HttpURLConnection
.
HTTP_OK
);
return
(
returnCode
==
HttpURLConnection
.
HTTP_OK
);
}
catch
(
MalformedURLException
me
)
{
}
catch
(
MalformedURLException
me
)
{
// should never reach here
// should never reach here
InternalError
x
=
new
InternalError
(
"Error in registering: "
+
me
.
getMessage
());
throw
new
InternalError
(
"Error in registering: "
+
me
.
getMessage
(),
me
);
x
.
initCause
(
me
);
throw
x
;
}
catch
(
Exception
ioe
)
{
}
catch
(
Exception
ioe
)
{
// SocketTimeoutException, IOException or UnknownHostException
// SocketTimeoutException, IOException or UnknownHostException
if
(
Util
.
isVerbose
())
{
if
(
Util
.
isVerbose
())
{
...
@@ -262,10 +255,9 @@ class SunConnection {
...
@@ -262,10 +255,9 @@ class SunConnection {
BrowserSupport
.
browse
(
registerPage
.
toURI
());
BrowserSupport
.
browse
(
registerPage
.
toURI
());
}
catch
(
FileNotFoundException
ex
)
{
}
catch
(
FileNotFoundException
ex
)
{
// should never reach here
// should never reach here
InternalError
x
=
throw
new
InternalError
(
new
InternalError
(
"Error in launching "
+
registerPage
+
": "
+
ex
.
getMessage
());
"Error in launching "
+
registerPage
+
": "
+
ex
.
getMessage
()
x
.
initCause
(
ex
);
,
ex
);
throw
x
;
}
catch
(
IllegalArgumentException
ex
)
{
}
catch
(
IllegalArgumentException
ex
)
{
if
(
Util
.
isVerbose
())
{
if
(
Util
.
isVerbose
())
{
ex
.
printStackTrace
();
ex
.
printStackTrace
();
...
...
src/share/classes/java/lang/InternalError.java
浏览文件 @
eea48c18
/*
/*
* Copyright (c) 1994, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 20
11
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -32,8 +32,7 @@ package java.lang;
...
@@ -32,8 +32,7 @@ package java.lang;
* @author unascribed
* @author unascribed
* @since JDK1.0
* @since JDK1.0
*/
*/
public
public
class
InternalError
extends
VirtualMachineError
{
class
InternalError
extends
VirtualMachineError
{
private
static
final
long
serialVersionUID
=
-
9062593416125562365L
;
private
static
final
long
serialVersionUID
=
-
9062593416125562365L
;
/**
/**
...
@@ -47,9 +46,45 @@ class InternalError extends VirtualMachineError {
...
@@ -47,9 +46,45 @@ class InternalError extends VirtualMachineError {
* Constructs an <code>InternalError</code> with the specified
* Constructs an <code>InternalError</code> with the specified
* detail message.
* detail message.
*
*
* @param
s
the detail message.
* @param
message
the detail message.
*/
*/
public
InternalError
(
String
s
)
{
public
InternalError
(
String
message
)
{
super
(
s
);
super
(
message
);
}
}
/**
* Constructs an {@code InternalError} with the specified detail
* message and cause. <p>Note that the detail message associated
* with {@code cause} is <i>not</i> automatically incorporated in
* this error's detail message.
*
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.8
*/
public
InternalError
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
}
/**
* Constructs an {@code InternalError} with the specified cause
* and a detail message of {@code (cause==null ? null :
* cause.toString())} (which typically contains the class and
* detail message of {@code cause}).
*
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.8
*/
public
InternalError
(
Throwable
cause
)
{
super
(
cause
);
}
}
}
src/share/classes/java/lang/VirtualMachineError.java
浏览文件 @
eea48c18
/*
/*
* Copyright (c) 1995,
1997
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995,
2011
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* under the terms of the GNU General Public License version 2 only, as
P
* published by the Free Software Foundation. Oracle designates this
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
* by Oracle in the LICENSE file that accompanied this code.
...
@@ -33,8 +33,7 @@ package java.lang;
...
@@ -33,8 +33,7 @@ package java.lang;
* @author Frank Yellin
* @author Frank Yellin
* @since JDK1.0
* @since JDK1.0
*/
*/
abstract
public
abstract
public
class
VirtualMachineError
extends
Error
{
class
VirtualMachineError
extends
Error
{
/**
/**
* Constructs a <code>VirtualMachineError</code> with no detail message.
* Constructs a <code>VirtualMachineError</code> with no detail message.
*/
*/
...
@@ -46,9 +45,43 @@ class VirtualMachineError extends Error {
...
@@ -46,9 +45,43 @@ class VirtualMachineError extends Error {
* Constructs a <code>VirtualMachineError</code> with the specified
* Constructs a <code>VirtualMachineError</code> with the specified
* detail message.
* detail message.
*
*
* @param
s
the detail message.
* @param
message
the detail message.
*/
*/
public
VirtualMachineError
(
String
s
)
{
public
VirtualMachineError
(
String
message
)
{
super
(
s
);
super
(
message
);
}
/**
* Constructs a {@code VirtualMachineError} with the specified
* detail message and cause. <p>Note that the detail message
* associated with {@code cause} is <i>not</i> automatically
* incorporated in this error's detail message.
*
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.8
*/
public
VirtualMachineError
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
}
/**
* Constructs an a {@code VirtualMachineError} with the specified
* cause and a detail message of {@code (cause==null ? null :
* cause.toString())} (which typically contains the class and
* detail message of {@code cause}).
*
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.8
*/
public
VirtualMachineError
(
Throwable
cause
)
{
super
(
cause
);
}
}
}
}
src/share/classes/java/util/prefs/Preferences.java
浏览文件 @
eea48c18
...
@@ -256,11 +256,9 @@ public abstract class Preferences {
...
@@ -256,11 +256,9 @@ public abstract class Preferences {
.
getContextClassLoader
())
.
getContextClassLoader
())
.
newInstance
();
.
newInstance
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
InternalError
error
=
new
InternalError
(
throw
new
InternalError
(
"Can't instantiate Preferences factory "
"Can't instantiate Preferences factory "
+
factoryName
);
+
factoryName
,
e
);
error
.
initCause
(
e
);
throw
error
;
}
}
}
}
}
}
...
@@ -299,11 +297,9 @@ public abstract class Preferences {
...
@@ -299,11 +297,9 @@ public abstract class Preferences {
return
(
PreferencesFactory
)
return
(
PreferencesFactory
)
Class
.
forName
(
platformFactory
,
false
,
null
).
newInstance
();
Class
.
forName
(
platformFactory
,
false
,
null
).
newInstance
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
InternalError
error
=
new
InternalError
(
throw
new
InternalError
(
"Can't instantiate platform default Preferences factory "
"Can't instantiate platform default Preferences factory "
+
platformFactory
);
+
platformFactory
,
e
);
error
.
initCause
(
e
);
throw
error
;
}
}
}
}
...
...
src/share/classes/sun/font/FontManagerFactory.java
浏览文件 @
eea48c18
...
@@ -78,20 +78,11 @@ public final class FontManagerFactory {
...
@@ -78,20 +78,11 @@ public final class FontManagerFactory {
ClassLoader
cl
=
ClassLoader
.
getSystemClassLoader
();
ClassLoader
cl
=
ClassLoader
.
getSystemClassLoader
();
Class
fmClass
=
Class
.
forName
(
fmClassName
,
true
,
cl
);
Class
fmClass
=
Class
.
forName
(
fmClassName
,
true
,
cl
);
instance
=
(
FontManager
)
fmClass
.
newInstance
();
instance
=
(
FontManager
)
fmClass
.
newInstance
();
}
catch
(
ClassNotFoundException
ex
)
{
}
catch
(
ClassNotFoundException
|
InternalError
err
=
new
InternalError
();
InstantiationException
|
err
.
initCause
(
ex
);
IllegalAccessException
ex
)
{
throw
err
;
throw
new
InternalError
(
ex
)
;
}
catch
(
InstantiationException
ex
)
{
InternalError
err
=
new
InternalError
();
err
.
initCause
(
ex
);
throw
err
;
}
catch
(
IllegalAccessException
ex
)
{
InternalError
err
=
new
InternalError
();
err
.
initCause
(
ex
);
throw
err
;
}
}
return
null
;
return
null
;
}
}
...
...
src/share/classes/sun/misc/URLClassPath.java
浏览文件 @
eea48c18
...
@@ -717,7 +717,7 @@ public class URLClassPath {
...
@@ -717,7 +717,7 @@ public class URLClassPath {
try
{
try
{
ensureOpen
();
ensureOpen
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
(
InternalError
)
new
InternalError
().
initCause
(
e
);
throw
new
InternalError
(
e
);
}
}
return
index
;
return
index
;
}
}
...
@@ -812,7 +812,7 @@ public class URLClassPath {
...
@@ -812,7 +812,7 @@ public class URLClassPath {
try
{
try
{
ensureOpen
();
ensureOpen
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
(
InternalError
)
new
InternalError
().
initCause
(
e
);
throw
new
InternalError
(
e
);
}
}
final
JarEntry
entry
=
jar
.
getJarEntry
(
name
);
final
JarEntry
entry
=
jar
.
getJarEntry
(
name
);
if
(
entry
!=
null
)
if
(
entry
!=
null
)
...
@@ -900,7 +900,7 @@ public class URLClassPath {
...
@@ -900,7 +900,7 @@ public class URLClassPath {
try
{
try
{
newLoader
.
ensureOpen
();
newLoader
.
ensureOpen
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
(
InternalError
)
new
InternalError
().
initCause
(
e
);
throw
new
InternalError
(
e
);
}
}
final
JarEntry
entry
=
newLoader
.
jar
.
getJarEntry
(
name
);
final
JarEntry
entry
=
newLoader
.
jar
.
getJarEntry
(
name
);
if
(
entry
!=
null
)
{
if
(
entry
!=
null
)
{
...
...
src/share/classes/sun/reflect/MethodAccessorGenerator.java
浏览文件 @
eea48c18
...
@@ -401,10 +401,8 @@ class MethodAccessorGenerator extends AccessorGenerator {
...
@@ -401,10 +401,8 @@ class MethodAccessorGenerator extends AccessorGenerator {
0
,
0
,
bytes
.
length
,
bytes
.
length
,
declaringClass
.
getClassLoader
()).
newInstance
();
declaringClass
.
getClassLoader
()).
newInstance
();
}
catch
(
InstantiationException
|
}
catch
(
InstantiationException
|
IllegalAccessException
e
)
{
IllegalAccessException
e
)
{
throw
new
InternalError
(
e
);
throw
(
InternalError
)
new
InternalError
().
initCause
(
e
);
}
}
}
}
});
});
...
...
src/share/classes/sun/security/x509/X500Name.java
浏览文件 @
eea48c18
...
@@ -1401,8 +1401,7 @@ public class X500Name implements GeneralNameInterface, Principal {
...
@@ -1401,8 +1401,7 @@ public class X500Name implements GeneralNameInterface, Principal {
principalConstructor
=
constr
;
principalConstructor
=
constr
;
principalField
=
(
Field
)
result
[
1
];
principalField
=
(
Field
)
result
[
1
];
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
(
InternalError
)
new
InternalError
(
"Could not obtain "
throw
new
InternalError
(
"Could not obtain X500Principal access"
,
e
);
+
"X500Principal access"
).
initCause
(
e
);
}
}
}
}
...
...
src/share/classes/sun/tools/jconsole/ProxyClient.java
浏览文件 @
eea48c18
...
@@ -208,7 +208,7 @@ public class ProxyClient implements JConsoleContext {
...
@@ -208,7 +208,7 @@ public class ProxyClient implements JConsoleContext {
serverStubClass
=
Class
.
forName
(
rmiServerImplStubClassName
).
asSubclass
(
Remote
.
class
);
serverStubClass
=
Class
.
forName
(
rmiServerImplStubClassName
).
asSubclass
(
Remote
.
class
);
}
catch
(
ClassNotFoundException
e
)
{
}
catch
(
ClassNotFoundException
e
)
{
// should never reach here
// should never reach here
throw
(
InternalError
)
new
InternalError
(
e
.
getMessage
()).
initCause
(
e
);
throw
new
InternalError
(
e
.
getMessage
(),
e
);
}
}
rmiServerImplStubClass
=
serverStubClass
;
rmiServerImplStubClass
=
serverStubClass
;
}
}
...
@@ -395,18 +395,10 @@ public class ProxyClient implements JConsoleContext {
...
@@ -395,18 +395,10 @@ public class ProxyClient implements JConsoleContext {
}
catch
(
MalformedObjectNameException
e
)
{
}
catch
(
MalformedObjectNameException
e
)
{
// should not reach here
// should not reach here
throw
new
InternalError
(
e
.
getMessage
());
throw
new
InternalError
(
e
.
getMessage
());
}
catch
(
IntrospectionException
e
)
{
}
catch
(
IntrospectionException
|
InternalError
ie
=
new
InternalError
(
e
.
getMessage
());
InstanceNotFoundException
|
ie
.
initCause
(
e
);
ReflectionException
e
)
{
throw
ie
;
throw
new
InternalError
(
e
.
getMessage
(),
e
);
}
catch
(
InstanceNotFoundException
e
)
{
InternalError
ie
=
new
InternalError
(
e
.
getMessage
());
ie
.
initCause
(
e
);
throw
ie
;
}
catch
(
ReflectionException
e
)
{
InternalError
ie
=
new
InternalError
(
e
.
getMessage
());
ie
.
initCause
(
e
);
throw
ie
;
}
}
if
(
hasPlatformMXBeans
)
{
if
(
hasPlatformMXBeans
)
{
...
...
src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java
浏览文件 @
eea48c18
...
@@ -55,9 +55,7 @@ public class WindowsAsynchronousFileChannelImpl
...
@@ -55,9 +55,7 @@ public class WindowsAsynchronousFileChannelImpl
try
{
try
{
return
new
Iocp
(
null
,
ThreadPool
.
createDefault
()).
start
();
return
new
Iocp
(
null
,
ThreadPool
.
createDefault
()).
start
();
}
catch
(
IOException
ioe
)
{
}
catch
(
IOException
ioe
)
{
InternalError
e
=
new
InternalError
();
throw
new
InternalError
(
ioe
);
e
.
initCause
(
ioe
);
throw
e
;
}
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录