Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
72c1129d
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看板
提交
72c1129d
编写于
2月 25, 2010
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6929645: Address various findbugs warnings in langtools
Reviewed-by: jjg
上级
0a737416
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
13 deletion
+33
-13
src/share/classes/com/sun/tools/apt/comp/Apt.java
src/share/classes/com/sun/tools/apt/comp/Apt.java
+4
-2
src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java
...un/tools/apt/mirror/declaration/AnnotationProxyMaker.java
+2
-2
src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java
...com/sun/tools/apt/mirror/declaration/DeclarationImpl.java
+1
-1
src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
...asses/com/sun/tools/javac/model/AnnotationProxyMaker.java
+20
-4
src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
...un/tools/javac/processing/JavacProcessingEnvironment.java
+6
-4
未找到文件。
src/share/classes/com/sun/tools/apt/comp/Apt.java
浏览文件 @
72c1129d
...
@@ -457,8 +457,10 @@ public class Apt extends ListBuffer<Env<AttrContext>> {
...
@@ -457,8 +457,10 @@ public class Apt extends ListBuffer<Env<AttrContext>> {
throw
new
UsageMessageNeededException
();
throw
new
UsageMessageNeededException
();
try
{
try
{
for
(
AnnotationProcessorFactory
apFactory:
factoryToAnnotation
.
keySet
())
{
for
(
Map
.
Entry
<
AnnotationProcessorFactory
,
Set
<
AnnotationTypeDeclaration
>>
entry
:
AnnotationProcessor
processor
=
apFactory
.
getProcessorFor
(
factoryToAnnotation
.
get
(
apFactory
),
factoryToAnnotation
.
entrySet
())
{
AnnotationProcessorFactory
apFactory
=
entry
.
getKey
();
AnnotationProcessor
processor
=
apFactory
.
getProcessorFor
(
entry
.
getValue
(),
trivAPE
);
trivAPE
);
if
(
processor
!=
null
)
if
(
processor
!=
null
)
processors
.
add
(
processor
);
processors
.
add
(
processor
);
...
...
src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java
浏览文件 @
72c1129d
...
@@ -270,7 +270,7 @@ class AnnotationProxyMaker {
...
@@ -270,7 +270,7 @@ class AnnotationProxyMaker {
* The toString, hashCode, and equals methods foward to the underlying
* The toString, hashCode, and equals methods foward to the underlying
* type.
* type.
*/
*/
private
static
class
MirroredTypeExceptionProxy
extends
ExceptionProxy
{
private
static
final
class
MirroredTypeExceptionProxy
extends
ExceptionProxy
{
private
static
final
long
serialVersionUID
=
6662035281599933545L
;
private
static
final
long
serialVersionUID
=
6662035281599933545L
;
private
MirroredTypeException
ex
;
private
MirroredTypeException
ex
;
...
@@ -312,7 +312,7 @@ class AnnotationProxyMaker {
...
@@ -312,7 +312,7 @@ class AnnotationProxyMaker {
* The toString, hashCode, and equals methods foward to the underlying
* The toString, hashCode, and equals methods foward to the underlying
* types.
* types.
*/
*/
private
static
class
MirroredTypesExceptionProxy
extends
ExceptionProxy
{
private
static
final
class
MirroredTypesExceptionProxy
extends
ExceptionProxy
{
private
static
final
long
serialVersionUID
=
-
6670822532616693951L
;
private
static
final
long
serialVersionUID
=
-
6670822532616693951L
;
private
MirroredTypesException
ex
;
private
MirroredTypesException
ex
;
...
...
src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java
浏览文件 @
72c1129d
...
@@ -58,7 +58,7 @@ public abstract class DeclarationImpl implements Declaration {
...
@@ -58,7 +58,7 @@ public abstract class DeclarationImpl implements Declaration {
protected
final
AptEnv
env
;
protected
final
AptEnv
env
;
public
final
Symbol
sym
;
public
final
Symbol
sym
;
protected
static
DeclarationFilter
identityFilter
=
protected
static
final
DeclarationFilter
identityFilter
=
new
DeclarationFilter
();
new
DeclarationFilter
();
...
...
src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
浏览文件 @
72c1129d
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
package
com.sun.tools.javac.model
;
package
com.sun.tools.javac.model
;
import
com.sun.tools.javac.util.*
;
import
com.sun.tools.javac.util.*
;
import
java.io.ObjectInputStream
;
import
java.io.IOException
;
import
java.lang.annotation.*
;
import
java.lang.annotation.*
;
import
java.lang.reflect.Array
;
import
java.lang.reflect.Array
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
...
@@ -268,10 +270,10 @@ public class AnnotationProxyMaker {
...
@@ -268,10 +270,10 @@ public class AnnotationProxyMaker {
* The toString, hashCode, and equals methods foward to the underlying
* The toString, hashCode, and equals methods foward to the underlying
* type.
* type.
*/
*/
private
static
class
MirroredTypeExceptionProxy
extends
ExceptionProxy
{
private
static
final
class
MirroredTypeExceptionProxy
extends
ExceptionProxy
{
static
final
long
serialVersionUID
=
269
;
static
final
long
serialVersionUID
=
269
;
private
transient
final
TypeMirror
type
;
private
transient
TypeMirror
type
;
private
final
String
typeString
;
private
final
String
typeString
;
MirroredTypeExceptionProxy
(
TypeMirror
t
)
{
MirroredTypeExceptionProxy
(
TypeMirror
t
)
{
...
@@ -296,6 +298,13 @@ public class AnnotationProxyMaker {
...
@@ -296,6 +298,13 @@ public class AnnotationProxyMaker {
protected
RuntimeException
generateException
()
{
protected
RuntimeException
generateException
()
{
return
new
MirroredTypeException
(
type
);
return
new
MirroredTypeException
(
type
);
}
}
// Explicitly set all transient fields.
private
void
readObject
(
ObjectInputStream
s
)
throws
IOException
,
ClassNotFoundException
{
s
.
defaultReadObject
();
type
=
null
;
}
}
}
...
@@ -304,10 +313,10 @@ public class AnnotationProxyMaker {
...
@@ -304,10 +313,10 @@ public class AnnotationProxyMaker {
* The toString, hashCode, and equals methods foward to the underlying
* The toString, hashCode, and equals methods foward to the underlying
* types.
* types.
*/
*/
private
static
class
MirroredTypesExceptionProxy
extends
ExceptionProxy
{
private
static
final
class
MirroredTypesExceptionProxy
extends
ExceptionProxy
{
static
final
long
serialVersionUID
=
269
;
static
final
long
serialVersionUID
=
269
;
private
transient
final
List
<
TypeMirror
>
types
;
private
transient
List
<
TypeMirror
>
types
;
private
final
String
typeStrings
;
private
final
String
typeStrings
;
MirroredTypesExceptionProxy
(
List
<
TypeMirror
>
ts
)
{
MirroredTypesExceptionProxy
(
List
<
TypeMirror
>
ts
)
{
...
@@ -333,5 +342,12 @@ public class AnnotationProxyMaker {
...
@@ -333,5 +342,12 @@ public class AnnotationProxyMaker {
protected
RuntimeException
generateException
()
{
protected
RuntimeException
generateException
()
{
return
new
MirroredTypesException
(
types
);
return
new
MirroredTypesException
(
types
);
}
}
// Explicitly set all transient fields.
private
void
readObject
(
ObjectInputStream
s
)
throws
IOException
,
ClassNotFoundException
{
s
.
defaultReadObject
();
types
=
null
;
}
}
}
}
}
src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
浏览文件 @
72c1129d
...
@@ -690,10 +690,12 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
...
@@ -690,10 +690,12 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
ProcessorState
ps
=
psi
.
next
();
ProcessorState
ps
=
psi
.
next
();
Set
<
String
>
matchedNames
=
new
HashSet
<
String
>();
Set
<
String
>
matchedNames
=
new
HashSet
<
String
>();
Set
<
TypeElement
>
typeElements
=
new
LinkedHashSet
<
TypeElement
>();
Set
<
TypeElement
>
typeElements
=
new
LinkedHashSet
<
TypeElement
>();
for
(
String
unmatchedAnnotationName
:
unmatchedAnnotations
.
keySet
())
{
for
(
Map
.
Entry
<
String
,
TypeElement
>
entry:
unmatchedAnnotations
.
entrySet
())
{
String
unmatchedAnnotationName
=
entry
.
getKey
();
if
(
ps
.
annotationSupported
(
unmatchedAnnotationName
)
)
{
if
(
ps
.
annotationSupported
(
unmatchedAnnotationName
)
)
{
matchedNames
.
add
(
unmatchedAnnotationName
);
matchedNames
.
add
(
unmatchedAnnotationName
);
TypeElement
te
=
unmatchedAnnotations
.
get
(
unmatchedAnnotationName
);
TypeElement
te
=
entry
.
getValue
(
);
if
(
te
!=
null
)
if
(
te
!=
null
)
typeElements
.
add
(
te
);
typeElements
.
add
(
te
);
}
}
...
@@ -790,7 +792,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
...
@@ -790,7 +792,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
List
<
JCCompilationUnit
>
roots
,
List
<
JCCompilationUnit
>
roots
,
List
<
ClassSymbol
>
classSymbols
,
List
<
ClassSymbol
>
classSymbols
,
Iterable
<?
extends
PackageSymbol
>
pckSymbols
)
Iterable
<?
extends
PackageSymbol
>
pckSymbols
)
throws
IOException
{
throws
IOException
{
log
=
Log
.
instance
(
context
);
log
=
Log
.
instance
(
context
);
// Writer for -XprintRounds and -XprintProcessorInfo data
// Writer for -XprintRounds and -XprintProcessorInfo data
...
@@ -1218,7 +1220,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
...
@@ -1218,7 +1220,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
return
false
;
return
false
;
}
}
private
class
AnnotationCollector
extends
TreeScanner
{
private
static
class
AnnotationCollector
extends
TreeScanner
{
List
<
JCTree
>
path
=
List
.
nil
();
List
<
JCTree
>
path
=
List
.
nil
();
static
final
boolean
verbose
=
false
;
static
final
boolean
verbose
=
false
;
List
<
JCAnnotation
>
annotations
=
List
.
nil
();
List
<
JCAnnotation
>
annotations
=
List
.
nil
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录