Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
9a74d458
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9a74d458
编写于
1月 16, 2009
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6583626: Improve serialization support in javax.lang.model.type exception classes
Reviewed-by: jjg
上级
4202ed20
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
8 deletion
+28
-8
src/share/classes/javax/lang/model/type/MirroredTypeException.java
.../classes/javax/lang/model/type/MirroredTypeException.java
+12
-2
src/share/classes/javax/lang/model/type/MirroredTypesException.java
...classes/javax/lang/model/type/MirroredTypesException.java
+16
-6
未找到文件。
src/share/classes/javax/lang/model/type/MirroredTypeException.java
浏览文件 @
9a74d458
/*
* Copyright 2005-200
6
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2005-200
9
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -25,7 +25,8 @@
package
javax.lang.model.type
;
import
java.io.ObjectInputStream
;
import
java.io.IOException
;
import
java.lang.annotation.Annotation
;
import
javax.lang.model.element.Element
;
...
...
@@ -67,4 +68,13 @@ public class MirroredTypeException extends RuntimeException {
public
TypeMirror
getTypeMirror
()
{
return
type
;
}
/**
* Explicitly set all transient fields.
*/
private
void
readObject
(
ObjectInputStream
s
)
throws
IOException
,
ClassNotFoundException
{
s
.
defaultReadObject
();
type
=
null
;
}
}
src/share/classes/javax/lang/model/type/MirroredTypesException.java
浏览文件 @
9a74d458
/*
* Copyright 2005-200
6
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2005-200
9
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -25,12 +25,12 @@
package
javax.lang.model.type
;
import
java.lang.annotation.Annotation
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Collections
;
import
java.io.ObjectInputStream
;
import
java.io.IOException
;
import
javax.lang.model.element.Element
;
...
...
@@ -49,8 +49,7 @@ public class MirroredTypesException extends RuntimeException {
private
static
final
long
serialVersionUID
=
269
;
// Should this be non-final for a custum readObject method?
private
final
transient
List
<?
extends
TypeMirror
>
types
;
// cannot be serialized
private
transient
List
<?
extends
TypeMirror
>
types
;
// cannot be serialized
/**
* Constructs a new MirroredTypesException for the specified types.
...
...
@@ -58,7 +57,9 @@ public class MirroredTypesException extends RuntimeException {
* @param types the types being accessed
*/
public
MirroredTypesException
(
List
<?
extends
TypeMirror
>
types
)
{
super
(
"Attempt to access Class objects for TypeMirrors "
+
types
);
super
(
"Attempt to access Class objects for TypeMirrors "
+
(
types
=
// defensive copy
new
ArrayList
<
TypeMirror
>(
types
)).
toString
()
);
this
.
types
=
Collections
.
unmodifiableList
(
types
);
}
...
...
@@ -72,4 +73,13 @@ public class MirroredTypesException extends RuntimeException {
public
List
<?
extends
TypeMirror
>
getTypeMirrors
()
{
return
types
;
}
/**
* Explicitly set all transient fields.
*/
private
void
readObject
(
ObjectInputStream
s
)
throws
IOException
,
ClassNotFoundException
{
s
.
defaultReadObject
();
types
=
null
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录