提交 4a989689 编写于 作者: V vromero

8015780: java/lang/reflect/Method/GenericStringTest.java failing

Reviewed-by: darcy, jfranck
上级 678d153a
...@@ -131,9 +131,6 @@ java/lang/management/MemoryMXBean/CollectionUsageThreshold.java generic-all ...@@ -131,9 +131,6 @@ java/lang/management/MemoryMXBean/CollectionUsageThreshold.java generic-all
# 7196801 # 7196801
java/lang/management/MemoryMXBean/LowMemoryTest2.sh generic-all java/lang/management/MemoryMXBean/LowMemoryTest2.sh generic-all
# 8015780
java/lang/reflect/Method/GenericStringTest.java generic-all
# 8019845 due to memleak not related to the tested fix # 8019845 due to memleak not related to the tested fix
java/lang/instrument/RedefineBigClass.sh linux-x64 java/lang/instrument/RedefineBigClass.sh linux-x64
java/lang/instrument/RetransformBigClass.sh linux-x64 java/lang/instrument/RetransformBigClass.sh linux-x64
......
...@@ -48,10 +48,18 @@ public class GenericStringTest { ...@@ -48,10 +48,18 @@ public class GenericStringTest {
if (egs != null) { if (egs != null) {
String actual = method.toGenericString(); String actual = method.toGenericString();
System.out.println(actual); System.out.println(actual);
if (! egs.value().equals(actual)) { if (method.isBridge()) {
failures++; if (! egs.bridgeValue().equals(actual)) {
System.err.printf("ERROR: Expected ''%s''; got ''%s''.\n", failures++;
egs.value(), actual); System.err.printf("ERROR: Expected ''%s''; got ''%s''.\n",
egs.value(), actual);
}
} else {
if (! egs.value().equals(actual)) {
failures++;
System.err.printf("ERROR: Expected ''%s''; got ''%s''.\n",
egs.value(), actual);
}
} }
} }
...@@ -117,7 +125,8 @@ class TestClass2<E, F extends Exception> { ...@@ -117,7 +125,8 @@ class TestClass2<E, F extends Exception> {
class Roebling implements Comparable<Roebling> { class Roebling implements Comparable<Roebling> {
@ExpectedGenericString( @ExpectedGenericString(
"public int Roebling.compareTo(Roebling)") value="public int Roebling.compareTo(Roebling)",
bridgeValue="public int Roebling.compareTo(java.lang.Object)")
public int compareTo(Roebling r) { public int compareTo(Roebling r) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
...@@ -154,9 +163,11 @@ interface TestInterface1 { ...@@ -154,9 +163,11 @@ interface TestInterface1 {
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@interface ExpectedGenericString { @interface ExpectedGenericString {
String value(); String value();
String bridgeValue() default "";
} }
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@interface ExpectedString { @interface ExpectedString {
String value(); String value();
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册