changeset 3022:96860a11b681

Merge
author mchung
date Thu, 07 May 2015 16:02:41 -0700
parents e9f1b12add92 67ae665c791e
children 2b0e084f0e6d d2f2ff124988
files src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java src/jdk.dev/share/classes/com/sun/tools/jdeps/Profile.java
diffstat 111 files changed, 1952 insertions(+), 282 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue May 05 11:04:37 2015 -0300
+++ b/.hgtags	Thu May 07 16:02:41 2015 -0700
@@ -303,3 +303,5 @@
 07ce89fec30165a2f1212047bd23b30086ed1e74 jdk9-b58
 a598534d277e170a0bbf177bd54d9d179245532b jdk9-b59
 81bdc4545337c404bb87373838c983584a49afd6 jdk9-b60
+0eb91327db5a840779cc5c35b9b858d6ef7959d1 jdk9-b61
+40058141a4ec04a3d4cacdb693ad188a5ddf48ed jdk9-b62
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java	Thu May 07 16:02:41 2015 -0700
@@ -131,7 +131,7 @@
      *  the completer to be used for ".java" files. If this remains unassigned
      *  ".java" files will not be loaded.
      */
-    public Completer sourceCompleter = null;
+    public Completer sourceCompleter = Completer.NULL_COMPLETER;
 
     /** The path name of the class file currently being read.
      */
