Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
2c2ee4d7
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看板
提交
2c2ee4d7
编写于
3月 04, 2011
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6966736: javac verbose output is inconsistent
Reviewed-by: mcimadamore
上级
58438fd5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
30 deletion
+21
-30
src/share/classes/com/sun/tools/apt/main/AptJavaCompiler.java
...share/classes/com/sun/tools/apt/main/AptJavaCompiler.java
+2
-2
src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
+4
-12
src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
+1
-1
src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
+5
-13
src/share/classes/com/sun/tools/javac/util/Log.java
src/share/classes/com/sun/tools/javac/util/Log.java
+9
-2
未找到文件。
src/share/classes/com/sun/tools/apt/main/AptJavaCompiler.java
浏览文件 @
2c2ee4d7
/*
/*
* Copyright (c) 2004, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 201
1
, 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
...
@@ -280,7 +280,7 @@ public class AptJavaCompiler extends com.sun.tools.javac.main.JavaCompiler {
...
@@ -280,7 +280,7 @@ public class AptJavaCompiler extends com.sun.tools.javac.main.JavaCompiler {
}
}
if
(
verbose
)
if
(
verbose
)
printVerbose
(
"total"
,
Long
.
toString
(
System
.
currentTimeMillis
()
-
msec
));
log
.
printVerbose
(
"total"
,
Long
.
toString
(
System
.
currentTimeMillis
()
-
msec
));
chk
.
reportDeferredDiagnostics
();
chk
.
reportDeferredDiagnostics
();
...
...
src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
浏览文件 @
2c2ee4d7
...
@@ -2183,7 +2183,7 @@ public class ClassReader implements Completer {
...
@@ -2183,7 +2183,7 @@ public class ClassReader implements Completer {
}
}
currentClassFile
=
classfile
;
currentClassFile
=
classfile
;
if
(
verbose
)
{
if
(
verbose
)
{
printVerbose
(
"loading"
,
currentClassFile
.
toString
());
log
.
printVerbose
(
"loading"
,
currentClassFile
.
toString
());
}
}
if
(
classfile
.
getKind
()
==
JavaFileObject
.
Kind
.
CLASS
)
{
if
(
classfile
.
getKind
()
==
JavaFileObject
.
Kind
.
CLASS
)
{
filling
=
true
;
filling
=
true
;
...
@@ -2452,13 +2452,13 @@ public class ClassReader implements Completer {
...
@@ -2452,13 +2452,13 @@ public class ClassReader implements Completer {
for
(
File
file
:
fm
.
getLocation
(
SOURCE_PATH
))
{
for
(
File
file
:
fm
.
getLocation
(
SOURCE_PATH
))
{
path
=
path
.
prepend
(
file
);
path
=
path
.
prepend
(
file
);
}
}
printVerbose
(
"sourcepath"
,
path
.
reverse
().
toString
());
log
.
printVerbose
(
"sourcepath"
,
path
.
reverse
().
toString
());
}
else
if
(
wantSourceFiles
)
{
}
else
if
(
wantSourceFiles
)
{
List
<
File
>
path
=
List
.
nil
();
List
<
File
>
path
=
List
.
nil
();
for
(
File
file
:
fm
.
getLocation
(
CLASS_PATH
))
{
for
(
File
file
:
fm
.
getLocation
(
CLASS_PATH
))
{
path
=
path
.
prepend
(
file
);
path
=
path
.
prepend
(
file
);
}
}
printVerbose
(
"sourcepath"
,
path
.
reverse
().
toString
());
log
.
printVerbose
(
"sourcepath"
,
path
.
reverse
().
toString
());
}
}
if
(
wantClassFiles
)
{
if
(
wantClassFiles
)
{
List
<
File
>
path
=
List
.
nil
();
List
<
File
>
path
=
List
.
nil
();
...
@@ -2468,7 +2468,7 @@ public class ClassReader implements Completer {
...
@@ -2468,7 +2468,7 @@ public class ClassReader implements Completer {
for
(
File
file
:
fm
.
getLocation
(
CLASS_PATH
))
{
for
(
File
file
:
fm
.
getLocation
(
CLASS_PATH
))
{
path
=
path
.
prepend
(
file
);
path
=
path
.
prepend
(
file
);
}
}
printVerbose
(
"classpath"
,
path
.
reverse
().
toString
());
log
.
printVerbose
(
"classpath"
,
path
.
reverse
().
toString
());
}
}
}
}
}
}
...
@@ -2519,14 +2519,6 @@ public class ClassReader implements Completer {
...
@@ -2519,14 +2519,6 @@ public class ClassReader implements Completer {
}
}
}
}
/** Output for "-verbose" option.
* @param key The key to look up the correct internationalized string.
* @param arg An argument for substitution into the output string.
*/
private
void
printVerbose
(
String
key
,
CharSequence
arg
)
{
log
.
printNoteLines
(
"verbose."
+
key
,
arg
);
}
/** Output for "-checkclassfile" option.
/** Output for "-checkclassfile" option.
* @param key The key to look up the correct internationalized string.
* @param key The key to look up the correct internationalized string.
* @param arg An argument for substitution into the output string.
* @param arg An argument for substitution into the output string.
...
...
src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
浏览文件 @
2c2ee4d7
...
@@ -1447,7 +1447,7 @@ public class ClassWriter extends ClassFile {
...
@@ -1447,7 +1447,7 @@ public class ClassWriter extends ClassFile {
try
{
try
{
writeClassFile
(
out
,
c
);
writeClassFile
(
out
,
c
);
if
(
verbose
)
if
(
verbose
)
log
.
print
ErrLines
(
"verbose.
wrote.file"
,
outFile
);
log
.
print
Verbose
(
"
wrote.file"
,
outFile
);
out
.
close
();
out
.
close
();
out
=
null
;
out
=
null
;
}
finally
{
}
finally
{
...
...
src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
浏览文件 @
2c2ee4d7
...
@@ -585,7 +585,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
...
@@ -585,7 +585,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
null
,
List
.<
JCTree
>
nil
());
null
,
List
.<
JCTree
>
nil
());
if
(
content
!=
null
)
{
if
(
content
!=
null
)
{
if
(
verbose
)
{
if
(
verbose
)
{
printVerbose
(
"parsing.started"
,
filename
);
log
.
printVerbose
(
"parsing.started"
,
filename
);
}
}
if
(
taskListener
!=
null
)
{
if
(
taskListener
!=
null
)
{
TaskEvent
e
=
new
TaskEvent
(
TaskEvent
.
Kind
.
PARSE
,
filename
);
TaskEvent
e
=
new
TaskEvent
(
TaskEvent
.
Kind
.
PARSE
,
filename
);
...
@@ -594,7 +594,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
...
@@ -594,7 +594,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
Parser
parser
=
parserFactory
.
newParser
(
content
,
keepComments
(),
genEndPos
,
lineDebugInfo
);
Parser
parser
=
parserFactory
.
newParser
(
content
,
keepComments
(),
genEndPos
,
lineDebugInfo
);
tree
=
parser
.
parseCompilationUnit
();
tree
=
parser
.
parseCompilationUnit
();
if
(
verbose
)
{
if
(
verbose
)
{
printVerbose
(
"parsing.done"
,
Long
.
toString
(
elapsed
(
msec
)));
log
.
printVerbose
(
"parsing.done"
,
Long
.
toString
(
elapsed
(
msec
)));
}
}
}
}
...
@@ -681,7 +681,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
...
@@ -681,7 +681,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
try
{
try
{
new
Pretty
(
out
,
true
).
printUnit
(
env
.
toplevel
,
cdef
);
new
Pretty
(
out
,
true
).
printUnit
(
env
.
toplevel
,
cdef
);
if
(
verbose
)
if
(
verbose
)
printVerbose
(
"wrote.file"
,
outFile
);
log
.
printVerbose
(
"wrote.file"
,
outFile
);
}
finally
{
}
finally
{
out
.
close
();
out
.
close
();
}
}
...
@@ -867,7 +867,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
...
@@ -867,7 +867,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
if
(
verbose
)
{
if
(
verbose
)
{
elapsed_msec
=
elapsed
(
start_msec
);
elapsed_msec
=
elapsed
(
start_msec
);
printVerbose
(
"total"
,
Long
.
toString
(
elapsed_msec
));
log
.
printVerbose
(
"total"
,
Long
.
toString
(
elapsed_msec
));
}
}
reportDeferredDiagnostics
();
reportDeferredDiagnostics
();
...
@@ -1154,7 +1154,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
...
@@ -1154,7 +1154,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
if
(
verboseCompilePolicy
)
if
(
verboseCompilePolicy
)
printNote
(
"[attribute "
+
env
.
enclClass
.
sym
+
"]"
);
printNote
(
"[attribute "
+
env
.
enclClass
.
sym
+
"]"
);
if
(
verbose
)
if
(
verbose
)
printVerbose
(
"checking.attribution"
,
env
.
enclClass
.
sym
);
log
.
printVerbose
(
"checking.attribution"
,
env
.
enclClass
.
sym
);
if
(
taskListener
!=
null
)
{
if
(
taskListener
!=
null
)
{
TaskEvent
e
=
new
TaskEvent
(
TaskEvent
.
Kind
.
ANALYZE
,
env
.
toplevel
,
env
.
enclClass
.
sym
);
TaskEvent
e
=
new
TaskEvent
(
TaskEvent
.
Kind
.
ANALYZE
,
env
.
toplevel
,
env
.
enclClass
.
sym
);
...
@@ -1575,14 +1575,6 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
...
@@ -1575,14 +1575,6 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
Log
.
printLines
(
log
.
noticeWriter
,
lines
);
Log
.
printLines
(
log
.
noticeWriter
,
lines
);
}
}
/** Output for "-verbose" option.
* @param key The key to look up the correct internationalized string.
* @param arg An argument for substitution into the output string.
*/
protected
void
printVerbose
(
String
key
,
Object
arg
)
{
log
.
printNoteLines
(
"verbose."
+
key
,
arg
);
}
/** Print numbers of errors and warnings.
/** Print numbers of errors and warnings.
*/
*/
protected
void
printCount
(
String
kind
,
int
count
)
{
protected
void
printCount
(
String
kind
,
int
count
)
{
...
...
src/share/classes/com/sun/tools/javac/util/Log.java
浏览文件 @
2c2ee4d7
/*
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
1
, 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
...
@@ -329,7 +329,6 @@ public class Log extends AbstractLog {
...
@@ -329,7 +329,6 @@ public class Log extends AbstractLog {
printLines
(
errWriter
,
localize
(
key
,
args
));
printLines
(
errWriter
,
localize
(
key
,
args
));
}
}
/** Print the text of a message to the noticeWriter stream,
/** Print the text of a message to the noticeWriter stream,
* translating newlines appropriately for the platform.
* translating newlines appropriately for the platform.
*/
*/
...
@@ -337,6 +336,14 @@ public class Log extends AbstractLog {
...
@@ -337,6 +336,14 @@ public class Log extends AbstractLog {
printLines
(
noticeWriter
,
localize
(
key
,
args
));
printLines
(
noticeWriter
,
localize
(
key
,
args
));
}
}
/**
* Print the localized text of a "verbose" message to the
* noticeWriter stream.
*/
public
void
printVerbose
(
String
key
,
Object
...
args
)
{
printLines
(
noticeWriter
,
localize
(
"verbose."
+
key
,
args
));
}
protected
void
directError
(
String
key
,
Object
...
args
)
{
protected
void
directError
(
String
key
,
Object
...
args
)
{
printErrLines
(
key
,
args
);
printErrLines
(
key
,
args
);
errWriter
.
flush
();
errWriter
.
flush
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录