8025548: langtools test tools/javac/lambda/methodReference/BridgeMethod.java incorrectly assumes no other methods generated in lambda class
authorrfield
Fri, 27 Sep 2013 13:06:38 -0700
changeset 20603 1cba7386cfd9
parent 20602 88692440ebd1
child 20604 13bdd49ddaf0
8025548: langtools test tools/javac/lambda/methodReference/BridgeMethod.java incorrectly assumes no other methods generated in lambda class Reviewed-by: vromero
langtools/test/tools/javac/lambda/methodReference/BridgeMethod.java
--- a/langtools/test/tools/javac/lambda/methodReference/BridgeMethod.java	Fri Sep 27 11:34:32 2013 -0700
+++ b/langtools/test/tools/javac/lambda/methodReference/BridgeMethod.java	Fri Sep 27 13:06:38 2013 -0700
@@ -108,9 +108,10 @@
         System.out.println("methods in SAM conversion of N:");
         for(Method m : methods) {
             System.out.println(m.toGenericString());
-            assertTrue(m.getName().equals("m"));
-            Class<?> returnType = m.getReturnType();
-            assertTrue(types.remove(returnType.getName()));
+            if (m.getName().equals("m")) {
+                Class<?> returnType = m.getReturnType();
+                assertTrue(types.remove(returnType.getName()));
+            }
         }
         assertTrue(types.size() == 1); //there's a bridge
     }