@@ -344,7 +344,7 @@
                     reader.readClassFile(c);
                     c.flags_field |= getSupplementaryFlags(c);
                 } else {
-                    if (sourceCompleter != null) {
+                    if (!sourceCompleter.isTerminal()) {
                         sourceCompleter.complete(c);
                     } else {
                         throw new IllegalStateException("Source completer required to read "
@@ -395,7 +395,7 @@
     public ClassSymbol loadClass(Name flatname) throws CompletionFailure {
         boolean absent = syms.classes.get(flatname) == null;
         ClassSymbol c = syms.enterClass(flatname);
-        if (c.members_field == null && c.completer != null) {
+        if (c.members_field == null) {
             try {
                 c.complete();
             } catch (CompletionFailure ex) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Thu May 07 16:02:41 2015 -0700
@@ -102,6 +102,7 @@
     public Symbol owner;
 
     /** The completer of this symbol.
+     * This should never equal null (NULL_COMPLETER should be used instead).
      */
     public Completer completer;
 
@@ -199,6 +200,10 @@
         return (metadata != null && !metadata.isTypesEmpty());
     }
 
+    public boolean isCompleted() {
+        return completer.isTerminal();
+    }
+
     public void prependAttributes(List<Attribute.Compound> l) {
         if (l.nonEmpty()) {
             initedMetadata().prepend(l);
@@ -249,7 +254,7 @@
         this.flags_field = flags;
         this.type = type;
         this.owner = owner;
-        this.completer = null;
+        this.completer = Completer.NULL_COMPLETER;
         this.erasure_field = null;
         this.name = name;
     }
@@ -574,9 +579,9 @@
     /** Complete the elaboration of this symbol's definition.
      */
     public void complete() throws CompletionFailure {
-        if (completer != null) {
+        if (completer != Completer.NULL_COMPLETER) {
             Completer c = completer;
-            completer = null;
+            completer = Completer.NULL_COMPLETER;
             c.complete(this);
         }
     }
@@ -941,19 +946,19 @@
         }
 
         public WriteableScope members() {
-            if (completer != null) complete();
+            complete();
             return members_field;
         }
 
         public long flags() {
-            if (completer != null) complete();
+            complete();
             return flags_field;
         }
 
         @Override
         public List<Attribute.Compound> getRawAttributes() {
-            if (completer != null) complete();
-            if (package_info != null && package_info.completer != null) {
+            complete();
+            if (package_info != null) {
                 package_info.complete();
                 mergeAttributes();
             }
@@ -1075,24 +1080,24 @@
         }
 
         public long flags() {
-            if (completer != null) complete();
+            complete();
             return flags_field;
         }
 
         public WriteableScope members() {
-            if (completer != null) complete();
+            complete();
             return members_field;
         }
 
         @Override
         public List<Attribute.Compound> getRawAttributes() {
-            if (completer != null) complete();
+            complete();
             return super.getRawAttributes();
         }
 
         @Override
         public List<Attribute.TypeCompound> getRawTypeAttributes() {
-            if (completer != null) complete();
+            complete();
             return super.getRawTypeAttributes();
         }
 
@@ -1857,7 +1862,29 @@
     /** Symbol completer interface.
      */
     public static interface Completer {
+
+        /** Dummy completer to be used when the symbol has been completed or
+         * does not need completion.
+         */
+        public final static Completer NULL_COMPLETER = new Completer() {
+            public void complete(Symbol sym) { }
+            public boolean isTerminal() { return true; }
+        };
+
         void complete(Symbol sym) throws CompletionFailure;
+
+        /** Returns true if this completer is <em>terminal</em>. A terminal
+         * completer is used as a place holder when the symbol is completed.
+         * Calling complete on a terminal completer will not affect the symbol.
+         *
+         * The dummy NULL_COMPLETER and the GraphDependencies completer are
+         * examples of terminal completers.
+         *
+         * @return true iff this completer is terminal
+         */
+        default boolean isTerminal() {
+            return false;
+        }
     }
 
     public static class CompletionFailure extends RuntimeException {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Thu May 07 16:02:41 2015 -0700
@@ -276,51 +276,56 @@
 
     public void synthesizeEmptyInterfaceIfMissing(final Type type) {
         final Completer completer = type.tsym.completer;
-        if (completer != null) {
-            type.tsym.completer = new Completer() {
-                @Override
-                public void complete(Symbol sym) throws CompletionFailure {
-                    try {
-                        completer.complete(sym);
-                    } catch (CompletionFailure e) {
-                        sym.flags_field |= (PUBLIC | INTERFACE);
-                        ((ClassType) sym.type).supertype_field = objectType;
-                    }
+        type.tsym.completer = new Completer() {
+            @Override
+            public void complete(Symbol sym) throws CompletionFailure {
+                try {
+                    completer.complete(sym);
+                } catch (CompletionFailure e) {
+                    sym.flags_field |= (PUBLIC | INTERFACE);
+                    ((ClassType) sym.type).supertype_field = objectType;
                 }
-            };
-        }
+            }
+
+            @Override
+            public boolean isTerminal() {
+                return completer.isTerminal();
+            }
+        };
     }
 
     public void synthesizeBoxTypeIfMissing(final Type type) {
         ClassSymbol sym = enterClass(javaBase, boxedName[type.getTag().ordinal()]);
         final Completer completer = sym.completer;
-        if (completer != null) {
-            sym.completer = new Completer() {
-                @Override
-                public void complete(Symbol sym) throws CompletionFailure {
-                    try {
-                        completer.complete(sym);
-                    } catch (CompletionFailure e) {
-                        sym.flags_field |= PUBLIC;
-                        ((ClassType) sym.type).supertype_field = objectType;
-                        MethodSymbol boxMethod =
-                            new MethodSymbol(PUBLIC | STATIC, names.valueOf,
-                                             new MethodType(List.of(type), sym.type,
-                                    List.<Type>nil(), methodClass),
-                                sym);
-                        sym.members().enter(boxMethod);
-                        MethodSymbol unboxMethod =
-                            new MethodSymbol(PUBLIC,
-                                type.tsym.name.append(names.Value), // x.intValue()
-                                new MethodType(List.<Type>nil(), type,
-                                    List.<Type>nil(), methodClass),
-                                sym);
-                        sym.members().enter(unboxMethod);
-                    }
+        sym.completer = new Completer() {
+            @Override
+            public void complete(Symbol sym) throws CompletionFailure {
+                try {
+                    completer.complete(sym);
+                } catch (CompletionFailure e) {
+                    sym.flags_field |= PUBLIC;
+                    ((ClassType) sym.type).supertype_field = objectType;
+                    MethodSymbol boxMethod =
+                        new MethodSymbol(PUBLIC | STATIC, names.valueOf,
+                                         new MethodType(List.of(type), sym.type,
+                                List.<Type>nil(), methodClass),
+                            sym);
+                    sym.members().enter(boxMethod);
+                    MethodSymbol unboxMethod =
+                        new MethodSymbol(PUBLIC,
+                            type.tsym.name.append(names.Value), // x.intValue()
+                            new MethodType(List.<Type>nil(), type,
+                                List.<Type>nil(), methodClass),
+                            sym);
+                    sym.members().enter(unboxMethod);
                 }
-            };
-        }
+            }
 
+            @Override
+            public boolean isTerminal() {
+                return completer.isTerminal();
+            }
+        };
     }
 
     // Enter a synthetic class that is used to mark classes in ct.sym.
@@ -328,7 +333,7 @@
     private Type enterSyntheticAnnotation(String name) {
         ClassType type = (ClassType)enterClass(name);
         ClassSymbol sym = (ClassSymbol)type.tsym;
-        sym.completer = null;
+        sym.completer = Completer.NULL_COMPLETER;
         sym.flags_field = PUBLIC|ACYCLIC|ANNOTATION|INTERFACE;
         sym.erasure_field = type;
         sym.members_field = WriteableScope.create(sym);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Thu May 07 16:02:41 2015 -0700
@@ -580,12 +580,10 @@
     }
 
     public boolean isCompound() {
-        return tsym.completer == null
-            // Compound types can't have a completer.  Calling
-            // flags() will complete the symbol causing the
-            // compiler to load classes unnecessarily.  This led
-            // to regression 6180021.
-            && (tsym.flags() & COMPOUND) != 0;
+        // Compound types can't have a (non-terminal) completer.  Calling
+        // flags() will complete the symbol causing the compiler to load
+        // classes unnecessarily.  This led to regression 6180021.
+        return tsym.isCompleted() && (tsym.flags() & COMPOUND) != 0;
     }
 
     public boolean isIntersection() {
@@ -1124,7 +1122,7 @@
         }
 
         public void complete() {
-            if (tsym.completer != null) tsym.complete();
+            tsym.complete();
         }
 
         @DefinedBy(Api.LANGUAGE_MODEL)
@@ -1212,7 +1210,7 @@
             Assert.check((csym.flags() & COMPOUND) != 0);
             supertype_field = bounds.head;
             interfaces_field = bounds.tail;
-            Assert.check(supertype_field.tsym.completer != null ||
+            Assert.check(!supertype_field.tsym.isCompleted() ||
                     !supertype_field.isInterface(), supertype_field);
         }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Thu May 07 16:02:41 2015 -0700
@@ -28,11 +28,11 @@
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
 import javax.lang.model.type.TypeKind;
-
 import javax.tools.JavaFileObject;
 
 import com.sun.tools.javac.code.Attribute.Array;
 import com.sun.tools.javac.code.Attribute.TypeCompound;
+import com.sun.tools.javac.code.Symbol.TypeSymbol;
 import com.sun.tools.javac.code.Type.ArrayType;
 import com.sun.tools.javac.code.Type.CapturedType;
 import com.sun.tools.javac.code.Type.ClassType;
@@ -154,8 +154,8 @@
 
     public enum AnnotationType { DECLARATION, TYPE, NONE, BOTH }
 
-    public List<Attribute> annotationTargets(Attribute.Compound anno) {
-        Attribute.Compound atTarget = anno.type.tsym.getAnnotationTypeMetadata().getTarget();
+    public List<Attribute> annotationTargets(TypeSymbol tsym) {
+        Attribute.Compound atTarget = tsym.getAnnotationTypeMetadata().getTarget();
         if (atTarget == null) {
             return null;
         }
@@ -178,7 +178,7 @@
      * a type annotation, or both.
      */
     public AnnotationType annotationTargetType(Attribute.Compound a, Symbol s) {
-        List<Attribute> targets = annotationTargets(a);
+        List<Attribute> targets = annotationTargets(a.type.tsym);
         return (targets == null) ?
                 AnnotationType.DECLARATION :
                 targets.stream()
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Thu May 07 16:02:41 2015 -0700
@@ -645,7 +645,7 @@
         Symbol descSym = findDescriptorSymbol(targets.head.tsym);
         Type descType = findDescriptorType(targets.head);
         ClassSymbol csym = new ClassSymbol(cflags, name, env.enclClass.sym.outermostClass());
-        csym.completer = null;
+        csym.completer = Completer.NULL_COMPLETER;
         csym.members_field = WriteableScope.create(csym);
         MethodSymbol instDescSym = new MethodSymbol(descSym.flags(), descSym.name, descType, csym);
         csym.members_field.enter(instDescSym);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java	Thu May 07 16:02:41 2015 -0700
@@ -226,8 +226,18 @@
         @Override
         void process(JCNewClass oldTree, JCNewClass newTree, boolean hasErrors) {
             if (!hasErrors) {
-                List<Type> inferredArgs = newTree.type.getTypeArguments();
-                List<Type> explicitArgs = oldTree.type.getTypeArguments();
+                List<Type> inferredArgs, explicitArgs;
+                if (oldTree.def != null) {
+                    inferredArgs = newTree.def.implementing.nonEmpty()
+                                      ? newTree.def.implementing.get(0).type.getTypeArguments()
+                                      : newTree.def.extending.type.getTypeArguments();
+                    explicitArgs = oldTree.def.implementing.nonEmpty()
+                                      ? oldTree.def.implementing.get(0).type.getTypeArguments()
+                                      : oldTree.def.extending.type.getTypeArguments();
+                } else {
+                    inferredArgs = newTree.type.getTypeArguments();
+                    explicitArgs = oldTree.type.getTypeArguments();
+                }
                 for (Type t : inferredArgs) {
                     if (!types.isSameType(t, explicitArgs.head)) {
                         log.warning(oldTree.clazz, "diamond.redundant.args.1",
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu May 07 16:02:41 2015 -0700
@@ -243,7 +243,10 @@
                         log.error(annotations.head.pos, "already.annotated", Kinds.kindName(s), s);
 
                     Assert.checkNonNull(s, "Symbol argument to actualEnterAnnotations is null");
-                    annotateNow(s, annotations, localEnv, false);
+
+                    // false is passed as fifth parameter since annotateLater is
+                    // never called for a type parameter
+                    annotateNow(s, annotations, localEnv, false, false);
                 } finally {
                     if (prevLint != null)
                         chk.setLint(prevLint);
@@ -327,7 +330,8 @@
      * then continue on with repeating annotations processing.
      */
     private <T extends Attribute.Compound> void annotateNow(Symbol toAnnotate,
-            List<JCAnnotation> withAnnotations, Env<AttrContext> env, boolean typeAnnotations)
+            List<JCAnnotation> withAnnotations, Env<AttrContext> env, boolean typeAnnotations,
+            boolean isTypeParam)
     {
         Map<TypeSymbol, ListBuffer<T>> annotated = new LinkedHashMap<>();
         Map<T, DiagnosticPosition> pos = new HashMap<>();
@@ -377,7 +381,7 @@
                 buf = buf.prepend(lb.first());
             } else {
                 AnnotationContext<T> ctx = new AnnotationContext<>(env, annotated, pos, typeAnnotations);
-                T res = makeContainerAnnotation(lb.toList(), ctx, toAnnotate);
+                T res = makeContainerAnnotation(lb.toList(), ctx, toAnnotate, isTypeParam);
                 if (res != null)
                     buf = buf.prepend(res);
             }
@@ -698,7 +702,7 @@
      * annotation are invalid.  This method reports errors/warnings.
      */
     private <T extends Attribute.Compound> T processRepeatedAnnotations(List<T> annotations,
-            AnnotationContext<T> ctx, Symbol on)
+            AnnotationContext<T> ctx, Symbol on, boolean isTypeParam)
     {
         T firstOccurrence = annotations.head;
         List<Attribute> repeated = List.nil();
@@ -752,7 +756,8 @@
 
         if (!repeated.isEmpty()) {
             repeated = repeated.reverse();
-            TreeMaker m = make.at(ctx.pos.get(firstOccurrence));
+            DiagnosticPosition pos = ctx.pos.get(firstOccurrence);
+            TreeMaker m = make.at(pos);
             Pair<MethodSymbol, Attribute> p =
                     new Pair<MethodSymbol, Attribute>(containerValueSymbol,
                             new Attribute.Array(arrayOfOrigAnnoType, repeated));
@@ -768,7 +773,14 @@
                 Attribute.TypeCompound at = new Attribute.TypeCompound(targetContainerType, List.of(p),
                         ((Attribute.TypeCompound)annotations.head).position);
 
-                // TODO: annotation applicability checks from below?
+                JCAnnotation annoTree = m.TypeAnnotation(at);
+                if (!chk.validateAnnotationDeferErrors(annoTree))
+                    log.error(annoTree.pos(), Errors.DuplicateAnnotationInvalidRepeated(origAnnoType));
+
+                if (!chk.isTypeAnnotation(annoTree, isTypeParam)) {
+                    log.error(pos, isTypeParam ? Errors.InvalidRepeatableAnnotationNotApplicable(targetContainerType, on)
+                                               : Errors.InvalidRepeatableAnnotationNotApplicableInContext(targetContainerType));
+                }
 
                 at.setSynthesized(true);
 
@@ -925,11 +937,11 @@
     }
 
     private <T extends Attribute.Compound> T makeContainerAnnotation(List<T> toBeReplaced,
-            AnnotationContext<T> ctx, Symbol sym)
+            AnnotationContext<T> ctx, Symbol sym, boolean isTypeParam)
     {
         // Process repeated annotations
         T validRepeated =
-                processRepeatedAnnotations(toBeReplaced, ctx, sym);
+                processRepeatedAnnotations(toBeReplaced, ctx, sym, isTypeParam);
 
         if (validRepeated != null) {
             // Check that the container isn't manually
@@ -955,7 +967,7 @@
      * Attribute the list of annotations and enter them onto s.
      */
     public void enterTypeAnnotations(List<JCAnnotation> annotations, Env<AttrContext> env,
-            Symbol s, DiagnosticPosition deferPos)
+            Symbol s, DiagnosticPosition deferPos, boolean isTypeParam)
     {
         Assert.checkNonNull(s, "Symbol argument to actualEnterTypeAnnotations is nul/");
         JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
@@ -965,7 +977,7 @@
             prevLintPos = deferredLintHandler.setPos(deferPos);
         }
         try {
-            annotateNow(s, annotations, env, true);
+            annotateNow(s, annotations, env, true, isTypeParam);
         } finally {
             if (prevLintPos != null)
                 deferredLintHandler.setPos(prevLintPos);
@@ -1048,21 +1060,21 @@
 
         @Override
         public void visitAnnotatedType(JCAnnotatedType tree) {
-            enterTypeAnnotations(tree.annotations, env, sym, deferPos);
+            enterTypeAnnotations(tree.annotations, env, sym, deferPos, false);
             scan(tree.underlyingType);
         }
 
         @Override
         public void visitTypeParameter(JCTypeParameter tree) {
-            enterTypeAnnotations(tree.annotations, env, sym, deferPos);
+            enterTypeAnnotations(tree.annotations, env, sym, deferPos, true);
             scan(tree.bounds);
         }
 
         @Override
         public void visitNewArray(JCNewArray tree) {
-            enterTypeAnnotations(tree.annotations, env, sym, deferPos);
+            enterTypeAnnotations(tree.annotations, env, sym, deferPos, false);
             for (List<JCAnnotation> dimAnnos : tree.dimAnnotations)
-                enterTypeAnnotations(dimAnnos, env, sym, deferPos);
+                enterTypeAnnotations(dimAnnos, env, sym, deferPos, false);
             scan(tree.elemtype);
             scan(tree.elems);
         }
@@ -1241,7 +1253,7 @@
 
         private void init() {
             // Make sure metaDataFor is member entered
-            while (metaDataFor.completer != null)
+            while (!metaDataFor.isCompleted())
                 metaDataFor.complete();
 
             if (annotationTypeCompleter != null) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Thu May 07 16:02:41 2015 -0700
@@ -167,8 +167,6 @@
         unknownTypeInfo = new ResultInfo(KindSelector.TYP, Type.noType);
         unknownTypeExprInfo = new ResultInfo(KindSelector.VAL_TYP, Type.noType);
         recoveryInfo = new RecoveryInfo(deferredAttr.emptyDeferredAttrContext);
-
-        noCheckTree = make.at(-1).Skip();
     }
 
     /** Switch: relax some constraints for retrofit mode.
@@ -227,26 +225,6 @@
                final Type found,
                final KindSelector ownkind,
                final ResultInfo resultInfo) {
-        return check(tree, found, ownkind, resultInfo, true);
-    }
-    /** Check kind and type of given tree against protokind and prototype.
-     *  If check succeeds, store type in tree and return it.
-     *  If check fails, store errType in tree and return it.
-     *  No checks are performed if the prototype is a method type.
-     *  It is not necessary in this case since we know that kind and type
-     *  are correct.
-     *
-     *  @param tree     The tree whose kind and type is checked
-     *  @param found    The computed type of the tree
-     *  @param ownkind  The computed kind of the tree
-     *  @param resultInfo  The expected result of the tree
-     *  @param recheckPostInference If true and inference is underway, arrange to recheck the tree after inference finishes.
-     */
-    Type check(final JCTree tree,
-               final Type found,
-               final KindSelector ownkind,
-               final ResultInfo resultInfo,
-               boolean recheckPostInference) {
         InferenceContext inferenceContext = resultInfo.checkContext.inferenceContext();
         Type owntype;
         boolean shouldCheck = !found.hasTag(ERROR) &&
@@ -261,12 +239,12 @@
             //delay the check if there are inference variables in the found type
             //this means we are dealing with a partially inferred poly expression
             owntype = shouldCheck ? resultInfo.pt : found;
-            if (recheckPostInference) {
+            if (resultInfo.checkMode.installPostInferenceHook()) {
                 inferenceContext.addFreeTypeListener(List.of(found, resultInfo.pt),
                         instantiatedContext -> {
                             ResultInfo pendingResult =
                                     resultInfo.dup(inferenceContext.asInstType(resultInfo.pt));
-                            check(tree, inferenceContext.asInstType(found), ownkind, pendingResult, false);
+                            check(tree, inferenceContext.asInstType(found), ownkind, pendingResult);
                         });
             }
         } else {
@@ -274,7 +252,7 @@
             resultInfo.check(tree, found) :
             found;
         }
-        if (tree != noCheckTree) {
+        if (resultInfo.checkMode.updateTreeType()) {
             tree.type = owntype;
         }
         return owntype;
@@ -457,20 +435,60 @@
         }
     }
 
+    /**
+     * Mode controlling behavior of Attr.Check
+     */
+    enum CheckMode {
+
+        NORMAL,
+
+        NO_TREE_UPDATE {     // Mode signalling 'fake check' - skip tree update
+            @Override
+            public boolean updateTreeType() {
+                return false;
+            }
+        },
+        NO_INFERENCE_HOOK { // Mode signalling that caller will manage free types in tree decorations.
+            @Override
+            public boolean installPostInferenceHook() {
+                return false;
+            }
+        };
+
+        public boolean updateTreeType() {
+            return true;
+        }
+        public boolean installPostInferenceHook() {
+            return true;
+        }
+    }
+
+
     class ResultInfo {
         final KindSelector pkind;
         final Type pt;
         final CheckContext checkContext;
+        final CheckMode checkMode;
 
         ResultInfo(KindSelector pkind, Type pt) {
-            this(pkind, pt, chk.basicHandler);
+            this(pkind, pt, chk.basicHandler, CheckMode.NORMAL);
+        }
+
+        ResultInfo(KindSelector pkind, Type pt, CheckMode checkMode) {
+            this(pkind, pt, chk.basicHandler, checkMode);
         }
 
         protected ResultInfo(KindSelector pkind,
                              Type pt, CheckContext checkContext) {
+            this(pkind, pt, checkContext, CheckMode.NORMAL);
+        }
+
+        protected ResultInfo(KindSelector pkind,
+                             Type pt, CheckContext checkContext, CheckMode checkMode) {
             this.pkind = pkind;
             this.pt = pt;
             this.checkContext = checkContext;
+            this.checkMode = checkMode;
         }
 
         protected Type check(final DiagnosticPosition pos, final Type found) {
@@ -478,15 +496,23 @@
         }
 
         protected ResultInfo dup(Type newPt) {
-            return new ResultInfo(pkind, newPt, checkContext);
+            return new ResultInfo(pkind, newPt, checkContext, checkMode);
         }
 
         protected ResultInfo dup(CheckContext newContext) {
-            return new ResultInfo(pkind, pt, newContext);
+            return new ResultInfo(pkind, pt, newContext, checkMode);
         }
 
         protected ResultInfo dup(Type newPt, CheckContext newContext) {
-            return new ResultInfo(pkind, newPt, newContext);
+            return new ResultInfo(pkind, newPt, newContext, checkMode);
+        }
+
+        protected ResultInfo dup(Type newPt, CheckContext newContext, CheckMode newMode) {
+            return new ResultInfo(pkind, newPt, newContext, newMode);
+        }
+
+        protected ResultInfo dup(CheckMode newMode) {
+            return new ResultInfo(pkind, pt, checkContext, newMode);
         }
 
         @Override
@@ -552,10 +578,6 @@
      */
     Type result;
 
-    /** Synthetic tree to be used during 'fake' checks.
-     */
-    JCTree noCheckTree;
-
     /** Visitor method: attribute a tree, catching any completion failure
      *  exceptions. Return the tree's type.
      *
@@ -2057,9 +2079,9 @@
                         enclosingContext.report(tree.clazz,
                                 diags.fragment("cant.apply.diamond.1", diags.fragment("diamond", csym), details));
                     }
-                });
+                }, CheckMode.NO_TREE_UPDATE);
                 Type constructorType = tree.constructorType = types.createErrorType(clazztype);
-                constructorType = checkId(noCheckTree, site,
+                constructorType = checkId(tree, site,
                         constructor,
                         diamondEnv,
                         diamondResult);
@@ -2085,11 +2107,11 @@
                 tree.constructor = rs.resolveConstructor(
                     tree.pos(), rsEnv, clazztype, argtypes, typeargtypes);
                 if (cdef == null) { //do not check twice!
-                    tree.constructorType = checkId(noCheckTree,
+                    tree.constructorType = checkId(tree,
                             clazztype,
                             tree.constructor,
                             rsEnv,
-                            new ResultInfo(pkind, newMethodTemplate(syms.voidType, argtypes, typeargtypes)));
+                            new ResultInfo(pkind, newMethodTemplate(syms.voidType, argtypes, typeargtypes), CheckMode.NO_TREE_UPDATE));
                     if (rsEnv.info.lastResolveVarargs())
                         Assert.check(tree.constructorType.isErroneous() || tree.varargsElement != null);
                 }
@@ -2222,15 +2244,15 @@
                         tree.pos(), localEnv, clazztype, finalargtypes, typeargtypes);
                 Assert.check(!sym.kind.isResolutionError());
                 tree.constructor = sym;
-                tree.constructorType = checkId(noCheckTree,
+                tree.constructorType = checkId(tree,
                         clazztype,
                         tree.constructor,
                         localEnv,
-                        new ResultInfo(pkind, newMethodTemplate(syms.voidType, finalargtypes, typeargtypes)));
+                        new ResultInfo(pkind, newMethodTemplate(syms.voidType, finalargtypes, typeargtypes), CheckMode.NO_TREE_UPDATE));
             }
             Type owntype = (tree.constructor != null && tree.constructor.kind == MTH) ?
                                 clazztype : types.createErrorType(tree.type);
-            result = check(tree, owntype, KindSelector.VAL, resultInfo, false);
+            result = check(tree, owntype, KindSelector.VAL, resultInfo.dup(CheckMode.NO_INFERENCE_HOOK));
             chk.validate(tree.typeargs, localEnv);
         }
 
@@ -2427,6 +2449,11 @@
             resultInfo.checkContext.report(that, cause);
             result = that.type = types.createErrorType(pt());
             return;
+        } catch (Throwable t) {
+            //when an unexpected exception happens, avoid attempts to attribute the same tree again
+            //as that would likely cause the same exception again.
+            needsRecovery = false;
+            throw t;
         } finally {
             localEnv.info.scope.leave();
             if (needsRecovery) {
@@ -2837,9 +2864,9 @@
                     resultInfo.dup(newMethodTemplate(
                         desc.getReturnType().hasTag(VOID) ? Type.noType : desc.getReturnType(),
                         that.kind.isUnbound() ? argtypes.tail : argtypes, typeargtypes),
-                        new FunctionalReturnContext(resultInfo.checkContext));
-
-            Type refType = checkId(noCheckTree, lookupHelper.site, refSym, localEnv, checkInfo);
+                        new FunctionalReturnContext(resultInfo.checkContext), CheckMode.NO_TREE_UPDATE);
+
+            Type refType = checkId(that, lookupHelper.site, refSym, localEnv, checkInfo);
 
             if (that.kind.isUnbound() &&
                     resultInfo.checkContext.inferenceContext().free(argtypes.head)) {
@@ -3993,8 +4020,8 @@
                 all_multicatchTypes.append(ctype);
             }
         }
-        Type t = check(noCheckTree, types.lub(multicatchTypes.toList()),
-                KindSelector.TYP, resultInfo);
+        Type t = check(tree, types.lub(multicatchTypes.toList()),
+                KindSelector.TYP, resultInfo.dup(CheckMode.NO_TREE_UPDATE));
         if (t.hasTag(CLASS)) {
             List<Type> alternatives =
                 ((all_multicatchTypes == null) ? multicatchTypes : all_multicatchTypes).toList();
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Thu May 07 16:02:41 2015 -0700
@@ -841,6 +841,15 @@
                 }
                 return true;
             }
+
+            @Override
+            public Boolean visitTypeVar(TypeVar t, Void s) {
+                /* Any type variable mentioned in the inferred type must have been declared as a type parameter
+                  (i.e cannot have been produced by capture conversion (5.1.10) or by inference (18.4)
+                */
+                return t.tsym.owner.type.getTypeArguments().contains(t);
+            }
+
             @Override
             public Boolean visitCapturedType(CapturedType t, Void s) {
                 return false;
@@ -2268,7 +2277,7 @@
             }
         }
         if (complete)
-            complete = ((c.flags_field & UNATTRIBUTED) == 0) && c.completer == null;
+            complete = ((c.flags_field & UNATTRIBUTED) == 0) && c.isCompleted();
         if (complete) c.flags_field |= ACYCLIC;
         return complete;
     }
@@ -2999,7 +3008,7 @@
 
     /** Is the annotation applicable to types? */
     protected boolean isTypeAnnotation(JCAnnotation a, boolean isTypeParameter) {
-        List<Attribute> targets = typeAnnotations.annotationTargets(a.attribute);
+        List<Attribute> targets = typeAnnotations.annotationTargets(a.annotationType.type.tsym);
         return (targets == null) ?
                 false :
                 targets.stream()
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Thu May 07 16:02:41 2015 -0700
@@ -360,7 +360,7 @@
                 ClassSymbol c = syms.enterClass(name, tree.packge);
                 c.flatname = names.fromString(tree.packge + "." + name);
                 c.sourcefile = tree.sourcefile;
-                c.completer = null;
+            c.completer = Completer.NULL_COMPLETER;
                 c.members_field = WriteableScope.create(c);
                 tree.packge.package_info = c;
             }
@@ -427,7 +427,7 @@
         typeEnvs.put(c, localEnv);
 
         // Fill out class fields.
-        c.completer = null; // do not allow the initial completer linger on.
+        c.completer = Completer.NULL_COMPLETER; // do not allow the initial completer linger on.
         c.flags_field = chk.checkFlags(tree.pos(), tree.mods.flags, c, tree);
         c.sourcefile = env.toplevel.sourcefile;
         c.members_field = WriteableScope.create(c);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -810,7 +810,9 @@
                 Infer infer = inferenceContext.infer();
                 for (Type b1 : uv.getBounds(InferenceBound.UPPER)) {
                     for (Type b2 : uv.getBounds(InferenceBound.LOWER)) {
-                        isSubtype(inferenceContext.asUndetVar(b2), inferenceContext.asUndetVar(b1), warn , infer);
+                        if (!isSubtype(inferenceContext.asUndetVar(b2), inferenceContext.asUndetVar(b1), warn , infer)) {
+                            infer.reportBoundError(uv, BoundErrorKind.BAD_UPPER_LOWER);
+                        }
                     }
                 }
             }
@@ -831,7 +833,9 @@
                 Infer infer = inferenceContext.infer();
                 for (Type b1 : uv.getBounds(InferenceBound.UPPER)) {
                     for (Type b2 : uv.getBounds(InferenceBound.EQ)) {
-                        isSubtype(inferenceContext.asUndetVar(b2), inferenceContext.asUndetVar(b1), warn, infer);
+                        if (!isSubtype(inferenceContext.asUndetVar(b2), inferenceContext.asUndetVar(b1), warn, infer)) {
+                            infer.reportBoundError(uv, BoundErrorKind.BAD_UPPER_EQUAL);
+                        }
                     }
                 }
             }
@@ -852,7 +856,9 @@
                 Infer infer = inferenceContext.infer();
                 for (Type b1 : uv.getBounds(InferenceBound.EQ)) {
                     for (Type b2 : uv.getBounds(InferenceBound.LOWER)) {
-                        isSubtype(inferenceContext.asUndetVar(b2), inferenceContext.asUndetVar(b1), warn, infer);
+                        if (!isSubtype(inferenceContext.asUndetVar(b2), inferenceContext.asUndetVar(b1), warn, infer)) {
+                            infer.reportBoundError(uv, BoundErrorKind.BAD_EQUAL_LOWER);
+                        }
                     }
                 }
             }
@@ -926,7 +932,9 @@
                 for (Type b1 : uv.getBounds(InferenceBound.EQ)) {
                     for (Type b2 : uv.getBounds(InferenceBound.EQ)) {
                         if (b1 != b2) {
-                            isSameType(inferenceContext.asUndetVar(b2), inferenceContext.asUndetVar(b1), infer);
+                            if (!isSameType(inferenceContext.asUndetVar(b2), inferenceContext.asUndetVar(b1), infer)) {
+                                infer.reportBoundError(uv, BoundErrorKind.BAD_EQ);
+                            }
                         }
                     }
                 }
@@ -1235,6 +1243,46 @@
             }
         },
         /**
+         * The (uninstantiated) inference variable has incompatible equality constraints.
+         */
+        BAD_EQ() {
+            @Override
+            InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
+                return ex.setMessage("incompatible.eq.bounds", uv.qtype,
+                        uv.getBounds(InferenceBound.EQ));
+            }
+        },
+        /**
+         * The (uninstantiated) inference variable has incompatible upper lower bounds.
+         */
+        BAD_UPPER_LOWER() {
+            @Override
+            InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
+                return ex.setMessage("incompatible.upper.lower.bounds", uv.qtype,
+                        uv.getBounds(InferenceBound.UPPER), uv.getBounds(InferenceBound.LOWER));
+            }
+        },
+        /**
+         * The (uninstantiated) inference variable has incompatible upper equal bounds.
+         */
+        BAD_UPPER_EQUAL() {
+            @Override
+            InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
+                return ex.setMessage("incompatible.upper.eq.bounds", uv.qtype,
+                        uv.getBounds(InferenceBound.UPPER), uv.getBounds(InferenceBound.EQ));
+            }
+        },
+        /**
+         * The (uninstantiated) inference variable has incompatible upper equal bounds.
+         */
+        BAD_EQUAL_LOWER() {
+            @Override
+            InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
+                return ex.setMessage("incompatible.eq.lower.bounds", uv.qtype,
+                        uv.getBounds(InferenceBound.EQ), uv.getBounds(InferenceBound.LOWER));
+            }
+        },
+        /**
          * An equality constraint is not compatible with an upper bound.
          */
         BAD_EQ_UPPER() {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Thu May 07 16:02:41 2015 -0700
@@ -641,7 +641,7 @@
             c.flatname = chk.localClassName(c);
         }
         c.sourcefile = owner.sourcefile;
-        c.completer = null;
+        c.completer = Completer.NULL_COMPLETER;
         c.members_field = WriteableScope.create(c);
         c.flags_field = flags;
         ClassType ctype = (ClassType) c.type;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Thu May 07 16:02:41 2015 -0700
@@ -25,6 +25,9 @@
 
 package com.sun.tools.javac.comp;
 
+import java.util.EnumSet;
+import java.util.Set;
+
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Scope.WriteableScope;
 import com.sun.tools.javac.tree.*;
@@ -335,43 +338,49 @@
         return initTreeVisitor.result;
     }
 
-    /** Visitor class for expressions which might be constant expressions.
+    /** Visitor class for expressions which might be constant expressions,
+     *  as per JLS 15.28 (Constant Expressions).
      */
     static class InitTreeVisitor extends JCTree.Visitor {
 
+        private static final Set<Tag> ALLOWED_OPERATORS =
+                EnumSet.of(Tag.POS, Tag.NEG, Tag.NOT, Tag.COMPL, Tag.PLUS, Tag.MINUS,
+                           Tag.MUL, Tag.DIV, Tag.MOD, Tag.SL, Tag.SR, Tag.USR,
+                           Tag.LT, Tag.LE, Tag.GT, Tag.GE, Tag.EQ, Tag.NE,
+                           Tag.BITAND, Tag.BITXOR, Tag.BITOR, Tag.AND, Tag.OR);
+
         private boolean result = true;
 
         @Override
-        public void visitTree(JCTree tree) {}
-
-        @Override
-        public void visitNewClass(JCNewClass that) {
+        public void visitTree(JCTree tree) {
             result = false;
         }
 
         @Override
-        public void visitNewArray(JCNewArray that) {
-            result = false;
+        public void visitLiteral(JCLiteral that) {}
+
+        @Override
+        public void visitTypeCast(JCTypeCast tree) {
+            tree.expr.accept(this);
         }
 
         @Override
-        public void visitLambda(JCLambda that) {
-            result = false;
+        public void visitUnary(JCUnary that) {
+            if (!ALLOWED_OPERATORS.contains(that.getTag())) {
+                result = false;
+                return ;
+            }
+            that.arg.accept(this);
         }
 
         @Override
-        public void visitReference(JCMemberReference that) {
-            result = false;
-        }
-
-        @Override
-        public void visitApply(JCMethodInvocation that) {
-            result = false;
-        }
-
-        @Override
-        public void visitSelect(JCFieldAccess tree) {
-            tree.selected.accept(this);
+        public void visitBinary(JCBinary that) {
+            if (!ALLOWED_OPERATORS.contains(that.getTag())) {
+                result = false;
+                return ;
+            }
+            that.lhs.accept(this);
+            that.rhs.accept(this);
         }
 
         @Override
@@ -387,8 +396,11 @@
         }
 
         @Override
-        public void visitTypeCast(JCTypeCast tree) {
-            tree.expr.accept(this);
+        public void visitIdent(JCIdent that) {}
+
+        @Override
+        public void visitSelect(JCFieldAccess tree) {
+            tree.selected.accept(this);
         }
     }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Thu May 07 16:02:41 2015 -0700
@@ -2024,6 +2024,8 @@
      *  @param name      The type's name.
      */
     Symbol findType(Env<AttrContext> env, Name name) {
+        if (name == names.empty)
+            return typeNotFound; // do not allow inadvertent "lookup" of anonymous types
         Symbol bestSoFar = typeNotFound;
         Symbol sym;
         boolean staticOnly = false;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Thu May 07 16:02:41 2015 -0700
@@ -905,7 +905,7 @@
             memberEnter.memberEnter(tree.defs, env);
 
             if (tree.sym.isAnnotationType()) {
-                Assert.checkNull(tree.sym.completer);
+                Assert.check(tree.sym.isCompleted());
                 tree.sym.setAnnotationTypeMetadata(new AnnotationTypeMetadata(tree.sym, annotate.annotationTypeSourceCompleter()));
             }
         }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu May 07 16:02:41 2015 -0700
@@ -69,7 +69,6 @@
     private final TreeMaker make;
     private final Names names;
     private final Target target;
-    private final Type stringBufferType;
     private final Map<Type,Symbol> stringBufferAppend;
     private Name accessDollar;
     private final Types types;
@@ -107,7 +106,6 @@
         target = Target.instance(context);
         types = Types.instance(context);
         methodType = new MethodType(null, null, null, syms.methodClass);
-        stringBufferType = syms.stringBuilderType;
         stringBufferAppend = new HashMap<>();
         accessDollar = names.
             fromString("access" + target.syntheticNameChar());
@@ -2070,10 +2068,10 @@
         /** Make a new string buffer.
          */
         void makeStringBuffer(DiagnosticPosition pos) {
-            code.emitop2(new_, makeRef(pos, stringBufferType));
+            code.emitop2(new_, makeRef(pos, syms.stringBuilderType));
             code.emitop0(dup);
             callMethod(
-                    pos, stringBufferType, names.init, List.<Type>nil(), false);
+                    pos, syms.stringBuilderType, names.init, List.<Type>nil(), false);
         }
 
         /** Append value (on tos) to string buffer (on tos - 1).
@@ -2091,7 +2089,7 @@
             if (method == null) {
                 method = rs.resolveInternalMethod(tree.pos(),
                                                   attrEnv,
-                                                  stringBufferType,
+                                                  syms.stringBuilderType,
                                                   names.append,
                                                   List.of(t),
                                                   null);
@@ -2122,7 +2120,7 @@
         void bufferToString(DiagnosticPosition pos) {
             callMethod(
                     pos,
-                    stringBufferType,
+                    syms.stringBuilderType,
                     names.toString,
                     List.<Type>nil(),
                     false);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java	Thu May 07 16:02:41 2015 -0700
@@ -228,6 +228,11 @@
         if (args.isEmpty())
             return Result.OK;
 
+        // init Depeendencies
+        if (options.isSet("completionDeps")) {
+            Dependencies.GraphDependencies.preRegister(context);
+        }
+
         // init plugins
         Set<List<String>> pluginOpts = args.getPluginOpts();
         if (!pluginOpts.isEmpty()) {
@@ -235,6 +240,9 @@
             t.initPlugins(pluginOpts);
         }
 
+        // init JavaCompiler
+        JavaCompiler comp = JavaCompiler.instance(context);
+
         // init doclint
         List<String> docLintOpts = args.getDocLintOpts();
         if (!docLintOpts.isEmpty()) {
@@ -242,13 +250,6 @@
             t.initDocLint(docLintOpts);
         }
 
-        // init Depeendencies
-        if (options.isSet("completionDeps")) {
-            Dependencies.GraphDependencies.preRegister(context);
-        }
-
-        // init JavaCompiler
-        JavaCompiler comp = JavaCompiler.instance(context);
         if (options.get(Option.XSTDOUT) != null) {
             // Stdout reassigned - ask compiler to close it when it is done
             comp.closeables = comp.closeables.prepend(log.getWriter(WriterKind.NOTICE));
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1092,7 +1092,7 @@
                     if (cs.classfile != null || cs.kind == ERR) {
                         cs.reset();
                         cs.type = new ClassType(cs.type.getEnclosingType(), null, cs);
-                        if (cs.completer == null) {
+                        if (cs.isCompleted()) {
                             cs.completer = initialCompleter;
                         }
                     }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu May 07 16:02:41 2015 -0700
@@ -413,6 +413,10 @@
 compiler.err.invalid.repeatable.annotation.not.applicable=\
     container {0} is not applicable to element {1}
 
+# 0: type
+compiler.err.invalid.repeatable.annotation.not.applicable.in.context=\
+    container {0} is not applicable in this type context
+
 # 0: name
 compiler.err.duplicate.class=\
     duplicate class: {0}
@@ -1966,6 +1970,10 @@
 compiler.misc.incompatible.upper.bounds=\
     inference variable {0} has incompatible upper bounds {1}
 
+# 0: type, 1: list of type
+compiler.misc.incompatible.eq.bounds=\
+    inference variable {0} has incompatible equality constraints {1}
+
 # 0: type, 1: list of type, 2: list of type
 compiler.misc.incompatible.eq.upper.bounds=\
     inference variable {0} has incompatible bounds\n\
@@ -1973,6 +1981,24 @@
     upper bounds: {2}
 
 # 0: type, 1: list of type, 2: list of type
+compiler.misc.incompatible.upper.lower.bounds=\
+    inference variable {0} has incompatible bounds\n\
+    upper bounds: {1}\n\
+    lower bounds: {2}
+
+# 0: type, 1: list of type, 2: list of type
+compiler.misc.incompatible.upper.eq.bounds=\
+    inference variable {0} has incompatible bounds\n\
+    upper bounds: {1}\n\
+    equality constraints: {2}
+
+# 0: type, 1: list of type, 2: list of type
+compiler.misc.incompatible.eq.lower.bounds=\
+    inference variable {0} has incompatible bounds\n\
+    equality constraints: {1}\n\
+    lower bounds: {2}
+
+# 0: type, 1: list of type, 2: list of type
 compiler.misc.incompatible.eq.lower.bounds=\
     inference variable {0} has incompatible bounds\n\
     equality constraints: {1}\n\
@@ -2577,6 +2603,7 @@
 compiler.misc.where.description.typevar.1=\
     where {0} are type-variables:
 
+# 0: set of type
 compiler.misc.where.description.intersection.1=\
     where {0} are intersection types:
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties	Thu May 07 16:02:41 2015 -0700
@@ -318,8 +318,8 @@
 
 javac.msg.bug=\
 An exception has occurred in the compiler ({0}). \
-Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  \
-after checking the Bug Parade for duplicates. \
+Please file a bug at the Java Bug Database (http://bugreport.java.com/bugreport/) \
+after checking the database for duplicates. \
 Include your program and the following diagnostic in your report.  Thank you.
 
 javac.msg.io=\
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Thu May 07 16:02:41 2015 -0700
@@ -726,7 +726,7 @@
             break;
         case WILDCARD: {
             WildcardType a = ((WildcardType) t);
-            tp = Wildcard(TypeBoundKind(a.kind), Type(a.type));
+            tp = Wildcard(TypeBoundKind(a.kind), a.kind == BoundKind.UNBOUND ? null : Type(a.type));
             break;
         }
         case CLASS:
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Dependencies.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Dependencies.java	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -468,6 +468,11 @@
             sym.completer = this;
         }
 
+        @Override
+        public boolean isTerminal() {
+            return true;
+        }
+
         /**
          * This visitor is used to generate the special side-effect dependencies
          * given a graph containing only standard dependencies.
--- a/src/jdk.dev/share/classes/com/sun/tools/jdeps/Profile.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.dev/share/classes/com/sun/tools/jdeps/Profile.java	Thu May 07 16:02:41 2015 -0700
@@ -35,7 +35,8 @@
     COMPACT2("compact2", 2, "java.compact2"),
     COMPACT3("compact3", 3, "java.compact3", "java.smartcardio", "jdk.sctp",
                             "jdk.httpserver", "jdk.security.auth",
-                            "jdk.naming.dns", "jdk.naming.rmi"),
+                            "jdk.naming.dns", "jdk.naming.rmi",
+                            "jdk.management"),
     FULL_JRE("Full JRE", 4, "java.se", "jdk.deploy.osx", "jdk.charsets",
                             "jdk.crypto.ec", "jdk.crypto.pkcs11",
                             "jdk.crypto.mscapi", "jdk.crypto.ucrypto", "jdk.jvmstat",
--- a/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/ClassDocImpl.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/ClassDocImpl.java	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -796,9 +796,7 @@
         }
 
         // make sure that this symbol has been completed
-        if (tsym.completer != null) {
-            tsym.complete();
-        }
+        tsym.complete();
 
         // search imports
 
--- a/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/JavadocTool.java	Tue May 05 11:04:37 2015 -0300
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/JavadocTool.java	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,7 @@
 import javax.tools.StandardLocation;
 
 import com.sun.tools.javac.code.ClassFinder;
+import com.sun.tools.javac.code.Symbol.Completer;
 import com.sun.tools.javac.code.Symbol.CompletionFailure;
 import com.sun.tools.javac.comp.Enter;
 import com.sun.tools.javac.tree.JCTree;
@@ -141,7 +142,7 @@
         docenv.docClasses = docClasses;
         docenv.legacyDoclet = legacyDoclet;
 
-        javadocFinder.sourceCompleter = docClasses ? null : sourceCompleter;
+        javadocFinder.sourceCompleter = docClasses ? Completer.NULL_COMPLETER : sourceCompleter;
 
         ListBuffer<String> names = new ListBuffer<>();
         ListBuffer<JCCompilationUnit> classTrees = new ListBuffer<>();
--- a/test/tools/javac/Diagnostics/6722234/T6722234b.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Diagnostics/6722234/T6722234b.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /**
  * @test /nodynamiccopyright/
- * @bug     6722234
+ * @bug     6722234 8078024
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
  * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics -XDdiags=simpleNames T6722234b.java
--- a/test/tools/javac/Diagnostics/6722234/T6722234b_1.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Diagnostics/6722234/T6722234b_1.out	Thu May 07 16:02:41 2015 -0700
@@ -1,2 +1,2 @@
-T6722234b.java:16:9: compiler.err.cant.apply.symbol: kindname.method, m, List<T>,List<T>, List<compiler.misc.type.captureof: 1, ? extends T6722234b>,List<compiler.misc.type.captureof: 2, ? extends T6722234b>, kindname.class, T6722234b, (compiler.misc.inferred.do.not.conform.to.eq.bounds: compiler.misc.type.captureof: 2, ? extends T6722234b, compiler.misc.type.captureof: 2, ? extends T6722234b,compiler.misc.type.captureof: 1, ? extends T6722234b)
+T6722234b.java:16:9: compiler.err.cant.apply.symbol: kindname.method, m, List<T>,List<T>, List<compiler.misc.type.captureof: 1, ? extends T6722234b>,List<compiler.misc.type.captureof: 2, ? extends T6722234b>, kindname.class, T6722234b, (compiler.misc.incompatible.eq.bounds: T, compiler.misc.type.captureof: 2, ? extends T6722234b,compiler.misc.type.captureof: 1, ? extends T6722234b)
 1 error
--- a/test/tools/javac/Diagnostics/6722234/T6722234b_2.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Diagnostics/6722234/T6722234b_2.out	Thu May 07 16:02:41 2015 -0700
@@ -1,4 +1,4 @@
-T6722234b.java:16:9: compiler.err.cant.apply.symbol: kindname.method, m, List<T>,List<T>, List<compiler.misc.captured.type: 1>,List<compiler.misc.captured.type: 2>, kindname.class, T6722234b, (compiler.misc.inferred.do.not.conform.to.eq.bounds: compiler.misc.captured.type: 2, compiler.misc.captured.type: 2,compiler.misc.captured.type: 1)
+T6722234b.java:16:9: compiler.err.cant.apply.symbol: kindname.method, m, List<T>,List<T>, List<compiler.misc.captured.type: 1>,List<compiler.misc.captured.type: 2>, kindname.class, T6722234b, (compiler.misc.incompatible.eq.bounds: T, compiler.misc.captured.type: 2,compiler.misc.captured.type: 1)
 - compiler.misc.where.description.typevar: T,{(compiler.misc.where.typevar: T, Object, kindname.method, <T>m(List<T>,List<T>))}
 - compiler.misc.where.description.captured.1: compiler.misc.captured.type: 1,compiler.misc.captured.type: 2,{(compiler.misc.where.captured.1: compiler.misc.captured.type: 1, T6722234b, compiler.misc.type.null, ? extends T6722234b),(compiler.misc.where.captured.1: compiler.misc.captured.type: 2, T6722234b, compiler.misc.type.null, ? extends T6722234b)}
 1 error
--- a/test/tools/javac/Diagnostics/6722234/T6722234d.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Diagnostics/6722234/T6722234d.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /**
  * @test /nodynamiccopyright/
- * @bug     6722234
+ * @bug     6722234 8078024
  * @summary javac diagnostics need better integration with the type-system
  * @author  mcimadamore
  * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics -XDdiags=where T6722234d.java
--- a/test/tools/javac/Diagnostics/6722234/T6722234d_1.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Diagnostics/6722234/T6722234d_1.out	Thu May 07 16:02:41 2015 -0700
@@ -1,3 +1,3 @@
-T6722234d.java:18:20: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: compiler.misc.intersection.type: 1, T6722234d.A,java.lang.Object)
-- compiler.misc.where.description.intersection: compiler.misc.intersection.type: 1,{(compiler.misc.where.intersection: compiler.misc.intersection.type: 1, java.lang.Object,T6722234d.I1,T6722234d.I2)}
+T6722234d.java:18:20: compiler.err.prob.found.req: (compiler.misc.incompatible.upper.lower.bounds: Z, T6722234d.A,java.lang.Object, T6722234d.B,T6722234d.A)
+- compiler.misc.where.description.typevar: Z,{(compiler.misc.where.typevar: Z, java.lang.Object, kindname.method, <Z>m(Z,Z))}
 1 error
--- a/test/tools/javac/Diagnostics/6722234/T6722234d_2.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Diagnostics/6722234/T6722234d_2.out	Thu May 07 16:02:41 2015 -0700
@@ -1,3 +1,3 @@
-T6722234d.java:18:20: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: compiler.misc.intersection.type: 1, T6722234d.A,Object)
-- compiler.misc.where.description.intersection: compiler.misc.intersection.type: 1,{(compiler.misc.where.intersection: compiler.misc.intersection.type: 1, Object,I1,I2)}
+T6722234d.java:18:20: compiler.err.prob.found.req: (compiler.misc.incompatible.upper.lower.bounds: Z, T6722234d.A,Object, T6722234d.B,T6722234d.A)
+- compiler.misc.where.description.typevar: Z,{(compiler.misc.where.typevar: Z, Object, kindname.method, <Z>m(Z,Z))}
 1 error
--- a/test/tools/javac/Diagnostics/6799605/T6799605.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Diagnostics/6799605/T6799605.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /**
  * @test /nodynamiccopyright/
- * @bug     6799605
+ * @bug     6799605 8078024
  * @summary Basic/Raw formatters should use type/symbol printer instead of toString()
  * @author  mcimadamore
  * @compile/fail/ref=T6799605.out -XDrawDiagnostics  T6799605.java
--- a/test/tools/javac/Diagnostics/6799605/T6799605.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Diagnostics/6799605/T6799605.out	Thu May 07 16:02:41 2015 -0700
@@ -1,4 +1,4 @@
 T6799605.java:17:9: compiler.err.cant.apply.symbols: kindname.method, m, T6799605<compiler.misc.type.captureof: 1, ?>,{(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>), (compiler.misc.incompatible.eq.upper.bounds: T, compiler.misc.type.captureof: 1, ?, T6799605<T>)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>,T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T))}
-T6799605.java:18:9: compiler.err.cant.apply.symbols: kindname.method, m, T6799605<compiler.misc.type.captureof: 1, ?>,T6799605<compiler.misc.type.captureof: 2, ?>,{(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>), (compiler.misc.inferred.do.not.conform.to.eq.bounds: compiler.misc.type.captureof: 2, ?, compiler.misc.type.captureof: 2, ?,compiler.misc.type.captureof: 1, ?)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>,T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T))}
-T6799605.java:19:9: compiler.err.cant.apply.symbols: kindname.method, m, T6799605<compiler.misc.type.captureof: 1, ?>,T6799605<compiler.misc.type.captureof: 2, ?>,T6799605<compiler.misc.type.captureof: 3, ?>,{(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>,T6799605<T>), (compiler.misc.inferred.do.not.conform.to.eq.bounds: compiler.misc.type.captureof: 3, ?, compiler.misc.type.captureof: 3, ?,compiler.misc.type.captureof: 2, ?,compiler.misc.type.captureof: 1, ?))}
+T6799605.java:18:9: compiler.err.cant.apply.symbols: kindname.method, m, T6799605<compiler.misc.type.captureof: 1, ?>,T6799605<compiler.misc.type.captureof: 2, ?>,{(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>), (compiler.misc.incompatible.eq.bounds: T, compiler.misc.type.captureof: 2, ?,compiler.misc.type.captureof: 1, ?)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>,T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T))}
+T6799605.java:19:9: compiler.err.cant.apply.symbols: kindname.method, m, T6799605<compiler.misc.type.captureof: 1, ?>,T6799605<compiler.misc.type.captureof: 2, ?>,T6799605<compiler.misc.type.captureof: 3, ?>,{(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.method, T6799605, <T>m(T6799605<T>,T6799605<T>,T6799605<T>), (compiler.misc.incompatible.eq.bounds: T, compiler.misc.type.captureof: 3, ?,compiler.misc.type.captureof: 2, ?,compiler.misc.type.captureof: 1, ?))}
 3 errors
--- a/test/tools/javac/Paths/Diagnostics.sh	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Paths/Diagnostics.sh	Thu May 07 16:02:41 2015 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -186,7 +186,7 @@
 # Class-Path attribute followed in extdirs or endorseddirs
 #----------------------------------------------------------------
 Sys mkdir jars
-Sys cp -p classesRefRef.jar jars/.
+Sys cp classesRefRef.jar jars/.
    Warning "$javac" ${TESTTOOLVMOPTS} -Xlint -extdirs      jars Main.java
    Warning "$javac" ${TESTTOOLVMOPTS} -Xlint -endorseddirs jars Main.java
 
--- a/test/tools/javac/Paths/MineField.sh	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Paths/MineField.sh	Thu May 07 16:02:41 2015 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -323,7 +323,7 @@
 In GooClass Failure "$java" ${TESTVMOPTS}  -cp ".." Main
 
 # Unspecified classpath defaults to "."
-Sys mkdir OneDir; Sys cp -p Main.java GooClass/Lib.class OneDir/.
+Sys mkdir OneDir; Sys cp Main.java GooClass/Lib.class OneDir/.
 In OneDir Success "$javac" ${TESTTOOLVMOPTS} Main.java
 In OneDir Success "$java" ${TESTVMOPTS}  Main
 
--- a/test/tools/javac/Paths/wcMineField.sh	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/Paths/wcMineField.sh	Thu May 07 16:02:41 2015 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -49,9 +49,9 @@
 #----------------------------------------------------------------
 Cleanup() {
     Sys rm -rf GooSrc GooJar GooZip GooClass
-	 Sys rm -rf SpeSrc SpeJar SpeZip SpeClass
+         Sys rm -rf SpeSrc SpeJar SpeZip SpeClass
     Sys rm -rf BadSrc BadJar BadZip BadClass
-	 Sys rm -rf JarNClass StarJar MixJar StarDir
+         Sys rm -rf JarNClass StarJar MixJar StarDir
     Sys rm -rf OneDir *.class Main*.java MANIFEST.MF
 }
 
@@ -127,11 +127,9 @@
     printf "Running tests with directory named \"*\"\n"
     Sys rm -rf ./StarDir
     Sys mkdir -p StarDir/"*"
-    Sys cp -p "GooClass/Lib3.class" "GooClass/Lib.class" ./
     Sys cp "GooClass/Lib2.class" "StarDir/*/Lib2.class"
-    Sys "$jar" cf "StarDir/Lib3.jar" "Lib3.class"
-    Sys "$jar" cf "StarDir/*/Lib.jar" "Lib.class"
-    Sys rm -f "./Lib.class" "./Lib3.class"
+    Sys "$jar" cf "StarDir/Lib3.jar" -C GooClass "Lib3.class"
+    Sys "$jar" cf "StarDir/*/Lib.jar" -C GooClass "Lib.class"
     CheckFiles "StarDir/*/Lib.jar" "StarDir/*/Lib2.class" "StarDir/Lib3.jar"
     Sys cp Main6.java ./StarDir/.
     Sys cp Main.java  ./StarDir/"*"/.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/InvalidClsTypeParamTarget.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,21 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8044196
+ * @summary Ensure that containers with target FIELD can't be applied to type parameters.
+ * @compile/fail/ref=InvalidClsTypeParamTarget.out -XDrawDiagnostics InvalidClsTypeParamTarget.java
+ */
+
+import java.lang.annotation.*;
+
+class InvalidClsTypeParamTarget {
+
+    @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE, ElementType.FIELD})
+    @Repeatable(TC.class)
+    @interface T { int value(); }
+
+    @Target(ElementType.FIELD)
+    @interface TC { T[] value(); }
+
+    class Test<@T(1) @T(2) N> {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/InvalidClsTypeParamTarget.out	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,2 @@
+InvalidClsTypeParamTarget.java:19:16: compiler.err.invalid.repeatable.annotation.not.applicable: InvalidClsTypeParamTarget.TC, InvalidClsTypeParamTarget.Test
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/InvalidMethodTypeParamTarget.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,20 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8044196
+ * @summary Ensure that containers with target METHOD can't be applied to type parameters.
+ * @compile/fail/ref=InvalidMethodTypeParamTarget.out -XDrawDiagnostics InvalidMethodTypeParamTarget.java
+ */
+
+import java.lang.annotation.*;
+
+class InvalidMethodTypeParamTarget {
+
+    @Target({ElementType.TYPE_PARAMETER, ElementType.METHOD})
+    @Repeatable(TC.class)
+    @interface T { int value(); }
+
+    @Target(ElementType.METHOD)
+    @interface TC { T[] value(); }
+
+    public <@T(1) @T(2) N> void method() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/InvalidMethodTypeParamTarget.out	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,2 @@
+InvalidMethodTypeParamTarget.java:19:13: compiler.err.invalid.repeatable.annotation.not.applicable: InvalidMethodTypeParamTarget.TC, <N>method()
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/InvalidMethodTypeUse.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,24 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8044196
+ * @summary Make sure repeatable annotations can't be erroneously applied to type arguments.
+ * @compile/fail/ref=InvalidMethodTypeUse.out -XDrawDiagnostics InvalidMethodTypeUse.java
+ */
+
+import java.lang.annotation.*;
+
+class InvalidMethodTypeUse {
+
+    @Target({ElementType.TYPE_USE, ElementType.METHOD, ElementType.TYPE_PARAMETER})
+    @Repeatable(TC.class)
+    @interface T { int value(); }
+
+    @Target({ElementType.METHOD, ElementType.TYPE_PARAMETER})
+    @interface TC { T[] value(); }
+
+    void method() {
+        this.<@T(1) @T(2) String>method2();
+    }
+
+    <@T(3) S> void method2() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/InvalidMethodTypeUse.out	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,2 @@
+InvalidMethodTypeUse.java:20:15: compiler.err.invalid.repeatable.annotation.not.applicable.in.context: InvalidMethodTypeUse.TC
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/InvalidRepAnnoOnCast.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,20 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8044196
+ * @summary Make sure repeatable annotations can't be erroneously applied to a cast type
+ * @compile/fail/ref=InvalidRepAnnoOnCast.out -XDrawDiagnostics InvalidRepAnnoOnCast.java
+ */
+
+import java.lang.annotation.*;
+
+class InvalidRepAnnoOnCast {
+
+    @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+    @Repeatable(TC.class)
+    @interface T { int value(); }
+
+    @Target(ElementType.TYPE_PARAMETER)
+    @interface TC { T[] value(); }
+
+    String s = (@T(1) @T(2) String) new Object();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/InvalidRepAnnoOnCast.out	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,2 @@
+InvalidRepAnnoOnCast.java:19:17: compiler.err.invalid.repeatable.annotation.not.applicable.in.context: InvalidRepAnnoOnCast.TC
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/brokenTypeAnnoContainer/BrokenTypeAnnoContainer.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,14 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8044196
+ * @summary Ensure that a broken type annotation container generates a correct error message.
+ * @compile T.java TC.java
+ * @compile TCBroken.java
+ * @compile/fail/ref=BrokenTypeAnnoContainer.out -XDrawDiagnostics BrokenTypeAnnoContainer.java
+ */
+
+class BrokenTypeAnnoContainer {
+    void method() {
+        int ll2 = (@T(1) @T(2) int) 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/brokenTypeAnnoContainer/BrokenTypeAnnoContainer.out	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,2 @@
+BrokenTypeAnnoContainer.java:12:20: compiler.err.duplicate.annotation.invalid.repeated: T
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/brokenTypeAnnoContainer/T.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.annotation.*;
+
+@Target(ElementType.TYPE_USE)
+@Repeatable(TC.class)
+@interface T { int value(); }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/brokenTypeAnnoContainer/TC.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.annotation.*;
+
+@Target(ElementType.TYPE_USE)
+@interface TC {
+    T[] value();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/repeatingAnnotations/brokenTypeAnnoContainer/TCBroken.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.annotation.*;
+
+@Target(ElementType.TYPE_USE)
+@interface TC {
+    T[] value();
+    int foo();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044537
+ * @summary Checking ACC_SYNTHETIC flag is generated for access method
+*           generated to access to private methods and fields.
+ * @library /tools/lib /tools/javac/lib ../lib
+ * @build TestBase TestResult InMemoryFileManager ToolBox
+ * @build AccessToPrivateInnerClassMembersTest SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @run main SyntheticTestDriver AccessToPrivateInnerClassMembersTest 1
+ */
+
+/**
+ * Access from top level class to inner classes.
+ * Synthetic members:
+ * 1. inner classes for Inner*.
+ * 2. getter/setter for private field var.
+ * 3. access method for private method function().
+ * 4. getter/setter for private field staticVar.
+ * 5. access method for private method staticFunction().
+ * 6. field this in Inner1.
+ * 7. constructor for Inner*.
+ */
+@ExpectedClass(className = "AccessToPrivateInnerClassMembersTest",
+        expectedMethods = {"<init>()", "<clinit>()"})
+@ExpectedClass(className = "AccessToPrivateInnerClassMembersTest$Inner1",
+        expectedMethods = {"<init>(AccessToPrivateInnerClassMembersTest)", "function()"},
+        expectedFields = "var",
+        expectedNumberOfSyntheticMethods = 4,
+        expectedNumberOfSyntheticFields = 1)
+@ExpectedClass(className = "AccessToPrivateInnerClassMembersTest$Inner2",
+        expectedMethods = {"function()", "staticFunction()", "<init>()"},
+        expectedFields = {"staticVar", "var"},
+        expectedNumberOfSyntheticMethods = 7)
+public class AccessToPrivateInnerClassMembersTest {
+
+    private class Inner1 {
+        private Inner1() {}
+        private int var;
+        private void function() {}
+    }
+
+    {
+        Inner1 inner = new Inner1();
+        inner.var = 0;
+        int i = inner.var;
+        inner.function();
+    }
+
+    private static class Inner2 {
+        private Inner2() {}
+        private int var;
+        private static int staticVar;
+        private void function() {}
+        private static void staticFunction() {}
+    }
+
+    {
+        Inner2 inner = new Inner2();
+        inner.var = 0;
+        int i = inner.var;
+        inner.function();
+    }
+
+    static {
+        Inner2.staticFunction();
+        Inner2.staticVar = 0;
+        int i = Inner2.staticVar;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044537
+ * @summary Checking ACC_SYNTHETIC flag is generated for access method
+ *          generated to access to private methods and fields.
+ * @library /tools/lib /tools/javac/lib ../lib
+ * @build TestBase TestResult InMemoryFileManager ToolBox
+ * @build AccessToPrivateSiblingsTest SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @run main SyntheticTestDriver AccessToPrivateSiblingsTest 1
+ */
+
+/**
+ * Access from sibling classes to sibling classes.
+ * Synthetic members:
+ * 1. inner classes for Inner*.
+ * 2. getter/setter for private field var.
+ * 3. access method for private method function().
+ * 4. getter/setter for private field staticVar.
+ * 5. access method for private method staticFunction().
+ * 6. field this in Inner1.
+ * 7. constructor for Inner*.
+ */
+@ExpectedClass(className = "AccessToPrivateSiblingsTest", expectedMethods = "<init>()")
+@ExpectedClass(className = "AccessToPrivateSiblingsTest$Inner1",
+        expectedMethods = {"function()", "<init>(AccessToPrivateSiblingsTest)"},
+        expectedFields = "var",
+        expectedNumberOfSyntheticMethods = 4,
+        expectedNumberOfSyntheticFields = 1)
+@ExpectedClass(className = "AccessToPrivateSiblingsTest$Inner2",
+        expectedMethods = "<init>(AccessToPrivateSiblingsTest)",
+        expectedNumberOfSyntheticFields = 1)
+@ExpectedClass(className = "AccessToPrivateSiblingsTest$Inner3",
+        expectedMethods = {"<init>()", "function()", "staticFunction()", "<clinit>()"},
+        expectedFields = {"var", "staticVar"},
+        expectedNumberOfSyntheticMethods = 4)
+@ExpectedClass(className = "AccessToPrivateSiblingsTest$Inner4",
+        expectedMethods = {"<init>()", "function()", "staticFunction()"},
+        expectedFields = {"var", "staticVar"},
+        expectedNumberOfSyntheticMethods = 4)
+public class AccessToPrivateSiblingsTest {
+
+    private class Inner1 {
+        private Inner1() {}
+        private int var;
+        private void function() {}
+
+        {
+            Inner3 inner = new Inner3();
+            inner.var = 0;
+            int i = inner.var;
+            inner.function();
+        }
+    }
+
+    private class Inner2 {
+        {
+            Inner1 inner = new Inner1();
+            inner.var = 0;
+            int i = inner.var;
+            inner.function();
+        }
+    }
+
+    private static class Inner3 {
+        private Inner3() {}
+        private int var;
+        private static int staticVar;
+        private void function() {}
+        private static void staticFunction() {}
+
+        static {
+            Inner4 inner = new Inner4();
+            inner.var = 0;
+            int i = inner.var;
+            inner.function();
+        }
+    }
+
+    private static class Inner4 {
+        private Inner4() {}
+        private int var;
+        private static int staticVar;
+        private void function() {}
+        private static void staticFunction() {}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044537
+ * @summary Checking ACC_SYNTHETIC flag is generated for assert statement.
+ * @library /tools/lib /tools/javac/lib ../lib
+ * @build TestBase TestResult InMemoryFileManager ToolBox
+ * @build AssertFieldTest SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @run main SyntheticTestDriver AssertFieldTest
+ */
+
+/**
+ * Synthetic field for assert.
+ */
+@ExpectedClass(className = "AssertFieldTest",
+        expectedMethods = {"<init>()", "function(boolean)", "<clinit>()"},
+        expectedNumberOfSyntheticFields = 1)
+public class AssertFieldTest {
+
+    public void function(boolean flag) {
+        assert flag;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044537
+ * @summary Checking ACC_SYNTHETIC flag is generated for bridge method generated for generic method.
+ * @library /tools/lib /tools/javac/lib ../lib
+ * @build TestBase TestResult InMemoryFileManager ToolBox
+ * @build BridgeMethodForGenericMethodTest SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @run main SyntheticTestDriver BridgeMethodForGenericMethodTest
+ */
+
+import java.util.ArrayList;
+
+/**
+ * Synthetic method add(Object i) for method add(Integer)
+ */
+@ExpectedClass(className = "BridgeMethodForGenericMethodTest",
+        expectedMethods = {"<init>()", "add(java.lang.Integer)"},
+        expectedNumberOfSyntheticMethods = 1)
+public class BridgeMethodForGenericMethodTest extends ArrayList<Integer> {
+
+    @Override
+    public boolean add(Integer i) {
+        return true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044537
+ * @summary Checking ACC_SYNTHETIC flag is generated for bridge method
+ *          generated for lambda expressions and method references.
+ * @library /tools/lib /tools/javac/lib ../lib
+ * @build TestBase TestResult InMemoryFileManager ToolBox
+ * @build BridgeMethodsForLambdaTest SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @run main SyntheticTestDriver BridgeMethodsForLambdaTest 1
+ */
+
+import java.util.Comparator;
+import java.util.stream.IntStream;
+
+/**
+ * Synthetic members:
+ * 1. inner class for Inner1.
+ * 2. method for () -> {} in Inner1
+ * 3. method for () -> {} in Inner2
+ * 4. method references to private methods.
+ * 5. method for super::function()
+ * 6. method references to private static methods.
+ * 7. access method for private method function().
+ * 8. access method for private static method staticFunction().
+ * 9. method reference to vararg method.
+ * 10. method reference to array's method.
+ * 11. constructors for Inner1 and Inner2.
+ */
+@ExpectedClass(className = "BridgeMethodsForLambdaTest",
+        expectedMethods = {"<init>()", "<clinit>()", "function(java.lang.Integer[])"},
+        expectedNumberOfSyntheticMethods = 6)
+@ExpectedClass(className = "BridgeMethodsForLambdaTest$Inner1",
+        expectedMethods = {"<init>(BridgeMethodsForLambdaTest)", "function()", "run()"},
+        expectedFields = "lambda1",
+        expectedNumberOfSyntheticMethods = 4,
+        expectedNumberOfSyntheticFields = 1)
+@ExpectedClass(className = "BridgeMethodsForLambdaTest$Inner2",
+        expectedMethods = {"<init>()", "staticFunction()"},
+        expectedFields = "lambda1",
+        expectedNumberOfSyntheticMethods = 3)
+@ExpectedClass(className = "BridgeMethodsForLambdaTest$Inner3",
+        expectedMethods = {"<init>(BridgeMethodsForLambdaTest)", "function()"},
+        expectedNumberOfSyntheticMethods = 1,
+        expectedNumberOfSyntheticFields = 1)
+@ExpectedClass(className = "BridgeMethodsForLambdaTest$Inner4",
+        expectedMethods = {"<init>(BridgeMethodsForLambdaTest)", "function()"},
+        expectedNumberOfSyntheticMethods = 1,
+        expectedNumberOfSyntheticFields = 1)
+public class BridgeMethodsForLambdaTest {
+
+    private class Inner1 implements Runnable {
+        private Inner1() {
+        }
+        private Runnable lambda1 = () -> {
+        };
+        private void function() {
+        }
+        @Override
+        public void run() {
+        }
+    }
+
+    private static class Inner2 {
+        private Runnable lambda1 = () -> {
+        };
+        private static void staticFunction() {
+        }
+    }
+
+    private class Inner3 {
+        public void function() {
+        }
+    }
+
+    private class Inner4 extends Inner3 {
+        @Override
+        public void function() {
+            Runnable r = super::function;
+        }
+    }
+
+    private static int function(Integer...vararg) {
+        return 0;
+    }
+
+    {
+        Inner1 inner = new Inner1();
+        Runnable l1 = inner::function;
+        Runnable l2 = Inner1::new;
+        inner.lambda1 = inner::function;
+        Comparator<Integer> c = BridgeMethodsForLambdaTest::function;
+        IntStream.of(2).mapToObj(int[]::new);
+    }
+
+    static {
+        Inner2 inner = new Inner2();
+        Runnable l1 = Inner2::staticFunction;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/EnumTest.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044537
+ * @summary Checking ACC_SYNTHETIC flag is generated for enum members.
+ * @library /tools/lib /tools/javac/lib ../lib
+ * @build TestBase TestResult InMemoryFileManager ToolBox
+ * @build EnumTest SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @run main SyntheticTestDriver EnumTest
+ */
+
+/**
+ * Synthetic members:
+ * 1. field $VALUES.
+ */
+@ExpectedClass(className = "EnumTest",
+        expectedMethods = {"values()", "valueOf(java.lang.String)", "<clinit>()", "<init>(java.lang.String, int)"},
+        expectedFields = {"A", "B"},
+        expectedNumberOfSyntheticFields = 1)
+public enum EnumTest {
+    A, B
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/ExpectedClass.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Repeatable(ExpectedClasses.class)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ExpectedClass {
+    String className();
+    String[] expectedMethods() default {};
+    String[] expectedFields() default {};
+    int expectedNumberOfSyntheticMethods() default 0;
+    int expectedNumberOfSyntheticFields() default 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/ExpectedClasses.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ExpectedClasses {
+    ExpectedClass[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044537
+ * @summary Checking ACC_SYNTHETIC flag is generated for package-info.
+ * @library /tools/lib /tools/javac/lib ../lib
+ * @build TestBase TestResult InMemoryFileManager ToolBox
+ * @build SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @compile -Xpkginfo:always package_info_test/package-info.java
+ * @run main SyntheticTestDriver package_info_test.package-info 1
+ */
+
+public class PackageInfoTest {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/SyntheticTestDriver.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,212 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.*;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.regex.*;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import com.sun.tools.classfile.*;
+
+/**
+ * The tests work as follows. Firstly, it looks through the test cases
+ * and extracts the appropriate compiled classes. Each test case contains
+ * a set of expected classes, methods and fields. Those class members must not have
+ * the Synthetic attribute, while other found classes, methods and fields must have
+ * the Synthetic attribute if they are not in the set of expected class members.
+ *
+ * Each test executes SyntheticTestDriver specifying the name of test cases and
+ * the number of expected synthetic classes. Each test class is annotated by
+ * annotations which contains non-synthetic class members.
+ *
+ * See the appropriate class for more information about a test case.
+ */
+public class SyntheticTestDriver extends TestResult {
+
+    private static final String ACC_SYNTHETIC = "ACC_SYNTHETIC";
+
+    private final String testCaseName;
+    private final Map<String, ClassFile> classes;
+    private final Map<String, ExpectedClass> expectedClasses;
+
+    public static void main(String[] args)
+            throws TestFailedException, ConstantPoolException, IOException, ClassNotFoundException {
+        if (args.length != 1 && args.length != 2) {
+            throw new IllegalArgumentException("Usage: SyntheticTestDriver <class-name> [<number-of-synthetic-classes>]");
+        }
+        int numberOfSyntheticClasses = args.length == 1 ? 0 : Integer.parseInt(args[1]);
+        new SyntheticTestDriver(args[0]).test(numberOfSyntheticClasses);
+    }
+
+    public SyntheticTestDriver(String testCaseName) throws IOException, ConstantPoolException, ClassNotFoundException {
+        Class<?> clazz = Class.forName(testCaseName);
+        this.testCaseName = testCaseName;
+        this.expectedClasses = Stream.of(clazz.getAnnotationsByType(ExpectedClass.class))
+                .collect(Collectors.toMap(ExpectedClass::className, Function.identity()));
+        this.classes = new HashMap<>();
+        Path classDir = getClassDir().toPath();
+        Pattern filePattern = Pattern.compile(Pattern.quote(testCaseName.replace('.', File.separatorChar)) + ".*\\.class");
+        List<Path> paths = Files.walk(classDir)
+                .map(p -> classDir.relativize(p.toAbsolutePath()))
+                .filter(p -> filePattern.matcher(p.toString()).matches())
+                .collect(Collectors.toList());
+        for (Path path : paths) {
+            String className = path.toString().replace(".class", "").replace(File.separatorChar, '.');
+            classes.put(className, readClassFile(classDir.resolve(path).toFile()));
+        }
+        if (classes.isEmpty()) {
+            throw new RuntimeException("Classes have not been found.");
+        }
+        boolean success = classes.entrySet().stream()
+                .allMatch(e -> e.getKey().startsWith(testCaseName));
+        if (!success) {
+            classes.forEach((className, $) -> printf("Found class: %s\n", className));
+            throw new RuntimeException("Found classes are not from the test case : " + testCaseName);
+        }
+    }
+
+    private String getMethodName(ClassFile classFile, Method method)
+            throws ConstantPoolException, Descriptor.InvalidDescriptor {
+        String methodName = method.getName(classFile.constant_pool);
+        String parameters = method.descriptor.getParameterTypes(classFile.constant_pool);
+        return methodName + parameters;
+    }
+
+    public void test(int expectedNumberOfSyntheticClasses) throws TestFailedException {
+        try {
+            addTestCase(testCaseName);
+            Set<String> foundClasses = new HashSet<>();
+
+            int numberOfSyntheticClasses = 0;
+            for (Map.Entry<String, ClassFile> entry : classes.entrySet()) {
+                String className = entry.getKey();
+                ClassFile classFile = entry.getValue();
+                foundClasses.add(className);
+                if (testAttribute(
+                        classFile,
+                        () -> (Synthetic_attribute) classFile.getAttribute(Attribute.Synthetic),
+                        classFile.access_flags::getClassFlags,
+                        expectedClasses.keySet(),
+                        className,
+                        "Testing class " + className)) {
+                    ++numberOfSyntheticClasses;
+                }
+                ExpectedClass expectedClass = expectedClasses.get(className);
+                Set<String> expectedMethods = expectedClass != null
+                        ? toSet(expectedClass.expectedMethods())
+                        : new HashSet<>();
+                int numberOfSyntheticMethods = 0;
+                Set<String> foundMethods = new HashSet<>();
+                for (Method method : classFile.methods) {
+                    String methodName = getMethodName(classFile, method);
+                    foundMethods.add(methodName);
+                    if (testAttribute(
+                            classFile,
+                            () -> (Synthetic_attribute) method.attributes.get(Attribute.Synthetic),
+                            method.access_flags::getMethodFlags,
+                            expectedMethods,
+                            methodName,
+                            "Testing method " + methodName + " in class "
+                                    + className)) {
+                        ++numberOfSyntheticMethods;
+                    }
+                }
+                checkContains(foundMethods, expectedMethods,
+                        "Checking that all methods of class " + className
+                                + " without Synthetic attribute have been found");
+                checkEquals(numberOfSyntheticMethods,
+                        expectedClass == null ? 0 : expectedClass.expectedNumberOfSyntheticMethods(),
+                        "Checking number of synthetic methods in class: " + className);
+
+                Set<String> expectedFields = expectedClass != null
+                        ? toSet(expectedClass.expectedFields())
+                        : new HashSet<>();
+                int numberOfSyntheticFields = 0;
+                Set<String> foundFields = new HashSet<>();
+                for (Field field : classFile.fields) {
+                    String fieldName = field.getName(classFile.constant_pool);
+                    foundFields.add(fieldName);
+                    if (testAttribute(
+                            classFile,
+                            () -> (Synthetic_attribute) field.attributes.get(Attribute.Synthetic),
+                            field.access_flags::getFieldFlags,
+                            expectedFields,
+                            fieldName,
+                            "Testing field " + fieldName + " in class "
+                                    + className)) {
+                        ++numberOfSyntheticFields;
+                    }
+                }
+                checkContains(foundFields, expectedFields,
+                        "Checking that all fields of class " + className
+                                + " without Synthetic attribute have been found");
+                checkEquals(numberOfSyntheticFields,
+                        expectedClass == null ? 0 : expectedClass.expectedNumberOfSyntheticFields(),
+                        "Checking number of synthetic fields in class: " + className);
+            }
+            checkContains(foundClasses, expectedClasses.keySet(),
+                    "Checking that all classes have been found");
+            checkEquals(numberOfSyntheticClasses, expectedNumberOfSyntheticClasses,
+                    "Checking number of synthetic classes");
+        } catch (Exception e) {
+            addFailure(e);
+        } finally {
+            checkStatus();
+        }
+    }
+
+    private boolean testAttribute(ClassFile classFile,
+                               Supplier<Synthetic_attribute> getSyntheticAttribute,
+                               Supplier<Set<String>> getAccessFlags,
+                               Set<String> expectedMembers, String memberName,
+                               String info) throws ConstantPoolException {
+        echo(info);
+        String className = classFile.getName();
+        Synthetic_attribute attr = getSyntheticAttribute.get();
+        Set<String> flags = getAccessFlags.get();
+        if (expectedMembers.contains(memberName)) {
+            checkNull(attr, "Member must not have synthetic attribute : "
+                    + memberName);
+            checkFalse(flags.contains(ACC_SYNTHETIC),
+                    "Member must not have synthetic flag : " + memberName
+                            + " in class : " + className);
+            return false;
+        } else {
+            return checkNull(attr, "Synthetic attribute should not be generated")
+                    && checkTrue(flags.contains(ACC_SYNTHETIC), "Member must have synthetic flag : "
+                                + memberName + " in class : " + className);
+        }
+    }
+
+    private Set<String> toSet(String[] strings) {
+        HashSet<String> set = new HashSet<>();
+        Collections.addAll(set, strings);
+        return set;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8044537
+ * @summary Checking ACC_SYNTHETIC flag is generated for "this$0" field.
+ * @library /tools/lib /tools/javac/lib ../lib
+ * @build TestBase TestResult InMemoryFileManager ToolBox
+ * @build ThisFieldTest SyntheticTestDriver ExpectedClass ExpectedClasses
+ * @run main SyntheticTestDriver ThisFieldTest
+ */
+
+/**
+ * Synthetic members:
+ * 1. fields this$0 for local and anonymous classes.
+ */
+@ExpectedClass(className = "ThisFieldTest",
+        expectedMethods = "<init>()")
+@ExpectedClass(className = "ThisFieldTest$1Local",
+        expectedMethods = "<init>(ThisFieldTest)",
+        expectedNumberOfSyntheticFields = 1)
+@ExpectedClass(className = "ThisFieldTest$1",
+        expectedMethods = "<init>(ThisFieldTest)",
+        expectedNumberOfSyntheticFields = 1)
+public class ThisFieldTest {
+    {
+        class Local {
+        }
+
+        new Local() {
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/classfiles/attributes/Synthetic/package_info_test/package-info.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package package_info_test;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/completionDeps/DepsAndAnno.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8078600
+ * @summary Make sure -XDcompletionDeps does not cause an infinite loop.
+ * @library /tools/lib
+ * @build ToolBox
+ * @run main/othervm/timeout=10 DepsAndAnno
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+public class DepsAndAnno {
+
+    @Target(ElementType.METHOD)
+    @interface Test { }
+
+    public static void main(String[] args) {
+        ToolBox toolBox = new ToolBox();
+        toolBox.new JavacTask(ToolBox.Mode.CMDLINE)
+               .options("-XDcompletionDeps")
+               .outdir(".")
+               .files(ToolBox.testSrc + "/DepsAndAnno.java")
+               .run();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/completionDeps/DepsAndDocLint.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8078389
+ * @summary Make sure there is no interference between completionDeps and doclint
+ * @compile -XDcompletionDeps -Xdoclint DepsAndDocLint.java
+ */
+
+public class DepsAndDocLint {
+}
--- a/test/tools/javac/diags/examples.not-yet.txt	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/diags/examples.not-yet.txt	Thu May 07 16:02:41 2015 -0700
@@ -93,7 +93,6 @@
 compiler.misc.verbose.retro.with.list                   # UNUSED
 compiler.misc.version.not.available                     # JavaCompiler; implies build error
 compiler.misc.where.description.captured
-compiler.misc.where.description.intersection.1
 compiler.misc.where.typevar.1
 compiler.misc.wrong.version                             # ClassReader
 compiler.warn.annotation.method.not.found               # ClassReader
@@ -115,3 +114,4 @@
 compiler.err.cant.inherit.from.anon                     # error for subclass of anonymous class
 compiler.misc.bad.class.file                            # class file is malformed
 compiler.misc.bad.const.pool.entry                      # constant pool entry has wrong type
+compiler.misc.incompatible.upper.eq.bounds
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/InvalidTypeContextRepeatableAnnotation.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.invalid.repeatable.annotation.not.applicable.in.context
+
+
+import java.lang.annotation.*;
+
+@Target({ElementType.TYPE_USE, ElementType.METHOD, ElementType.TYPE_PARAMETER})
+@Repeatable(TC.class)
+@interface T { int value(); }
+
+@Target({ElementType.METHOD, ElementType.TYPE_PARAMETER})
+@interface TC { T[] value(); }
+
+public class InvalidTypeContextRepeatableAnnotation {
+    void method() {
+        this.<@T(1) @T(2) String>method2();
+    }
+
+    <@T(3) S> void method2() {
+    }
+}
--- a/test/tools/javac/diags/examples/WhereCaptured.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/diags/examples/WhereCaptured.java	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 // key: compiler.misc.where.description.typevar
 // key: compiler.misc.where.typevar
 // key: compiler.err.cant.apply.symbol
-// key: compiler.misc.inferred.do.not.conform.to.eq.bounds
+// key: compiler.misc.incompatible.eq.bounds
 // key: compiler.misc.captured.type
 // options: -XDdiags=where,simpleNames
 // run: simple
--- a/test/tools/javac/diags/examples/WhereCaptured1.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/diags/examples/WhereCaptured1.java	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 // key: compiler.misc.where.description.typevar
 // key: compiler.misc.where.typevar
 // key: compiler.err.cant.apply.symbol
-// key: compiler.misc.inferred.do.not.conform.to.eq.bounds
+// key: compiler.misc.incompatible.eq.bounds
 // key: compiler.misc.captured.type
 // key: compiler.misc.type.null
 // options: -XDdiags=where,simpleNames
--- a/test/tools/javac/diags/examples/WhereIntersection.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/diags/examples/WhereIntersection.java	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,23 +21,19 @@
  * questions.
  */
 
+// key: compiler.misc.inferred.do.not.conform.to.upper.bounds
+// key: compiler.misc.intersection.type
+// key: compiler.misc.where.description.intersection.1
 // key: compiler.misc.where.intersection
-// key: compiler.misc.where.description.intersection
-// key: compiler.misc.intersection.type
 // key: compiler.err.prob.found.req
-// key: compiler.misc.inferred.do.not.conform.to.upper.bounds
 // options: -XDdiags=where
 // run: simple
 
 class WhereIntersection {
-    interface I1 {}
-    interface I2 {}
-    class A implements I1, I2 {}
-    class B implements I1, I2 {}
-    class Test {
-        <Z> Z m(Z z1, Z z2) { return null; }
-        void main(){
-            A a = m(new A(), new B());
-        }
+    static <T> T f(T a, T b) {
+        return a;
+    }
+    static Object[] main(int a, float b) {
+        return f(a, b);
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/WhereIntersection2.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.intf.expected.here
+// key: compiler.misc.inconvertible.types
+// key: compiler.misc.where.description.typevar
+// key: compiler.misc.where.typevar
+// key: compiler.misc.intersection.type
+// key: compiler.misc.where.description.intersection
+// key: compiler.misc.where.intersection
+// key: compiler.err.prob.found.req
+// options: -XDdiags=where
+// run: simple
+
+class WhereIntersection2 {
+    interface I1 {}
+    interface I2 {}
+    class A implements I1, I2 {}
+    class B implements I1, I2 {}
+    class Test {
+        <Z extends A&B> Z m(Z z1, Z z2) { return null; }
+        <T extends I1 & I2> T m2(){
+            return m(new A(), new B());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/WhereTypeVar2.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.misc.incompatible.upper.lower.bounds
+// key: compiler.misc.where.description.typevar
+// key: compiler.misc.where.typevar
+// key: compiler.err.prob.found.req
+// options: -XDdiags=where
+// run: simple
+
+class WhereTypeVar2 {
+    interface I1 {}
+    interface I2 {}
+    class A implements I1, I2 {}
+    class B implements I1, I2 {}
+    class Test {
+        <Z> Z m(Z z1, Z z2) { return null; }
+        void main(){
+            A a = m(new A(), new B());
+        }
+    }
+}
--- a/test/tools/javac/generics/diamond/6939780/T6939780_9.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/diamond/6939780/T6939780_9.out	Thu May 07 16:02:41 2015 -0700
@@ -3,11 +3,11 @@
 T6939780.java:23:28: compiler.warn.diamond.redundant.args.1: T6939780.Foo<java.lang.Integer>, T6939780.Foo<java.lang.Number>
 T6939780.java:24:33: compiler.warn.diamond.redundant.args
 T6939780.java:25:28: compiler.warn.diamond.redundant.args
-T6939780.java:26:28: compiler.warn.diamond.redundant.args
+T6939780.java:26:28: compiler.warn.diamond.redundant.args.1: T6939780.Foo<java.lang.Integer>, T6939780.Foo<java.lang.Number>
 T6939780.java:30:19: compiler.warn.diamond.redundant.args
 T6939780.java:31:19: compiler.warn.diamond.redundant.args
 T6939780.java:32:19: compiler.warn.diamond.redundant.args.1: T6939780.Foo<java.lang.Integer>, T6939780.Foo<java.lang.Number>
 T6939780.java:33:19: compiler.warn.diamond.redundant.args
 T6939780.java:34:19: compiler.warn.diamond.redundant.args
-T6939780.java:35:19: compiler.warn.diamond.redundant.args
+T6939780.java:35:19: compiler.warn.diamond.redundant.args.1: T6939780.Foo<java.lang.Integer>, T6939780.Foo<java.lang.Number>
 12 warnings
--- a/test/tools/javac/generics/diamond/neg/Neg07.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/diamond/neg/Neg07.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 6939620 7020044 8062373
+ * @bug 6939620 7020044 8062373 8078024
  *
  * @summary  Check that diamond works where LHS is supertype of RHS (1-ary constructor)
  * @author mcimadamore
--- a/test/tools/javac/generics/diamond/neg/Neg07.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/diamond/neg/Neg07.out	Thu May 07 16:02:41 2015 -0700
@@ -1,3 +1,3 @@
-Neg07.java:17:27: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg07.Foo), (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Number)
-Neg07.java:18:27: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg07.Foo), (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Number)
+Neg07.java:17:27: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg07.Foo), (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.String)
+Neg07.java:18:27: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg07.Foo), (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.String)
 2 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/diamond/neg/Neg20.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,36 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8078592
+ * @summary Compiler fails to reject erroneous use of diamond with anonymous classes involving "fresh" type variables.
+ * @compile/fail/ref=Neg20.out Neg20.java -XDrawDiagnostics
+ */
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+public class Neg20 {
+    static class Foo<E extends B<E>> {
+        public Foo<E> complexMethod(E a) {
+            return this;
+        }
+    }
+
+    static class Goo<@T E> {
+        public Goo<E> complexMethod(E a) {
+            return this;
+        }
+    }
+
+    static class B<V> {
+    }
+
+    @Target(ElementType.TYPE_USE)
+    static @interface T {
+    }
+
+    public static void check() {
+        Foo<?> t4 = new Foo<>() {
+        };
+        Goo<?> g4 = new Goo<>() {
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/diamond/neg/Neg20.out	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,2 @@
+Neg20.java:31:28: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg20.Foo), (compiler.misc.diamond.invalid.arg: E, (compiler.misc.diamond: Neg20.Foo))
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/diamond/neg/T8078473.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,18 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8078473
+ * @summary  javac diamond finder crashes when used to build java.base module
+ * @compile/ref=T8078473.out T8078473.java -XDrawDiagnostics -XDfind=diamond
+ */
+
+class T8078473<P, Q> {
+
+    static class C<T, U> {
+        C(T8078473<?, ?> p) {}
+    }
+
+    {
+        new C<Q, Q>(this) {};
+        new C<Q, Q>(this);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/diamond/neg/T8078473.out	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,3 @@
+T8078473.java:15:14: compiler.warn.diamond.redundant.args.1: T8078473.C<Q,Q>, T8078473.C<java.lang.Object,java.lang.Object>
+T8078473.java:16:14: compiler.warn.diamond.redundant.args.1: T8078473.C<Q,Q>, T8078473.C<java.lang.Object,java.lang.Object>
+2 warnings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/diamond/neg/T8078473_2.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,20 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8078473
+ * @summary  javac diamond finder crashes when used to build java.base module
+ * @compile/ref=T8078473_2.out T8078473_2.java -XDrawDiagnostics -XDfind=diamond
+ */
+
+package java.util.stream;
+
+class T8078473_2<P, Q> {
+
+    static class C<T, U> {
+        C(T8078473_2<?, ?> p) {}
+    }
+
+    {
+       new C<Q, Q>(this) {};
+       new C<Q, Q>(this);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/diamond/neg/T8078473_2.out	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,3 @@
+T8078473_2.java:17:13: compiler.warn.diamond.redundant.args.1: java.util.stream.T8078473_2.C<Q,Q>, java.util.stream.T8078473_2.C<java.lang.Object,java.lang.Object>
+T8078473_2.java:18:13: compiler.warn.diamond.redundant.args.1: java.util.stream.T8078473_2.C<Q,Q>, java.util.stream.T8078473_2.C<java.lang.Object,java.lang.Object>
+2 warnings
--- a/test/tools/javac/generics/inference/4941882/T4941882.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/4941882/T4941882.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test    /nodynamiccopyright/
- * @bug     4941882
+ * @bug     4941882 8078024
  * @summary incorrect inference for result of lub(int[], float[])
  * @compile/fail/ref=T4941882.out -XDrawDiagnostics  T4941882.java
  */
--- a/test/tools/javac/generics/inference/4941882/T4941882.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/4941882/T4941882.out	Thu May 07 16:02:41 2015 -0700
@@ -1,2 +1,2 @@
-T4941882.java:13:17: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object&java.io.Serializable&java.lang.Cloneable, java.lang.Object[],java.lang.Object)
+T4941882.java:13:17: compiler.err.prob.found.req: (compiler.misc.incompatible.upper.lower.bounds: T, java.lang.Object[],java.lang.Object, float[],int[])
 1 error
--- a/test/tools/javac/generics/inference/6315770/T6315770.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/6315770/T6315770.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /**
  * @test /nodynamiccopyright/
- * @bug     6315770
+ * @bug     6315770 8078024
  * @summary javac inference allows creation of strange types: Integer & Runnable
  * @author Maurizio Cimadamore
  *
--- a/test/tools/javac/generics/inference/6315770/T6315770.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/6315770/T6315770.out	Thu May 07 16:02:41 2015 -0700
@@ -1,3 +1,3 @@
 T6315770.java:16:42: compiler.err.prob.found.req: (compiler.misc.incompatible.upper.bounds: T, java.lang.String,java.lang.Integer,java.lang.Runnable)
-T6315770.java:17:40: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Integer,java.lang.Runnable)
+T6315770.java:17:40: compiler.err.prob.found.req: (compiler.misc.incompatible.upper.lower.bounds: T, java.lang.Integer,java.lang.Runnable, java.lang.String)
 2 errors
--- a/test/tools/javac/generics/inference/6611449/T6611449.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/6611449/T6611449.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /**
  * @test /nodynamiccopyright/
- * @bug 6611449
+ * @bug 6611449 8078024
  * @summary Internal Error thrown during generic method/constructor invocation
  * @compile/fail/ref=T6611449.out -XDrawDiagnostics T6611449.java
  */
--- a/test/tools/javac/generics/inference/6611449/T6611449.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/6611449/T6611449.out	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
-T6611449.java:18:9: compiler.err.cant.apply.symbols: kindname.constructor, T6611449, int,{(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T), (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S)),(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T,T), (compiler.misc.infer.arg.length.mismatch: T))}
-T6611449.java:19:9: compiler.err.cant.apply.symbols: kindname.constructor, T6611449, int,int,{(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T,T), (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S))}
-T6611449.java:20:9: compiler.err.cant.apply.symbol: kindname.method, m1, T, int, kindname.class, T6611449<S>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S)
-T6611449.java:21:9: compiler.err.cant.apply.symbol: kindname.method, m2, T,T, int,int, kindname.class, T6611449<S>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S)
+T6611449.java:18:9: compiler.err.cant.apply.symbols: kindname.constructor, T6611449, int,{(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T), (compiler.misc.incompatible.upper.lower.bounds: T, S, java.lang.Integer)),(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T,T), (compiler.misc.infer.arg.length.mismatch: T))}
+T6611449.java:19:9: compiler.err.cant.apply.symbols: kindname.constructor, T6611449, int,int,{(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T,T), (compiler.misc.incompatible.upper.lower.bounds: T, S, java.lang.Integer))}
+T6611449.java:20:9: compiler.err.cant.apply.symbol: kindname.method, m1, T, int, kindname.class, T6611449<S>, (compiler.misc.incompatible.upper.lower.bounds: T, S, java.lang.Integer)
+T6611449.java:21:9: compiler.err.cant.apply.symbol: kindname.method, m2, T,T, int,int, kindname.class, T6611449<S>, (compiler.misc.incompatible.upper.lower.bounds: T, S, java.lang.Integer)
 4 errors
--- a/test/tools/javac/generics/inference/6650759/T6650759m.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/6650759/T6650759m.java	Thu May 07 16:02:41 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     6650759
+ * @bug     6650759 8078024
  * @summary Inference of formal type parameter (unused in formal parameters) is not performed
  * @compile/fail/ref=T6650759m.out T6650759m.java -XDrawDiagnostics
  */
--- a/test/tools/javac/generics/inference/6650759/T6650759m.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/6650759/T6650759m.out	Thu May 07 16:02:41 2015 -0700
@@ -1,2 +1,2 @@
-T6650759m.java:43:36: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Integer,java.lang.Object)
+T6650759m.java:43:36: compiler.err.prob.found.req: (compiler.misc.incompatible.upper.lower.bounds: Z, java.lang.Integer,java.lang.Object, java.lang.String)
 1 error
--- a/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8030741
+ * @bug 8030741 8078024
  * @summary Inference: implement eager resolution of return types, consistent with JDK-8028800
  * @compile/fail/ref=EagerReturnTypeResolutionTestb.out -XDrawDiagnostics EagerReturnTypeResolutionTestb.java
  * @author Dan Smith
--- a/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/EagerReturnTypeResolution/EagerReturnTypeResolutionTestb.out	Thu May 07 16:02:41 2015 -0700
@@ -2,37 +2,37 @@
 EagerReturnTypeResolutionTestb.java:43:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I<java.lang.String>, EagerReturnTypeResolutionTestb.I<compiler.misc.type.captureof: 1, ?>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<?>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object))
 EagerReturnTypeResolutionTestb.java:44:29: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<?>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
 EagerReturnTypeResolutionTestb.java:45:26: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<?>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
-EagerReturnTypeResolutionTestb.java:74:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I<java.lang.Integer>, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:74:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
 EagerReturnTypeResolutionTestb.java:75:15: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
 EagerReturnTypeResolutionTestb.java:77:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I<java.lang.String>, EagerReturnTypeResolutionTestb.I<compiler.misc.type.captureof: 1, ? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object))
-EagerReturnTypeResolutionTestb.java:78:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I<java.lang.Integer>, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:78:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
 EagerReturnTypeResolutionTestb.java:79:21: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
 EagerReturnTypeResolutionTestb.java:81:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
-EagerReturnTypeResolutionTestb.java:82:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I<java.lang.Integer>, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:82:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
 EagerReturnTypeResolutionTestb.java:83:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.I<java.lang.Integer>,EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
-EagerReturnTypeResolutionTestb.java:85:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<?>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I<?>, EagerReturnTypeResolutionTestb.I<?>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:85:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<?>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.I<?>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
 EagerReturnTypeResolutionTestb.java:86:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I<java.lang.String>, EagerReturnTypeResolutionTestb.I<compiler.misc.type.captureof: 1, ?>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<?>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object))
-EagerReturnTypeResolutionTestb.java:87:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<?>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I<?>, EagerReturnTypeResolutionTestb.I<?>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:87:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<?>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.I<?>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
 EagerReturnTypeResolutionTestb.java:89:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<?>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
-EagerReturnTypeResolutionTestb.java:90:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<?>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.I<?>, EagerReturnTypeResolutionTestb.I<?>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
-EagerReturnTypeResolutionTestb.java:91:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.J<java.lang.Integer>, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:90:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.I<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.I<?>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.I<?>,EagerReturnTypeResolutionTestb.I<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:91:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>)
 EagerReturnTypeResolutionTestb.java:92:15: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>,java.lang.Object)
 EagerReturnTypeResolutionTestb.java:94:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I<java.lang.String>, EagerReturnTypeResolutionTestb.J<compiler.misc.type.captureof: 1, ? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.J<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object))
-EagerReturnTypeResolutionTestb.java:95:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.J<java.lang.Integer>, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:95:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>)
 EagerReturnTypeResolutionTestb.java:96:21: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>,java.lang.Object)
 EagerReturnTypeResolutionTestb.java:98:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.J<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
-EagerReturnTypeResolutionTestb.java:99:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.J<java.lang.Integer>, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:99:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>)
 EagerReturnTypeResolutionTestb.java:100:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.J<java.lang.Integer>,EagerReturnTypeResolutionTestb.J<java.lang.String>,java.lang.Object)
-EagerReturnTypeResolutionTestb.java:102:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.String>)
-EagerReturnTypeResolutionTestb.java:103:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.String>)
-EagerReturnTypeResolutionTestb.java:104:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.String>)
-EagerReturnTypeResolutionTestb.java:105:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>)
+EagerReturnTypeResolutionTestb.java:102:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:103:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:104:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.String>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.String>)
+EagerReturnTypeResolutionTestb.java:105:15: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>)
 EagerReturnTypeResolutionTestb.java:106:15: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>,java.lang.Object)
 EagerReturnTypeResolutionTestb.java:108:9: compiler.err.cant.apply.symbol: kindname.method, takeIString, EagerReturnTypeResolutionTestb.I<java.lang.String>, EagerReturnTypeResolutionTestb.I<compiler.misc.type.captureof: 1, ? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object))
-EagerReturnTypeResolutionTestb.java:109:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>)
+EagerReturnTypeResolutionTestb.java:109:21: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>)
 EagerReturnTypeResolutionTestb.java:110:21: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>,java.lang.Object)
 EagerReturnTypeResolutionTestb.java:112:30: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: EagerReturnTypeResolutionTestb.I<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>>, EagerReturnTypeResolutionTestb.I<java.lang.String>,java.lang.Object)
-EagerReturnTypeResolutionTestb.java:113:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.inferred.do.not.conform.to.eq.bounds: EagerReturnTypeResolutionTestb.K, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>)
+EagerReturnTypeResolutionTestb.java:113:24: compiler.err.cant.apply.symbol: kindname.method, eq2, java.util.List<T>,java.util.List<T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.eq.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>)
 EagerReturnTypeResolutionTestb.java:114:24: compiler.err.cant.apply.symbol: kindname.method, upper2, java.util.List<? super T>,java.util.List<? super T>, java.util.List<EagerReturnTypeResolutionTestb.J<java.lang.Integer>>,java.util.List<EagerReturnTypeResolutionTestb.K>, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.incompatible.upper.bounds: T, EagerReturnTypeResolutionTestb.K,EagerReturnTypeResolutionTestb.J<java.lang.Integer>,java.lang.Object)
 EagerReturnTypeResolutionTestb.java:174:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer.no.conforming.instance.exists: , T, long))
 EagerReturnTypeResolutionTestb.java:175:9: compiler.err.cant.apply.symbol: kindname.method, takeLong, long, java.lang.Double, kindname.class, EagerReturnTypeResolutionTestb, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer.no.conforming.instance.exists: , T, long))
--- a/test/tools/javac/generics/inference/EagerReturnTypeResolution/PrimitiveTypeBoxingTest.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/EagerReturnTypeResolution/PrimitiveTypeBoxingTest.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8030741
+ * @bug 8030741 8078024
  * @summary Inference: implement eager resolution of return types, consistent with JDK-8028800
  * @compile/fail/ref=PrimitiveTypeBoxingTest.out -XDrawDiagnostics PrimitiveTypeBoxingTest.java
  */
--- a/test/tools/javac/generics/inference/EagerReturnTypeResolution/PrimitiveTypeBoxingTest.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/inference/EagerReturnTypeResolution/PrimitiveTypeBoxingTest.out	Thu May 07 16:02:41 2015 -0700
@@ -1,3 +1,3 @@
-PrimitiveTypeBoxingTest.java:19:9: compiler.err.cant.apply.symbol: kindname.method, m1, PrimitiveTypeBoxingTest.F<Z>,Z, @490,int, kindname.class, PrimitiveTypeBoxingTest, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, java.lang.Long,java.lang.Object)
-PrimitiveTypeBoxingTest.java:20:9: compiler.err.cant.apply.symbol: kindname.method, m2, Z,PrimitiveTypeBoxingTest.F<Z>, int,@559, kindname.class, PrimitiveTypeBoxingTest, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, java.lang.Long,java.lang.Object)
+PrimitiveTypeBoxingTest.java:19:9: compiler.err.cant.apply.symbol: kindname.method, m1, PrimitiveTypeBoxingTest.F<Z>,Z, @498,int, kindname.class, PrimitiveTypeBoxingTest, (compiler.misc.incompatible.upper.lower.bounds: Z, java.lang.Long,java.lang.Object, java.lang.Integer)
+PrimitiveTypeBoxingTest.java:20:9: compiler.err.cant.apply.symbol: kindname.method, m2, Z,PrimitiveTypeBoxingTest.F<Z>, int,@567, kindname.class, PrimitiveTypeBoxingTest, (compiler.misc.incompatible.upper.lower.bounds: Z, java.lang.Long,java.lang.Object, java.lang.Integer)
 2 errors
--- a/test/tools/javac/generics/wildcards/6762569/T6762569b.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/wildcards/6762569/T6762569b.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test    /nodynamiccopyright/
- * @bug     6762569
+ * @bug     6762569 8078024
  * @summary Javac crashes with AssertionError in Types.containedBy
  * @compile/fail/ref=T6762569b.out -XDrawDiagnostics  T6762569b.java
  */
--- a/test/tools/javac/generics/wildcards/6762569/T6762569b.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/generics/wildcards/6762569/T6762569b.out	Thu May 07 16:02:41 2015 -0700
@@ -1,2 +1,2 @@
-T6762569b.java:13:9: compiler.err.cant.apply.symbol: kindname.method, m, T,java.util.List<? super java.util.List<T>>, java.lang.String,java.util.List<compiler.misc.type.captureof: 1, ? super java.util.List<? extends java.lang.Number>>, kindname.class, T6762569b, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Number,java.lang.Object)
+T6762569b.java:13:9: compiler.err.cant.apply.symbol: kindname.method, m, T,java.util.List<? super java.util.List<T>>, java.lang.String,java.util.List<compiler.misc.type.captureof: 1, ? super java.util.List<? extends java.lang.Number>>, kindname.class, T6762569b, (compiler.misc.incompatible.upper.lower.bounds: T, java.lang.Number,java.lang.Object, java.lang.String)
 1 error
