changeset 7863:70c8f4a4b8d6

8015780: java/lang/reflect/Method/GenericStringTest.java failing Reviewed-by: darcy, jfranck
author vromero
date Mon, 12 Aug 2013 17:40:14 +0100
parents d73fbf005f5f
children 7758bcf0ab6b
files test/ProblemList.txt test/java/lang/reflect/Method/GenericStringTest.java
diffstat 2 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/test/ProblemList.txt	Mon Aug 12 09:29:06 2013 -0400
+++ b/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/test/java/lang/reflect/Method/GenericStringTest.java	Mon Aug 12 09:29:06 2013 -0400
+++ b/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();
 }
+