Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
d21b4c20
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看板
提交
d21b4c20
编写于
2月 20, 2014
作者:
K
kizune
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8035364: An extra space in the comments of constant pool entries
Reviewed-by: ksrini
上级
b6c15243
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
13 deletion
+13
-13
src/share/classes/com/sun/tools/javap/ConstantWriter.java
src/share/classes/com/sun/tools/javap/ConstantWriter.java
+8
-8
test/tools/javap/T6868539.java
test/tools/javap/T6868539.java
+5
-5
未找到文件。
src/share/classes/com/sun/tools/javap/ConstantWriter.java
浏览文件 @
d21b4c20
...
...
@@ -64,7 +64,7 @@ public class ConstantWriter extends BasicWriter {
public
Integer
visitClass
(
CONSTANT_Class_info
info
,
Void
p
)
{
print
(
"#"
+
info
.
name_index
);
tab
();
println
(
"//
"
+
stringValue
(
info
));
println
(
"// "
+
stringValue
(
info
));
return
1
;
}
...
...
@@ -76,7 +76,7 @@ public class ConstantWriter extends BasicWriter {
public
Integer
visitFieldref
(
CONSTANT_Fieldref_info
info
,
Void
p
)
{
print
(
"#"
+
info
.
class_index
+
".#"
+
info
.
name_and_type_index
);
tab
();
println
(
"//
"
+
stringValue
(
info
));
println
(
"// "
+
stringValue
(
info
));
return
1
;
}
...
...
@@ -93,14 +93,14 @@ public class ConstantWriter extends BasicWriter {
public
Integer
visitInterfaceMethodref
(
CONSTANT_InterfaceMethodref_info
info
,
Void
p
)
{
print
(
"#"
+
info
.
class_index
+
".#"
+
info
.
name_and_type_index
);
tab
();
println
(
"//
"
+
stringValue
(
info
));
println
(
"// "
+
stringValue
(
info
));
return
1
;
}
public
Integer
visitInvokeDynamic
(
CONSTANT_InvokeDynamic_info
info
,
Void
p
)
{
print
(
"#"
+
info
.
bootstrap_method_attr_index
+
":#"
+
info
.
name_and_type_index
);
tab
();
println
(
"//
"
+
stringValue
(
info
));
println
(
"// "
+
stringValue
(
info
));
return
1
;
}
...
...
@@ -112,21 +112,21 @@ public class ConstantWriter extends BasicWriter {
public
Integer
visitNameAndType
(
CONSTANT_NameAndType_info
info
,
Void
p
)
{
print
(
"#"
+
info
.
name_index
+
":#"
+
info
.
type_index
);
tab
();
println
(
"//
"
+
stringValue
(
info
));
println
(
"// "
+
stringValue
(
info
));
return
1
;
}
public
Integer
visitMethodref
(
CONSTANT_Methodref_info
info
,
Void
p
)
{
print
(
"#"
+
info
.
class_index
+
".#"
+
info
.
name_and_type_index
);
tab
();
println
(
"//
"
+
stringValue
(
info
));
println
(
"// "
+
stringValue
(
info
));
return
1
;
}
public
Integer
visitMethodHandle
(
CONSTANT_MethodHandle_info
info
,
Void
p
)
{
print
(
"#"
+
info
.
reference_kind
.
tag
+
":#"
+
info
.
reference_index
);
tab
();
println
(
"//
"
+
stringValue
(
info
));
println
(
"// "
+
stringValue
(
info
));
return
1
;
}
...
...
@@ -140,7 +140,7 @@ public class ConstantWriter extends BasicWriter {
public
Integer
visitString
(
CONSTANT_String_info
info
,
Void
p
)
{
print
(
"#"
+
info
.
string_index
);
tab
();
println
(
"//
"
+
stringValue
(
info
));
println
(
"// "
+
stringValue
(
info
));
return
1
;
}
...
...
test/tools/javap/T6868539.java
浏览文件 @
d21b4c20
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 6868539 6868548
* @bug 6868539 6868548
8035364
* @summary javap should use current names for constant pool entries,
* remove spurious ';' from constant pool entries
*/
...
...
@@ -41,17 +41,17 @@ public class T6868539
void
run
()
{
String
output
=
javap
(
"T6868539"
);
verify
(
output
,
"Utf8 +java/lang/String"
);
// 1: Utf8
// 2: currently unused
// 2: currently unused
verify
(
output
,
"Integer +123456"
);
// 3: Integer
verify
(
output
,
"Float +123456.0f"
);
// 4: Float
verify
(
output
,
"Long +123456l"
);
// 5: Long
verify
(
output
,
"Double +123456.0d"
);
// 6: Double
verify
(
output
,
"Class +#[0-9]+ +// +
T6868539"
);
// 7: Class
verify
(
output
,
"String +#[0-9]+ +// +
not found"
);
// 8: String
verify
(
output
,
"Class +#[0-9]+ +// +
T6868539"
);
// 7: Class
verify
(
output
,
"String +#[0-9]+ +// +
not found"
);
// 8: String
verify
(
output
,
"Fieldref +#[0-9]+\\.#[0-9]+ +// +T6868539.errors:I"
);
// 9: Fieldref
verify
(
output
,
"Methodref +#[0-9]+\\.#[0-9]+ +// +T6868539.run:\\(\\)V"
);
// 10: Methodref
verify
(
output
,
"InterfaceMethodref +#[0-9]+\\.#[0-9]+ +// +java/lang/Runnable\\.run:\\(\\)V"
);
// 11: InterfaceMethodref
// 11: InterfaceMethodref
verify
(
output
,
"NameAndType +#[0-9]+:#[0-9]+ +// +run:\\(\\)V"
);
// 12: NameAndType
if
(
errors
>
0
)
throw
new
Error
(
errors
+
" found."
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录