--- a/test/tools/javac/lambda/8016177/T8016177g.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/8016177/T8016177g.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8016081 8016178 8069545
+ * @bug 8016081 8016178 8069545 8078024
  * @summary structural most specific and stuckness
  * @compile/fail/ref=T8016177g.out -XDrawDiagnostics T8016177g.java
  */
--- a/test/tools/javac/lambda/8016177/T8016177g.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/8016177/T8016177g.out	Thu May 07 16:02:41 2015 -0700
@@ -1,3 +1,3 @@
-T8016177g.java:34:14: compiler.err.cant.apply.symbol: kindname.method, print, java.lang.String, Test.Person, kindname.class, Test, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inferred.do.not.conform.to.upper.bounds: Test.Person, java.lang.String,java.lang.Object))
+T8016177g.java:34:14: compiler.err.cant.apply.symbol: kindname.method, print, java.lang.String, Test.Person, kindname.class, Test, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.upper.lower.bounds: R, java.lang.String,java.lang.Object, Test.Person))
 T8016177g.java:35:20: compiler.err.cant.apply.symbol: kindname.method, abs, int, java.lang.Double, kindname.class, Test, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.infer.no.conforming.instance.exists: , R, int))
 2 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/AvoidInfiniteReattribution.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8077605
+ * @summary Check that when an exception occurs during Attr.visitLambda, an attempt to attribute
+            the lambda again is avoided rather than falling into an infinite recursion.
+ */
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+
+import com.sun.tools.javac.api.JavacTaskImpl;
+import com.sun.tools.javac.api.JavacTool;
+import com.sun.tools.javac.comp.Attr;
+import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Context.Factory;
+
+public class AvoidInfiniteReattribution {
+
+    public static void main(String... args) throws Exception {
+        new AvoidInfiniteReattribution().run();
+    }
+
+    void run() throws IOException {
+        JavacTool tool = JavacTool.create();
+        JavaSource source = new JavaSource("class Test {" +
+                                           "    I i = STOP -> {};" +
+                                           "    interface I {" +
+                                           "        public void test(int i) {}" +
+                                           "    }" +
+                                           "}");
+        Context context = new Context();
+        CrashingAttr.preRegister(context);
+        List<JavaSource> inputs = Arrays.asList(source);
+        JavacTaskImpl task =
+                (JavacTaskImpl) tool.getTask(null, null, null, null, null, inputs, context);
+        try {
+            task.analyze(null);
+            throw new AssertionError("Expected exception not seen.");
+        } catch (StopException ex) {
+            //ok
+        }
+    }
+
+    static class CrashingAttr extends Attr {
+
+        static void preRegister(Context context) {
+            context.put(attrKey, (Factory<Attr>) c -> new CrashingAttr(c));
+        }
+
+        CrashingAttr(Context context) {
+            super(context);
+        }
+
+        @Override public void visitVarDef(JCVariableDecl tree) {
+            if (tree.name.contentEquals("STOP"))
+                throw new StopException();
+            super.visitVarDef(tree);
+        }
+    }
+
+    static class StopException extends NullPointerException {}
+
+    class JavaSource extends SimpleJavaFileObject {
+
+        String source;
+
+        JavaSource(String source) {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+            this.source = source;
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return source;
+        }
+
+    }
+
+}
--- a/test/tools/javac/lambda/MethodReference41.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference41.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8003280
+ * @bug 8003280 8078024
  * @summary Add lambda tests
  *  check that diamond inference is applied when using raw constructor reference qualifier
  * @compile/fail/ref=MethodReference41.out -XDrawDiagnostics MethodReference41.java
