8025548: langtools test tools/javac/lambda/methodReference/BridgeMethod.java incorrectly assumes no other methods generated in lambda class
Reviewed-by: vromero
--- 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
}