8015780: java/lang/reflect/Method/GenericStringTest.java failing
Reviewed-by: darcy, jfranck
--- a/jdk/test/ProblemList.txt Mon Aug 12 09:29:06 2013 -0400
+++ b/jdk/test/ProblemList.txt Mon Aug 12 17:40:14 2013 +0100
@@ -131,9 +131,6 @@
# 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
--- a/jdk/test/java/lang/reflect/Method/GenericStringTest.java Mon Aug 12 09:29:06 2013 -0400
+++ b/jdk/test/java/lang/reflect/Method/GenericStringTest.java Mon Aug 12 17:40:14 2013 +0100
@@ -48,10 +48,18 @@
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 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 @@
@Retention(RetentionPolicy.RUNTIME)
@interface ExpectedGenericString {
String value();
+ String bridgeValue() default "";
}
@Retention(RetentionPolicy.RUNTIME)
@interface ExpectedString {
String value();
}
+