--- a/test/tools/javac/lambda/MethodReference41.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference41.out	Thu May 07 16:02:41 2015 -0700
@@ -1,4 +1,4 @@
-MethodReference41.java:38:11: compiler.err.cant.apply.symbol: kindname.method, m1, MethodReference41.SAM1, @767, kindname.class, MethodReference41, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.String, kindname.class, MethodReference41.Foo<X>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Number))))
-MethodReference41.java:40:11: compiler.err.cant.apply.symbol: kindname.method, m3, MethodReference41.SAM3, @811, kindname.class, MethodReference41, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.Object, kindname.class, MethodReference41.Foo<X>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object, java.lang.Number))))
+MethodReference41.java:38:11: compiler.err.cant.apply.symbol: kindname.method, m1, MethodReference41.SAM1, @775, kindname.class, MethodReference41, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.String, kindname.class, MethodReference41.Foo<X>, (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.String))))
+MethodReference41.java:40:11: compiler.err.cant.apply.symbol: kindname.method, m3, MethodReference41.SAM3, @819, kindname.class, MethodReference41, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.Object, kindname.class, MethodReference41.Foo<X>, (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.Object))))
 MethodReference41.java:41:9: compiler.err.ref.ambiguous: m4, kindname.method, m4(MethodReference41.SAM2), MethodReference41, kindname.method, m4(MethodReference41.SAM3), MethodReference41
 3 errors
