changeset 579:0bed895ea4d1

Fixed spurious assertion error when lambda invocation expression requires boxing
author mcimadamore
date Thu, 17 Jun 2010 13:24:27 +0100
parents 40d30a39cf19
children 9f79be8946c6
files src/share/classes/com/sun/tools/javac/comp/Resolve.java
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Wed Jun 16 12:43:41 2010 +0100
+++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Thu Jun 17 13:24:27 2010 +0100
@@ -958,9 +958,11 @@
                                    true, false, Warner.noWarnings);
         if (types.isFunctionType(site) && !argsOk)
             return wrongMethod.setWrongSym(m);
-        assert argumentsAcceptable(argtypes, types.memberType(site, m).getParameterTypes(),
-                                   true, false, Warner.noWarnings);
-        assert null != instantiate(env, site, m, argtypes, typeargtypes, false, false, Warner.noWarnings);
+        if (!argumentsAcceptable(argtypes, types.memberType(site, m).getParameterTypes(),
+                                   true, false, Warner.noWarnings) ||
+            instantiate(env, site, m, argtypes, typeargtypes, true, false, Warner.noWarnings) == null) {
+            throw new AssertionError();
+        }
         return m;
     }
     //where