7144506: Attr.checkMethod should be called after inference variables have been fixed

Tue, 06 Mar 2012 13:28:05 +0000

author
mcimadamore
date
Tue, 06 Mar 2012 13:28:05 +0000
changeset 1219
48ee63caaa93
parent 1218
dda6a5b15580
child 1220
38ae13dcd215

7144506: Attr.checkMethod should be called after inference variables have been fixed
Summary: Unify post-inference sanity check with Attr.checkMethod
Reviewed-by: jjg, dlsmith

src/share/classes/com/sun/tools/javac/comp/Attr.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/comp/Check.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/comp/Infer.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/tree/TreeInfo.java file | annotate | diff | comparison | revisions
test/tools/javac/6758789/T6758789b.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/6723444/T6723444.out file | annotate | diff | comparison | revisions
test/tools/javac/generics/7015430/T7015430.out file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Mar 06 13:26:36 2012 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Mar 06 13:28:05 2012 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -1518,8 +1518,6 @@
    1.11              Type mpt = newMethTemplate(argtypes, typeargtypes);
    1.12              localEnv.info.varArgs = false;
    1.13              Type mtype = attribExpr(tree.meth, localEnv, mpt);
    1.14 -            if (localEnv.info.varArgs)
    1.15 -                Assert.check(mtype.isErroneous() || tree.varargsElement != null);
    1.16  
    1.17              // Compute the result type.
    1.18              Type restype = mtype.getReturnType();
    1.19 @@ -1553,6 +1551,9 @@
    1.20              // Check that value of resulting type is admissible in the
    1.21              // current context.  Also, capture the return type
    1.22              result = check(tree, capture(restype), VAL, pkind, pt);
    1.23 +
    1.24 +            if (localEnv.info.varArgs)
    1.25 +                Assert.check(result.isErroneous() || tree.varargsElement != null);
    1.26          }
    1.27          chk.validate(tree.typeargs, localEnv);
    1.28      }
    1.29 @@ -1730,7 +1731,7 @@
    1.30                      tree.pos(), rsEnv, clazztype, argtypes, typeargtypes);
    1.31                  tree.constructorType = tree.constructor.type.isErroneous() ?
    1.32                      syms.errType :
    1.33 -                    checkMethod(clazztype,
    1.34 +                    checkConstructor(clazztype,
    1.35                          tree.constructor,
    1.36                          rsEnv,
    1.37                          tree.args,
    1.38 @@ -1805,7 +1806,7 @@
    1.39                      tree.constructorType =  syms.errType;
    1.40                  }
    1.41                  else {
    1.42 -                    tree.constructorType = checkMethod(clazztype,
    1.43 +                    tree.constructorType = checkConstructor(clazztype,
    1.44                              tree.constructor,
    1.45                              localEnv,
    1.46                              tree.args,
    1.47 @@ -2675,7 +2676,7 @@
    1.48      Warner noteWarner = new Warner();
    1.49  
    1.50      /**
    1.51 -     * Check that method arguments conform to its instantation.
    1.52 +     * Check that method arguments conform to its instantiation.
    1.53       **/
    1.54      public Type checkMethod(Type site,
    1.55                              Symbol sym,
    1.56 @@ -2712,109 +2713,39 @@
    1.57                                        true,
    1.58                                        useVarargs,
    1.59                                        noteWarner);
    1.60 -        boolean warned = noteWarner.hasNonSilentLint(LintCategory.UNCHECKED);
    1.61  
    1.62          // If this fails, something went wrong; we should not have
    1.63          // found the identifier in the first place.
    1.64          if (owntype == null) {
    1.65              if (!pt.isErroneous())
    1.66                  log.error(env.tree.pos(),
    1.67 -                          "internal.error.cant.instantiate",
    1.68 -                          sym, site,
    1.69 +                           "internal.error.cant.instantiate",
    1.70 +                           sym, site,
    1.71                            Type.toString(pt.getParameterTypes()));
    1.72              owntype = types.createErrorType(site);
    1.73 +            return types.createErrorType(site);
    1.74 +        } else if (owntype.getReturnType().tag == FORALL) {
    1.75 +            return owntype;
    1.76          } else {
    1.77 -            // System.out.println("call   : " + env.tree);
    1.78 -            // System.out.println("method : " + owntype);
    1.79 -            // System.out.println("actuals: " + argtypes);
    1.80 -            List<Type> formals = owntype.getParameterTypes();
    1.81 -            Type last = useVarargs ? formals.last() : null;
    1.82 -            if (sym.name==names.init &&
    1.83 -                sym.owner == syms.enumSym)
    1.84 -                formals = formals.tail.tail;
    1.85 -            List<JCExpression> args = argtrees;
    1.86 -            while (formals.head != last) {
    1.87 -                JCTree arg = args.head;
    1.88 -                Warner warn = chk.convertWarner(arg.pos(), arg.type, formals.head);
    1.89 -                assertConvertible(arg, arg.type, formals.head, warn);
    1.90 -                warned |= warn.hasNonSilentLint(LintCategory.UNCHECKED);
    1.91 -                args = args.tail;
    1.92 -                formals = formals.tail;
    1.93 -            }
    1.94 -            if (useVarargs) {
    1.95 -                Type varArg = types.elemtype(last);
    1.96 -                while (args.tail != null) {
    1.97 -                    JCTree arg = args.head;
    1.98 -                    Warner warn = chk.convertWarner(arg.pos(), arg.type, varArg);
    1.99 -                    assertConvertible(arg, arg.type, varArg, warn);
   1.100 -                    warned |= warn.hasNonSilentLint(LintCategory.UNCHECKED);
   1.101 -                    args = args.tail;
   1.102 -                }
   1.103 -            } else if ((sym.flags() & VARARGS) != 0 && allowVarargs) {
   1.104 -                // non-varargs call to varargs method
   1.105 -                Type varParam = owntype.getParameterTypes().last();
   1.106 -                Type lastArg = argtypes.last();
   1.107 -                if (types.isSubtypeUnchecked(lastArg, types.elemtype(varParam)) &&
   1.108 -                    !types.isSameType(types.erasure(varParam), types.erasure(lastArg)))
   1.109 -                    log.warning(argtrees.last().pos(), "inexact.non-varargs.call",
   1.110 -                                types.elemtype(varParam),
   1.111 -                                varParam);
   1.112 -            }
   1.113 -
   1.114 -            if (warned && sym.type.tag == FORALL) {
   1.115 -                chk.warnUnchecked(env.tree.pos(),
   1.116 -                                  "unchecked.meth.invocation.applied",
   1.117 -                                  kindName(sym),
   1.118 -                                  sym.name,
   1.119 -                                  rs.methodArguments(sym.type.getParameterTypes()),
   1.120 -                                  rs.methodArguments(argtypes),
   1.121 -                                  kindName(sym.location()),
   1.122 -                                  sym.location());
   1.123 -                owntype = new MethodType(owntype.getParameterTypes(),
   1.124 -                                         types.erasure(owntype.getReturnType()),
   1.125 -                                         types.erasure(owntype.getThrownTypes()),
   1.126 -                                         syms.methodClass);
   1.127 -            }
   1.128 -            if (useVarargs) {
   1.129 -                JCTree tree = env.tree;
   1.130 -                Type argtype = owntype.getParameterTypes().last();
   1.131 -                if (owntype.getReturnType().tag != FORALL || warned) {
   1.132 -                    chk.checkVararg(env.tree.pos(), owntype.getParameterTypes(), sym);
   1.133 -                }
   1.134 -                Type elemtype = types.elemtype(argtype);
   1.135 -                switch (tree.getTag()) {
   1.136 -                case APPLY:
   1.137 -                    ((JCMethodInvocation) tree).varargsElement = elemtype;
   1.138 -                    break;
   1.139 -                case NEWCLASS:
   1.140 -                    ((JCNewClass) tree).varargsElement = elemtype;
   1.141 -                    break;
   1.142 -                default:
   1.143 -                    throw new AssertionError(""+tree);
   1.144 -                }
   1.145 -            }
   1.146 +            return chk.checkMethod(owntype, sym, env, argtrees, argtypes, useVarargs);
   1.147          }
   1.148 +    }
   1.149 +
   1.150 +    /**
   1.151 +     * Check that constructor arguments conform to its instantiation.
   1.152 +     **/
   1.153 +    public Type checkConstructor(Type site,
   1.154 +                            Symbol sym,
   1.155 +                            Env<AttrContext> env,
   1.156 +                            final List<JCExpression> argtrees,
   1.157 +                            List<Type> argtypes,
   1.158 +                            List<Type> typeargtypes,
   1.159 +                            boolean useVarargs) {
   1.160 +        Type owntype = checkMethod(site, sym, env, argtrees, argtypes, typeargtypes, useVarargs);
   1.161 +        chk.checkType(env.tree.pos(), owntype.getReturnType(), syms.voidType);
   1.162          return owntype;
   1.163      }
   1.164  
   1.165 -    private void assertConvertible(JCTree tree, Type actual, Type formal, Warner warn) {
   1.166 -        if (types.isConvertible(actual, formal, warn))
   1.167 -            return;
   1.168 -
   1.169 -        if (formal.isCompound()
   1.170 -            && types.isSubtype(actual, types.supertype(formal))
   1.171 -            && types.isSubtypeUnchecked(actual, types.interfaces(formal), warn))
   1.172 -            return;
   1.173 -
   1.174 -        if (false) {
   1.175 -            // TODO: make assertConvertible work
   1.176 -            chk.typeError(tree.pos(), diags.fragment("incompatible.types"), actual, formal);
   1.177 -            throw new AssertionError("Tree: " + tree
   1.178 -                                     + " actual:" + actual
   1.179 -                                     + " formal: " + formal);
   1.180 -        }
   1.181 -    }
   1.182 -
   1.183      public void visitLiteral(JCLiteral tree) {
   1.184          result = check(
   1.185              tree, litType(tree.typetag).constType(tree.value), VAL, pkind, pt);
     2.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Tue Mar 06 13:26:36 2012 +0000
     2.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Tue Mar 06 13:28:05 2012 +0000
     2.3 @@ -63,6 +63,7 @@
     2.4  
     2.5      private final Names names;
     2.6      private final Log log;
     2.7 +    private final Resolve rs;
     2.8      private final Symtab syms;
     2.9      private final Enter enter;
    2.10      private final Infer infer;
    2.11 @@ -95,6 +96,7 @@
    2.12  
    2.13          names = Names.instance(context);
    2.14          log = Log.instance(context);
    2.15 +        rs = Resolve.instance(context);
    2.16          syms = Symtab.instance(context);
    2.17          enter = Enter.instance(context);
    2.18          infer = Infer.instance(context);
    2.19 @@ -106,6 +108,7 @@
    2.20  
    2.21          Source source = Source.instance(context);
    2.22          allowGenerics = source.allowGenerics();
    2.23 +        allowVarargs = source.allowVarargs();
    2.24          allowAnnotations = source.allowAnnotations();
    2.25          allowCovariantReturns = source.allowCovariantReturns();
    2.26          allowSimplifiedVarargs = source.allowSimplifiedVarargs();
    2.27 @@ -137,6 +140,10 @@
    2.28       */
    2.29      boolean allowGenerics;
    2.30  
    2.31 +    /** Switch: varargs enabled?
    2.32 +     */
    2.33 +    boolean allowVarargs;
    2.34 +
    2.35      /** Switch: annotations enabled?
    2.36       */
    2.37      boolean allowAnnotations;
    2.38 @@ -743,22 +750,105 @@
    2.39                      (s.flags() & (STATIC | FINAL)) != 0);
    2.40          }
    2.41  
    2.42 -    /**
    2.43 -     * Check that vararg method call is sound
    2.44 -     * @param pos Position to be used for error reporting.
    2.45 -     * @param argtypes Actual arguments supplied to vararg method.
    2.46 -     */
    2.47 -    void checkVararg(DiagnosticPosition pos, List<Type> argtypes, Symbol msym) {
    2.48 -        Type argtype = argtypes.last();
    2.49 -        if (!types.isReifiable(argtype) &&
    2.50 -                (!allowSimplifiedVarargs ||
    2.51 -                msym.attribute(syms.trustMeType.tsym) == null ||
    2.52 -                !isTrustMeAllowedOnMethod(msym))) {
    2.53 -            warnUnchecked(pos,
    2.54 -                              "unchecked.generic.array.creation",
    2.55 -                              argtype);
    2.56 +    Type checkMethod(Type owntype,
    2.57 +                            Symbol sym,
    2.58 +                            Env<AttrContext> env,
    2.59 +                            final List<JCExpression> argtrees,
    2.60 +                            List<Type> argtypes,
    2.61 +                            boolean useVarargs) {
    2.62 +        boolean warned = false;
    2.63 +        // System.out.println("call   : " + env.tree);
    2.64 +        // System.out.println("method : " + owntype);
    2.65 +        // System.out.println("actuals: " + argtypes);
    2.66 +        List<Type> formals = owntype.getParameterTypes();
    2.67 +        Type last = useVarargs ? formals.last() : null;
    2.68 +        if (sym.name==names.init &&
    2.69 +                sym.owner == syms.enumSym)
    2.70 +                formals = formals.tail.tail;
    2.71 +        List<JCExpression> args = argtrees;
    2.72 +        while (formals.head != last) {
    2.73 +            JCTree arg = args.head;
    2.74 +            Warner warn = convertWarner(arg.pos(), arg.type, formals.head);
    2.75 +            assertConvertible(arg, arg.type, formals.head, warn);
    2.76 +            warned |= warn.hasNonSilentLint(LintCategory.UNCHECKED);
    2.77 +            args = args.tail;
    2.78 +            formals = formals.tail;
    2.79          }
    2.80 +        if (useVarargs) {
    2.81 +            Type varArg = types.elemtype(last);
    2.82 +            while (args.tail != null) {
    2.83 +                JCTree arg = args.head;
    2.84 +                Warner warn = convertWarner(arg.pos(), arg.type, varArg);
    2.85 +                assertConvertible(arg, arg.type, varArg, warn);
    2.86 +                warned |= warn.hasNonSilentLint(LintCategory.UNCHECKED);
    2.87 +                args = args.tail;
    2.88 +            }
    2.89 +        } else if ((sym.flags() & VARARGS) != 0 && allowVarargs) {
    2.90 +            // non-varargs call to varargs method
    2.91 +            Type varParam = owntype.getParameterTypes().last();
    2.92 +            Type lastArg = argtypes.last();
    2.93 +            if (types.isSubtypeUnchecked(lastArg, types.elemtype(varParam)) &&
    2.94 +                    !types.isSameType(types.erasure(varParam), types.erasure(lastArg)))
    2.95 +                log.warning(argtrees.last().pos(), "inexact.non-varargs.call",
    2.96 +                        types.elemtype(varParam), varParam);
    2.97 +        }
    2.98 +        if (warned) {
    2.99 +            warnUnchecked(env.tree.pos(),
   2.100 +                    "unchecked.meth.invocation.applied",
   2.101 +                    kindName(sym),
   2.102 +                    sym.name,
   2.103 +                    rs.methodArguments(sym.type.getParameterTypes()),
   2.104 +                    rs.methodArguments(argtypes),
   2.105 +                    kindName(sym.location()),
   2.106 +                    sym.location());
   2.107 +           owntype = new MethodType(owntype.getParameterTypes(),
   2.108 +                   types.erasure(owntype.getReturnType()),
   2.109 +                   types.erasure(owntype.getThrownTypes()),
   2.110 +                   syms.methodClass);
   2.111 +        }
   2.112 +        if (useVarargs) {
   2.113 +            JCTree tree = env.tree;
   2.114 +            Type argtype = owntype.getParameterTypes().last();
   2.115 +            if (!types.isReifiable(argtype) &&
   2.116 +                    (!allowSimplifiedVarargs ||
   2.117 +                    sym.attribute(syms.trustMeType.tsym) == null ||
   2.118 +                    !isTrustMeAllowedOnMethod(sym))) {
   2.119 +                warnUnchecked(env.tree.pos(),
   2.120 +                                  "unchecked.generic.array.creation",
   2.121 +                                  argtype);
   2.122 +            }
   2.123 +            Type elemtype = types.elemtype(argtype);
   2.124 +            switch (tree.getTag()) {
   2.125 +                case APPLY:
   2.126 +                    ((JCMethodInvocation) tree).varargsElement = elemtype;
   2.127 +                    break;
   2.128 +                case NEWCLASS:
   2.129 +                    ((JCNewClass) tree).varargsElement = elemtype;
   2.130 +                    break;
   2.131 +                default:
   2.132 +                    throw new AssertionError(""+tree);
   2.133 +            }
   2.134 +         }
   2.135 +         return owntype;
   2.136      }
   2.137 +    //where
   2.138 +        private void assertConvertible(JCTree tree, Type actual, Type formal, Warner warn) {
   2.139 +            if (types.isConvertible(actual, formal, warn))
   2.140 +                return;
   2.141 +
   2.142 +            if (formal.isCompound()
   2.143 +                && types.isSubtype(actual, types.supertype(formal))
   2.144 +                && types.isSubtypeUnchecked(actual, types.interfaces(formal), warn))
   2.145 +                return;
   2.146 +
   2.147 +            if (false) {
   2.148 +                // TODO: make assertConvertible work
   2.149 +                typeError(tree.pos(), diags.fragment("incompatible.types"), actual, formal);
   2.150 +                throw new AssertionError("Tree: " + tree
   2.151 +                                         + " actual:" + actual
   2.152 +                                         + " formal: " + formal);
   2.153 +            }
   2.154 +        }
   2.155  
   2.156      /**
   2.157       * Check that type 't' is a valid instantiation of a generic class
     3.1 --- a/src/share/classes/com/sun/tools/javac/comp/Infer.java	Tue Mar 06 13:26:36 2012 +0000
     3.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java	Tue Mar 06 13:28:05 2012 +0000
     3.3 @@ -445,16 +445,19 @@
     3.4                      return List.nil();
     3.5                  }
     3.6                  @Override
     3.7 -                void check(List<Type> inferred, Types types) throws NoInstanceException {
     3.8 +                void instantiateReturnType(Type restype, List<Type> inferred, Types types) throws NoInstanceException {
     3.9 +                    Type owntype = new MethodType(types.subst(getParameterTypes(), tvars, inferred),
    3.10 +                                       restype,
    3.11 +                                       types.subst(getThrownTypes(), tvars, inferred),
    3.12 +                                       qtype.tsym);
    3.13                      // check that actuals conform to inferred formals
    3.14 -                    checkArgumentsAcceptable(env, capturedArgs, getParameterTypes(), allowBoxing, useVarargs, warn);
    3.15 +                    checkArgumentsAcceptable(env, capturedArgs, owntype.getParameterTypes(), allowBoxing, useVarargs, warn);
    3.16                      // check that inferred bounds conform to their bounds
    3.17                      checkWithinBounds(all_tvars,
    3.18                             types.subst(inferredTypes, tvars, inferred), warn);
    3.19 -                    if (useVarargs) {
    3.20 -                        chk.checkVararg(env.tree.pos(), getParameterTypes(), msym);
    3.21 -                    }
    3.22 -            }};
    3.23 +                    qtype = chk.checkMethod(owntype, msym, env, TreeInfo.args(env.tree), capturedArgs, useVarargs);
    3.24 +                }
    3.25 +            };
    3.26          }
    3.27          else {
    3.28              // check that actuals conform to inferred formals
    3.29 @@ -520,16 +523,7 @@
    3.30                  return qtype.map(f);
    3.31              }
    3.32  
    3.33 -            void instantiateReturnType(Type restype, List<Type> inferred, Types types) throws NoInstanceException {
    3.34 -                //update method type with newly inferred type-arguments
    3.35 -                qtype = new MethodType(types.subst(getParameterTypes(), tvars, inferred),
    3.36 -                                       restype,
    3.37 -                                       types.subst(UninferredMethodType.this.getThrownTypes(), tvars, inferred),
    3.38 -                                       UninferredMethodType.this.qtype.tsym);
    3.39 -                check(inferred, types);
    3.40 -            }
    3.41 -
    3.42 -            abstract void check(List<Type> inferred, Types types) throws NoInstanceException;
    3.43 +            abstract void instantiateReturnType(Type restype, List<Type> inferred, Types types);
    3.44  
    3.45              abstract List<Type> getConstraints(TypeVar tv, ConstraintKind ck);
    3.46  
    3.47 @@ -544,7 +538,7 @@
    3.48                      if (rs.verboseResolutionMode.contains(VerboseResolutionMode.DEFERRED_INST)) {
    3.49                          log.note(pos, "deferred.method.inst", msym, UninferredMethodType.this.qtype, newRestype);
    3.50                      }
    3.51 -                    return newRestype;
    3.52 +                    return UninferredMethodType.this.qtype.getReturnType();
    3.53                  }
    3.54                  @Override
    3.55                  public List<Type> getConstraints(TypeVar tv, ConstraintKind ck) {
     4.1 --- a/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Tue Mar 06 13:26:36 2012 +0000
     4.2 +++ b/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Tue Mar 06 13:28:05 2012 +0000
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -102,6 +102,16 @@
    4.11          setOpname(MOD, "%", names);
    4.12      }
    4.13  
    4.14 +    public static List<JCExpression> args(JCTree t) {
    4.15 +        switch (t.getTag()) {
    4.16 +            case APPLY:
    4.17 +                return ((JCMethodInvocation)t).args;
    4.18 +            case NEWCLASS:
    4.19 +                return ((JCNewClass)t).args;
    4.20 +            default:
    4.21 +                return null;
    4.22 +        }
    4.23 +    }
    4.24  
    4.25      /** Return name of operator with given tree tag.
    4.26       */
     5.1 --- a/test/tools/javac/6758789/T6758789b.out	Tue Mar 06 13:26:36 2012 +0000
     5.2 +++ b/test/tools/javac/6758789/T6758789b.out	Tue Mar 06 13:28:05 2012 +0000
     5.3 @@ -1,4 +1,4 @@
     5.4 -T6758789b.java:16:11: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T6758789a.Foo, T6758789a.Foo<X>
     5.5 +T6758789b.java:16:11: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T6758789a.Foo, T6758789a.Foo<java.lang.Object>
     5.6  T6758789b.java:16:10: compiler.warn.unchecked.meth.invocation.applied: kindname.method, m, T6758789a.Foo<X>, T6758789a.Foo, kindname.class, T6758789a
     5.7  - compiler.err.warnings.and.werror
     5.8  1 error
     6.1 --- a/test/tools/javac/generics/6723444/T6723444.out	Tue Mar 06 13:26:36 2012 +0000
     6.2 +++ b/test/tools/javac/generics/6723444/T6723444.out	Tue Mar 06 13:28:05 2012 +0000
     6.3 @@ -1,5 +1,5 @@
     6.4 -T6723444.java:42:9: compiler.err.unreported.exception.need.to.catch.or.throw: X2
     6.5 -T6723444.java:43:9: compiler.err.unreported.exception.need.to.catch.or.throw: X2
     6.6 +T6723444.java:42:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
     6.7 +T6723444.java:43:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
     6.8  T6723444.java:45:32: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
     6.9  T6723444.java:46:17: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
    6.10  T6723444.java:48:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
     7.1 --- a/test/tools/javac/generics/7015430/T7015430.out	Tue Mar 06 13:26:36 2012 +0000
     7.2 +++ b/test/tools/javac/generics/7015430/T7015430.out	Tue Mar 06 13:28:05 2012 +0000
     7.3 @@ -1,14 +1,14 @@
     7.4 -T7015430.java:41:15: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<E>
     7.5 +T7015430.java:41:15: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.Exception>
     7.6  T7015430.java:41:14: compiler.warn.unchecked.meth.invocation.applied: kindname.method, empty, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
     7.7  T7015430.java:50:42: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.RuntimeException>
     7.8  T7015430.java:50:41: compiler.warn.unchecked.meth.invocation.applied: kindname.method, empty, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
     7.9 -T7015430.java:68:22: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<E>
    7.10 +T7015430.java:68:22: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.Exception>
    7.11  T7015430.java:68:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
    7.12  T7015430.java:77:40: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.RuntimeException>
    7.13  T7015430.java:77:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
    7.14  T7015430.java:104:41: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.RuntimeException>
    7.15  T7015430.java:104:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
    7.16 -T7015430.java:113:22: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<E>
    7.17 +T7015430.java:113:22: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.Exception>
    7.18  T7015430.java:113:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
    7.19  T7015430.java:41:14: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Exception
    7.20  T7015430.java:68:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Exception

mercurial