--- a/test/tools/javac/lambda/MethodReference43.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference43.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8003280
+ * @bug 8003280 8078024
  * @summary Add lambda tests
  *  check that diamond inference is applied when using raw constructor reference qualifier
  * @compile/fail/ref=MethodReference43.out -XDrawDiagnostics MethodReference43.java
--- a/test/tools/javac/lambda/MethodReference43.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference43.out	Thu May 07 16:02:41 2015 -0700
@@ -1,5 +1,5 @@
-MethodReference43.java:45:11: compiler.err.cant.apply.symbol: kindname.method, m1, MethodReference43.SAM1, @897, kindname.class, MethodReference43, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.String, kindname.class, MethodReference43.Foo<X>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Number))))
-MethodReference43.java:47:11: compiler.err.cant.apply.symbol: kindname.method, m3, MethodReference43.SAM3, @941, kindname.class, MethodReference43, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.Object, kindname.class, MethodReference43.Foo<X>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object, java.lang.Number))))
+MethodReference43.java:45:11: compiler.err.cant.apply.symbol: kindname.method, m1, MethodReference43.SAM1, @905, kindname.class, MethodReference43, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.String, kindname.class, MethodReference43.Foo<X>, (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.String))))
+MethodReference43.java:47:11: compiler.err.cant.apply.symbol: kindname.method, m3, MethodReference43.SAM3, @949, kindname.class, MethodReference43, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.Object, kindname.class, MethodReference43.Foo<X>, (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.Object))))
 MethodReference43.java:49:9: compiler.err.ref.ambiguous: m5, kindname.method, m5(MethodReference43.SAM3), MethodReference43, kindname.method, m5(MethodReference43.SAM4), MethodReference43
