langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
changeset 12087 31eeebc3ef49
parent 12080 23101f54df44
child 12334 29e1bfdcba4e
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Thu Mar 08 08:19:58 2012 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Mar 09 17:10:56 2012 +0000
@@ -385,7 +385,6 @@
                                   final Warner warn) throws InferenceException {
         //-System.err.println("instantiateMethod(" + tvars + ", " + mt + ", " + argtypes + ")"); //DEBUG
         List<Type> undetvars = Type.map(tvars, fromTypeVarFun);
-        //final List<Type> capturedArgs = types.capture(argtypes);
 
         final List<Type> capturedArgs =
                 rs.checkRawArgumentsAcceptable(env, undetvars, argtypes, mt.getParameterTypes(),
@@ -451,11 +450,12 @@
                                        types.subst(getThrownTypes(), tvars, inferred),
                                        qtype.tsym);
                     // check that actuals conform to inferred formals
+                    warn.clear();
                     checkArgumentsAcceptable(env, capturedArgs, owntype.getParameterTypes(), allowBoxing, useVarargs, warn);
                     // check that inferred bounds conform to their bounds
                     checkWithinBounds(all_tvars,
                            types.subst(inferredTypes, tvars, inferred), warn);
-                    qtype = chk.checkMethod(owntype, msym, env, TreeInfo.args(env.tree), capturedArgs, useVarargs);
+                    qtype = chk.checkMethod(owntype, msym, env, TreeInfo.args(env.tree), capturedArgs, useVarargs, warn.hasNonSilentLint(Lint.LintCategory.UNCHECKED));
                 }
             };
         }