Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
4b97b169
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看板
提交
4b97b169
编写于
2月 19, 2013
作者:
E
emc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8008312: Re-enable MethodParameter tests in JDK
Reviewed-by: darcy
上级
22dbcf85
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
14 deletion
+15
-14
src/share/classes/java/lang/reflect/Parameter.java
src/share/classes/java/lang/reflect/Parameter.java
+3
-1
test/java/lang/reflect/Parameter/WithParameters.java
test/java/lang/reflect/Parameter/WithParameters.java
+12
-13
未找到文件。
src/share/classes/java/lang/reflect/Parameter.java
浏览文件 @
4b97b169
...
...
@@ -115,7 +115,9 @@ public final class Parameter implements AnnotatedElement {
(
type
.
toString
());
sb
.
append
(
Modifier
.
toString
(
getModifiers
()));
sb
.
append
(
" "
);
if
(
0
!=
modifiers
)
sb
.
append
(
" "
);
if
(
isVarArgs
())
sb
.
append
(
typename
.
replaceFirst
(
"\\[\\]$"
,
"..."
));
...
...
test/java/lang/reflect/Parameter/WithParameters.java
浏览文件 @
4b97b169
...
...
@@ -22,7 +22,6 @@
*/
/*
* @ignore
* @test
* @compile -parameters WithParameters.java
* @run main WithParameters
...
...
@@ -85,8 +84,8 @@ public class WithParameters {
error
++;
}
}
if
(
parameters
[
0
].
toString
().
equals
(
"
int quux"
))
{
System
.
err
.
println
(
"toString for quux is wrong"
);
if
(
!
parameters
[
0
].
toString
().
equals
(
"final
int quux"
))
{
System
.
err
.
println
(
"toString for quux is wrong
, expected \"final int quux\", got \""
+
parameters
[
0
]
+
"\"
"
);
error
++;
}
if
(
parameters
[
0
].
getModifiers
()
!=
Modifier
.
FINAL
)
{
...
...
@@ -101,8 +100,8 @@ public class WithParameters {
System
.
err
.
println
(
"getParameterizedType for quux is wrong"
);
error
++;
}
if
(
parameters
[
1
].
toString
().
equals
(
"WithParameters$Foo quuux"
))
{
System
.
err
.
println
(
"toString for quuux is wrong"
);
if
(
!
parameters
[
1
].
toString
().
equals
(
"WithParameters$Foo quuux"
))
{
System
.
err
.
println
(
"toString for quuux is wrong
, expected \"WithParameters$Foo quuux\", got \""
+
parameters
[
1
]
+
"\"
"
);
error
++;
}
if
(
parameters
[
1
].
isVarArgs
())
{
...
...
@@ -121,8 +120,8 @@ public class WithParameters {
System
.
err
.
println
(
"getAnnotations has the wrong annotation"
);
error
++;
}
if
(
parameters
[
2
].
toString
().
equals
(
"java.util.List<?> quuux
"
))
{
System
.
err
.
println
(
"toString for l is wrong"
);
if
(
!
parameters
[
2
].
toString
().
equals
(
"java.util.List<?> l
"
))
{
System
.
err
.
println
(
"toString for l is wrong
, expected \"java.util.List<?> l\", got \""
+
parameters
[
2
]
+
"\"
"
);
error
++;
}
if
(
parameters
[
2
].
isVarArgs
())
{
...
...
@@ -149,8 +148,8 @@ public class WithParameters {
error
++;
}
}
if
(
parameters
[
3
].
toString
().
equals
(
"java.util.List<WithParameters$Foo> l
"
))
{
System
.
err
.
println
(
"toString for l2 is wrong"
);
if
(
!
parameters
[
3
].
toString
().
equals
(
"java.util.List<WithParameters$Foo> l2
"
))
{
System
.
err
.
println
(
"toString for l2 is wrong
, expected \"java.util.List<WithParameters$Foo> l2\", got \""
+
parameters
[
3
]
+
"\"
"
);
error
++;
}
if
(
parameters
[
3
].
isVarArgs
())
{
...
...
@@ -177,8 +176,8 @@ public class WithParameters {
error
++;
}
}
if
(
parameters
[
4
].
toString
().
equals
(
"java.util.List<? extends WithParameters$Foo> l
"
))
{
System
.
err
.
println
(
"toString for l3 is wrong"
);
if
(
!
parameters
[
4
].
toString
().
equals
(
"java.util.List<? extends WithParameters$Foo> l3
"
))
{
System
.
err
.
println
(
"toString for l3 is wrong
, expected \"java.util.List<? extends WithParameters$Foo> l3\", got \""
+
parameters
[
3
]
+
"\"
"
);
error
++;
}
if
(
parameters
[
4
].
isVarArgs
())
{
...
...
@@ -212,8 +211,8 @@ public class WithParameters {
}
}
}
if
(
parameters
[
5
].
toString
().
equals
(
"java.lang.String... rest"
))
{
System
.
err
.
println
(
"toString for
l is wrong
"
);
if
(
!
parameters
[
5
].
toString
().
equals
(
"java.lang.String... rest"
))
{
System
.
err
.
println
(
"toString for
rest is wrong, expected \"java.lang.String... rest\", got \""
+
parameters
[
5
]
+
"\"
"
);
error
++;
}
if
(!
parameters
[
5
].
isVarArgs
())
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录