-MethodReference43.java:49:11: compiler.err.cant.apply.symbol: kindname.method, m5, MethodReference43.SAM3, @985, kindname.class, MethodReference43, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.Object, kindname.class, MethodReference43.Foo<X>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object, java.lang.Number))))
+MethodReference43.java:49:11: compiler.err.cant.apply.symbol: kindname.method, m5, MethodReference43.SAM3, @993, kindname.class, MethodReference43, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Foo, java.lang.Number, java.lang.Object, kindname.class, MethodReference43.Foo<X>, (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.Object))))
 4 errors
--- a/test/tools/javac/lambda/MethodReference46.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference46.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8003280
+ * @bug 8003280 8078024
  * @summary Add lambda tests
  *  check that generic method reference is inferred when type parameters are omitted
  * @compile/fail/ref=MethodReference46.out -XDrawDiagnostics MethodReference46.java
--- a/test/tools/javac/lambda/MethodReference46.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference46.out	Thu May 07 16:02:41 2015 -0700
@@ -1,4 +1,4 @@
-MethodReference46.java:40:11: compiler.err.cant.apply.symbol: kindname.method, g1, MethodReference46.SAM1, @809, kindname.class, MethodReference46, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m, X, java.lang.String, kindname.class, MethodReference46, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Number))))
-MethodReference46.java:42:11: compiler.err.cant.apply.symbol: kindname.method, g3, MethodReference46.SAM3, @877, kindname.class, MethodReference46, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m, X, java.lang.Object, kindname.class, MethodReference46, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object, java.lang.Number))))
+MethodReference46.java:40:11: compiler.err.cant.apply.symbol: kindname.method, g1, MethodReference46.SAM1, @817, kindname.class, MethodReference46, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m, X, java.lang.String, kindname.class, MethodReference46, (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.String))))
+MethodReference46.java:42:11: compiler.err.cant.apply.symbol: kindname.method, g3, MethodReference46.SAM3, @885, kindname.class, MethodReference46, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m, X, java.lang.Object, kindname.class, MethodReference46, (compiler.misc.incompatible.upper.lower.bounds: X, java.lang.Number, java.lang.Object))))
 MethodReference46.java:43:9: compiler.err.ref.ambiguous: g4, kindname.method, g4(MethodReference46.SAM2), MethodReference46, kindname.method, g4(MethodReference46.SAM3), MethodReference46
 3 errors
