提交 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
# 7196801
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
java/lang/instrument/RedefineBigClass.sh linux-x64
java/lang/instrument/RetransformBigClass.sh linux-x64
......
......@@ -48,10 +48,18 @@ public class GenericStringTest {
if (egs != null) {
String actual = method.toGenericString();
System.out.println(actual);
if (! egs.value().equals(actual)) {
failures++;
System.err.printf("ERROR: Expected ''%s''; got ''%s''.\n",
egs.value(), actual);
if (method.isBridge()) {
if (! egs.bridgeValue().equals(actual)) {
failures++;
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> {
class Roebling implements Comparable<Roebling> {
@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) {
throw new IllegalArgumentException();
}
......@@ -154,9 +163,11 @@ interface TestInterface1 {
@Retention(RetentionPolicy.RUNTIME)
@interface ExpectedGenericString {
String value();
String bridgeValue() default "";
}
@Retention(RetentionPolicy.RUNTIME)
@interface ExpectedString {
String value();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册