--- a/test/tools/javac/lambda/MethodReference58.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference58.java	Thu May 07 16:02:41 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8004102
+ * @bug 8004102 8078024
  * @summary Add support for generic functional descriptors
  * @compile/fail/ref=MethodReference58.out -XDrawDiagnostics MethodReference58.java
  */
--- a/test/tools/javac/lambda/MethodReference58.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference58.out	Thu May 07 16:02:41 2015 -0700
@@ -1,2 +1,2 @@
-MethodReference58.java:41:23: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, g, Z, X, kindname.class, MethodReference58, (compiler.misc.inferred.do.not.conform.to.upper.bounds: X, java.lang.Number)))
+MethodReference58.java:41:23: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, g, Z, X, kindname.class, MethodReference58, (compiler.misc.incompatible.upper.lower.bounds: Z, java.lang.Number, X)))
 1 error
--- a/test/tools/javac/lambda/MethodReference68.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference68.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8016175
+ * @bug 8016175 8078024
  * @summary Add bottom-up type-checking support for unambiguous method references
  * @compile/fail/ref=MethodReference68.out -XDrawDiagnostics MethodReference68.java
  */
--- a/test/tools/javac/lambda/MethodReference68.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/MethodReference68.out	Thu May 07 16:02:41 2015 -0700
@@ -1,2 +1,2 @@
-MethodReference68.java:21:10: compiler.err.cant.apply.symbol: kindname.method, g, MethodReference68.F<Z>,Z[], @493,int, kindname.class, MethodReference68, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, MethodReference68.Foo,java.lang.Object)
+MethodReference68.java:21:10: compiler.err.cant.apply.symbol: kindname.method, g, MethodReference68.F<Z>,Z[], @501,int, kindname.class, MethodReference68, (compiler.misc.incompatible.upper.lower.bounds: Z, MethodReference68.Foo,java.lang.Object, java.lang.Integer)
 1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8077605.java	Thu May 07 16:02:41 2015 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8077605
+ * @summary Lambda with parameters in field initializer should not break compilation
+ *          (MemberEnter.needsLazyConstValue should detect the initializer cannot be a constant)
+ * @compile T8077605.java
+ */
+
+public class T8077605 {
+    static final String C = "" + m(str -> str);
+
+    private static String m(I function) {
+        return null;
+    }
+
+    interface I {
+        public String run(String str);
+    }
+}
+
--- a/test/tools/javac/lambda/TargetType02.java	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/TargetType02.java	Thu May 07 16:02:41 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8003280 8029718
+ * @bug 8003280 8029718 8078024
  * @summary Add lambda tests
  *  check overload resolution and target type inference w.r.t. generic methods
  * Should always use lambda body structure to disambiguate overload resolution
--- a/test/tools/javac/lambda/TargetType02.out	Tue May 05 11:04:37 2015 -0300
+++ b/test/tools/javac/lambda/TargetType02.out	Thu May 07 16:02:41 2015 -0700
@@ -1,4 +1,4 @@
-TargetType02.java:33:14: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, java.lang.String)
+TargetType02.java:33:14: compiler.err.prob.found.req: (compiler.misc.incompatible.upper.lower.bounds: Z, java.lang.String, java.lang.Integer)
 TargetType02.java:34:9: compiler.err.ref.ambiguous: call3, kindname.method, <Z>call3(TargetType02.S1<Z>), TargetType02, kindname.method, <Z>call3(TargetType02.S2<Z>), TargetType02
 TargetType02.java:35:9: compiler.err.ref.ambiguous: call3, kindname.method, <Z>call3(TargetType02.S1<Z>), TargetType02, kindname.method, <Z>call3(TargetType02.S2<Z>), TargetType02
 TargetType02.java:37:20: compiler.err.ref.ambiguous: call4, kindname.method, <Z>call4(TargetType02.S1<Z>), TargetType02, kindname.method, <Z>call4(TargetType02.S2<Z>), TargetType02