changeset 1190:54b1383d794c

Merge
author andrew
date Wed, 15 Feb 2012 17:09:06 +0000
parents 993f08cc9771 (current diff) 4672e092f096 (diff)
children e3537a4f75c7
files .hgtags test/jprt.config
diffstat 88 files changed, 1633 insertions(+), 435 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Feb 13 16:21:45 2012 +0000
+++ b/.hgtags	Wed Feb 15 17:09:06 2012 +0000
@@ -146,3 +146,14 @@
 f474527e77e4797d78bd6c3b31923fddcfd9d5c6 jdk7u2-b13
 fc0769df8cd03fffc38c7a1ab6b2e2e7cc2506a8 jdk7u2-b21
 58f6a950cd726220e81eddb126ca5c57e3b368f2 icedtea-2.1-branchpoint
+8851e7f3721f8f756cc9f5731600a152506542db jdk7u4-b200
+358c42289352a2288084039e7c9d3f134c9c29e9 jdk7u4-b04
+8556ecc20a5b32ae7f336ecf3c420d7feb88d323 jdk7u4-b02
+62ee502a464924d68d398899570c1ad27fbe6cc4 jdk7u4-b05
+083eac71addfccb75f2794b8b5ab5a74c10e005d jdk7u4-b06
+c864786394dc3d78c1d155d8cd62faf3385a7bc0 jdk7u4-b225
+10a63f9cdcb9bbbcc1a5780c19a23087e216db40 jdk7u4-b07
+4be7205dae8923fc7906925a2ba30df55de6770c jdk7u4-b08
+1bee7edbb4b455dd6c2a4ef9d08d28dd63fde59b jdk7u4-b227
+cbd359dd543961530565a0b261be418ded02e664 jdk7u4-b09
+8919b2b02fcba65f833c68374f3bfdd9bc3ba814 jdk7u4-b10
--- a/make/jprt.properties	Mon Feb 13 16:21:45 2012 +0000
+++ b/make/jprt.properties	Wed Feb 15 17:09:06 2012 +0000
@@ -25,12 +25,39 @@
 
 # Properties for jprt
 
-# Use whatever release that the submitted job requests
-jprt.tools.default.release=${jprt.submit.release}
+# Locked down to jdk7
+jprt.tools.default.release=jdk7
 
 # The different build flavors we want, we override here so we just get these 2
 jprt.build.flavors=product,fastdebug
 
+# Standard list of jprt build targets for this source tree
+jprt.build.targets=                                             \
+    solaris_sparc_5.10-{product|fastdebug},                     \
+    solaris_sparcv9_5.10-{product|fastdebug},                   \
+    solaris_i586_5.10-{product|fastdebug},                      \
+    solaris_x64_5.10-{product|fastdebug},                       \
+    linux_i586_2.6-{product|fastdebug},                         \
+    linux_x64_2.6-{product|fastdebug},                          \
+    macosx_x64_10.7-{product|fastdebug},                        \
+    windows_i586_5.1-{product|fastdebug},                       \
+    windows_x64_5.2-{product|fastdebug}
+
 # Directories to be excluded from the source bundles
 jprt.bundle.exclude.src.dirs=build dist webrev
 
+# Test target list (no fastdebug & limited c2 testing)
+jprt.my.test.target.set= 					\
+    solaris_sparc_5.10-product-c1-TESTNAME,                     \
+    solaris_sparcv9_5.10-product-c2-TESTNAME,                   \
+    solaris_i586_5.10-product-c1-TESTNAME,                      \
+    solaris_x64_5.10-product-c2-TESTNAME,                       \
+    linux_i586_2.6-product-{c1|c2}-TESTNAME,                    \
+    linux_x64_2.6-product-c2-TESTNAME,                          \
+    macosx_x64_10.7-product-c2-TESTNAME,                        \
+    windows_i586_5.1-product-c1-TESTNAME,                       \
+    windows_x64_5.2-product-c2-TESTNAME
+
+# Default test targets
+jprt.make.rule.test.targets=					\
+    ${jprt.my.test.target.set:TESTNAME=jtreg}
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Wed Feb 15 17:09:06 2012 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, 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
@@ -195,10 +195,7 @@
         ClassUseWriter clsgen;
         String path = DirectoryManager.getDirectoryPath(classdoc.
                                                             containingPackage());
-        if (path.length() > 0) {
-            path += File.separator;
-        }
-        path += "class-use";
+        path += "class-use" + DirectoryManager.URL_FILE_SEPARATOR;
         String filename = classdoc.name() + ".html";
         String pkgname = classdoc.containingPackage().name();
         pkgname += (pkgname.length() > 0)? ".class-use": "class-use";
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java	Wed Feb 15 17:09:06 2012 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, 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
@@ -302,7 +302,9 @@
         Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
                 getResource("doclet.Constants_Summary"));
         Content liConst = HtmlTree.LI(HtmlStyle.blockList, constHead);
-        Content line29 = getResource("doclet.Help_line_29");
+        Content line29 = getResource("doclet.Help_line_29",
+                getHyperLinkString("constant-values.html",
+                configuration.getText("doclet.Constants_Summary")));
         Content constPara = HtmlTree.P(line29);
         liConst.addContent(constPara);
         ul.addContent(liConst);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Wed Feb 15 17:09:06 2012 +0000
@@ -160,7 +160,7 @@
 doclet.Help_line_26=These links show and hide the HTML frames.  All pages are available with or without frames.
 doclet.Help_line_27=The {0} link shows all classes and interfaces except non-static nested types.
 doclet.Help_line_28=Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
-doclet.Help_line_29=The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.
+doclet.Help_line_29=The {0} page lists the static final fields and their values.
 doclet.Help_line_30=This help file applies to API documentation generated using the standard doclet.
 doclet.Help_enum_line_1=Each enum has its own separate page with the following sections:
 doclet.Help_enum_line_2=Enum declaration
@@ -216,6 +216,7 @@
 doclet.Same_package_name_used=Package name format used twice: {0}
 doclet.Serialization.Excluded_Class=Non-transient field {1} uses excluded class {0}.
 doclet.Serialization.Nonexcluded_Class=Non-transient field {1} uses hidden, non-included class {0}.
+doclet.exception_encountered=Exception encountered while processing {1}\n{0}
 doclet.usage=Provided by Standard doclet:\n\
   -d <directory>                    Destination directory for output files\n\
   -use                              Create class and package usage pages\n\
--- a/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Wed Feb 15 17:09:06 2012 +0000
@@ -70,6 +70,7 @@
     private JavaCompiler compiler;
     private Locale locale;
     private String[] args;
+    private String[] classNames;
     private Context context;
     private List<JavaFileObject> fileObjects;
     private Map<JavaFileObject, JCCompilationUnit> notYetEntered;
@@ -82,11 +83,13 @@
 
     JavacTaskImpl(Main compilerMain,
                 String[] args,
+                String[] classNames,
                 Context context,
                 List<JavaFileObject> fileObjects) {
         this.ccw = ClientCodeWrapper.instance(context);
         this.compilerMain = compilerMain;
         this.args = args;
+        this.classNames = classNames;
         this.context = context;
         this.fileObjects = fileObjects;
         setLocale(Locale.getDefault());
@@ -101,17 +104,14 @@
                 Context context,
                 Iterable<String> classes,
                 Iterable<? extends JavaFileObject> fileObjects) {
-        this(compilerMain, toArray(flags, classes), context, toList(fileObjects));
+        this(compilerMain, toArray(flags), toArray(classes), context, toList(fileObjects));
     }
 
-    static private String[] toArray(Iterable<String> flags, Iterable<String> classes) {
+    static private String[] toArray(Iterable<String> iter) {
         ListBuffer<String> result = new ListBuffer<String>();
-        if (flags != null)
-            for (String flag : flags)
-                result.append(flag);
-        if (classes != null)
-            for (String cls : classes)
-                result.append(cls);
+        if (iter != null)
+            for (String s : iter)
+                result.append(s);
         return result.toArray(new String[result.length()]);
     }
 
@@ -129,7 +129,7 @@
             initContext();
             notYetEntered = new HashMap<JavaFileObject, JCCompilationUnit>();
             compilerMain.setAPIMode(true);
-            result = compilerMain.compile(args, context, fileObjects, processors);
+            result = compilerMain.compile(args, classNames, context, fileObjects, processors);
             cleanup();
             return result == 0;
         } else {
@@ -159,7 +159,7 @@
             initContext();
             compilerMain.setOptions(Options.instance(context));
             compilerMain.filenames = new LinkedHashSet<File>();
-            Collection<File> filenames = compilerMain.processArgs(CommandLine.parse(args));
+            Collection<File> filenames = compilerMain.processArgs(CommandLine.parse(args), classNames);
             if (!filenames.isEmpty())
                 throw new IllegalArgumentException("Malformed arguments " + toString(filenames, " "));
             compiler = JavaCompiler.instance(context);
@@ -174,6 +174,7 @@
             // endContext will be called when all classes have been generated
             // TODO: should handle the case after each phase if errors have occurred
             args = null;
+            classNames = null;
         }
     }
 
@@ -204,6 +205,7 @@
         compiler = null;
         compilerMain = null;
         args = null;
+        classNames = null;
         context = null;
         fileObjects = null;
         notYetEntered = null;
--- a/src/share/classes/com/sun/tools/javac/code/Kinds.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/code/Kinds.java	Wed Feb 15 17:09:06 2012 +0000
@@ -103,6 +103,8 @@
         VAL("kindname.value"),
         METHOD("kindname.method"),
         CLASS("kindname.class"),
+        STATIC_INIT("kindname.static.init"),
+        INSTANCE_INIT("kindname.instance.init"),
         PACKAGE("kindname.package");
 
         private String name;
@@ -170,9 +172,11 @@
             return KindName.CONSTRUCTOR;
 
         case METHOD:
+            return KindName.METHOD;
         case STATIC_INIT:
+            return KindName.STATIC_INIT;
         case INSTANCE_INIT:
-            return KindName.METHOD;
+            return KindName.INSTANCE_INIT;
 
         default:
             if (sym.kind == VAL)
--- a/src/share/classes/com/sun/tools/javac/code/Printer.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/code/Printer.java	Wed Feb 15 17:09:06 2012 +0000
@@ -311,7 +311,7 @@
 
     @Override
     public String visitMethodSymbol(MethodSymbol s, Locale locale) {
-        if ((s.flags() & BLOCK) != 0) {
+        if (s.isStaticOrInstanceInit()) {
             return s.owner.name.toString();
         } else {
             String ms = (s.name == s.name.table.names.init)
--- a/src/share/classes/com/sun/tools/javac/code/Symbol.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/code/Symbol.java	Wed Feb 15 17:09:06 2012 +0000
@@ -149,7 +149,8 @@
      * the default package; otherwise, the owner symbol is returned
      */
     public Symbol location() {
-        if (owner.name == null || (owner.name.isEmpty() && owner.kind != PCK && owner.kind != TYP)) {
+        if (owner.name == null || (owner.name.isEmpty() &&
+                (owner.flags() & BLOCK) == 0 && owner.kind != PCK && owner.kind != TYP)) {
             return null;
         }
         return owner;
@@ -725,6 +726,11 @@
          */
         public JavaFileObject classfile;
 
+        /** the list of translated local classes (used for generating
+         * InnerClasses attribute)
+         */
+        public List<ClassSymbol> trans_local;
+
         /** the constant pool of the class
          */
         public Pool pool;
@@ -1299,10 +1305,17 @@
                 return ElementKind.CONSTRUCTOR;
             else if (name == name.table.names.clinit)
                 return ElementKind.STATIC_INIT;
+            else if ((flags() & BLOCK) != 0)
+                return isStatic() ? ElementKind.STATIC_INIT : ElementKind.INSTANCE_INIT;
             else
                 return ElementKind.METHOD;
         }
 
+        public boolean isStaticOrInstanceInit() {
+            return getKind() == ElementKind.STATIC_INIT ||
+                    getKind() == ElementKind.INSTANCE_INIT;
+        }
+
         public Attribute getDefaultValue() {
             return defaultValue;
         }
--- a/src/share/classes/com/sun/tools/javac/code/Types.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Wed Feb 15 17:09:06 2012 +0000
@@ -269,14 +269,15 @@
 
     // <editor-fold defaultstate="collapsed" desc="isConvertible">
     /**
-     * Is t a subtype of or convertiable via boxing/unboxing
-     * convertions to s?
+     * Is t a subtype of or convertible via boxing/unboxing
+     * conversion to s?
      */
     public boolean isConvertible(Type t, Type s, Warner warn) {
+        if (t.tag == ERROR)
+            return true;
         boolean tPrimitive = t.isPrimitive();
         boolean sPrimitive = s.isPrimitive();
         if (tPrimitive == sPrimitive) {
-            checkUnsafeVarargsConversion(t, s, warn);
             return isSubtypeUnchecked(t, s, warn);
         }
         if (!allowBoxing) return false;
@@ -284,27 +285,6 @@
             ? isSubtype(boxedClass(t).type, s)
             : isSubtype(unboxedType(t), s);
     }
-    //where
-    private void checkUnsafeVarargsConversion(Type t, Type s, Warner warn) {
-        if (t.tag != ARRAY || isReifiable(t)) return;
-        ArrayType from = (ArrayType)t;
-        boolean shouldWarn = false;
-        switch (s.tag) {
-            case ARRAY:
-                ArrayType to = (ArrayType)s;
-                shouldWarn = from.isVarargs() &&
-                        !to.isVarargs() &&
-                        !isReifiable(from);
-                break;
-            case CLASS:
-                shouldWarn = from.isVarargs() &&
-                        isSubtype(from, s);
-                break;
-        }
-        if (shouldWarn) {
-            warn.warn(LintCategory.VARARGS);
-        }
-    }
 
     /**
      * Is t a subtype of or convertiable via boxing/unboxing
@@ -326,42 +306,63 @@
      * Is t an unchecked subtype of s?
      */
     public boolean isSubtypeUnchecked(Type t, Type s, Warner warn) {
-        if (t.tag == ARRAY && s.tag == ARRAY) {
-            if (((ArrayType)t).elemtype.tag <= lastBaseTag) {
-                return isSameType(elemtype(t), elemtype(s));
-            } else {
-                ArrayType from = (ArrayType)t;
-                ArrayType to = (ArrayType)s;
-                if (from.isVarargs() &&
-                        !to.isVarargs() &&
-                        !isReifiable(from)) {
-                    warn.warn(LintCategory.VARARGS);
-                }
-                return isSubtypeUnchecked(elemtype(t), elemtype(s), warn);
-            }
-        } else if (isSubtype(t, s)) {
-            return true;
+        boolean result = isSubtypeUncheckedInternal(t, s, warn);
+        if (result) {
+            checkUnsafeVarargsConversion(t, s, warn);
         }
-        else if (t.tag == TYPEVAR) {
-            return isSubtypeUnchecked(t.getUpperBound(), s, warn);
-        }
-        else if (s.tag == UNDETVAR) {
-            UndetVar uv = (UndetVar)s;
-            if (uv.inst != null)
-                return isSubtypeUnchecked(t, uv.inst, warn);
-        }
-        else if (!s.isRaw()) {
-            Type t2 = asSuper(t, s.tsym);
-            if (t2 != null && t2.isRaw()) {
-                if (isReifiable(s))
-                    warn.silentWarn(LintCategory.UNCHECKED);
-                else
-                    warn.warn(LintCategory.UNCHECKED);
+        return result;
+    }
+    //where
+        private boolean isSubtypeUncheckedInternal(Type t, Type s, Warner warn) {
+            if (t.tag == ARRAY && s.tag == ARRAY) {
+                if (((ArrayType)t).elemtype.tag <= lastBaseTag) {
+                    return isSameType(elemtype(t), elemtype(s));
+                } else {
+                    return isSubtypeUnchecked(elemtype(t), elemtype(s), warn);
+                }
+            } else if (isSubtype(t, s)) {
                 return true;
             }
+            else if (t.tag == TYPEVAR) {
+                return isSubtypeUnchecked(t.getUpperBound(), s, warn);
+            }
+            else if (s.tag == UNDETVAR) {
+                UndetVar uv = (UndetVar)s;
+                if (uv.inst != null)
+                    return isSubtypeUnchecked(t, uv.inst, warn);
+            }
+            else if (!s.isRaw()) {
+                Type t2 = asSuper(t, s.tsym);
+                if (t2 != null && t2.isRaw()) {
+                    if (isReifiable(s))
+                        warn.silentWarn(LintCategory.UNCHECKED);
+                    else
+                        warn.warn(LintCategory.UNCHECKED);
+                    return true;
+                }
+            }
+            return false;
         }
-        return false;
-    }
+
+        private void checkUnsafeVarargsConversion(Type t, Type s, Warner warn) {
+            if (t.tag != ARRAY || isReifiable(t)) return;
+            ArrayType from = (ArrayType)t;
+            boolean shouldWarn = false;
+            switch (s.tag) {
+                case ARRAY:
+                    ArrayType to = (ArrayType)s;
+                    shouldWarn = from.isVarargs() &&
+                            !to.isVarargs() &&
+                            !isReifiable(from);
+                    break;
+                case CLASS:
+                    shouldWarn = from.isVarargs();
+                    break;
+            }
+            if (shouldWarn) {
+                warn.warn(LintCategory.VARARGS);
+            }
+        }
 
     /**
      * Is t a subtype of s?<br>
--- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Wed Feb 15 17:09:06 2012 +0000
@@ -306,7 +306,16 @@
      */
     void duplicateError(DiagnosticPosition pos, Symbol sym) {
         if (!sym.type.isErroneous()) {
-            log.error(pos, "already.defined", sym, sym.location());
+            Symbol location = sym.location();
+            if (location.kind == MTH &&
+                    ((MethodSymbol)location).isStaticOrInstanceInit()) {
+                log.error(pos, "already.defined.in.clinit", kindName(sym), sym,
+                        kindName(sym.location()), kindName(sym.location().enclClass()),
+                        sym.location().enclClass());
+            } else {
+                log.error(pos, "already.defined", kindName(sym), sym,
+                        kindName(sym.location()), sym.location());
+            }
         }
     }
 
--- a/src/share/classes/com/sun/tools/javac/comp/Infer.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java	Wed Feb 15 17:09:06 2012 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, 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
@@ -249,6 +249,13 @@
         }
     };
 
+    private final Filter<Type> botFilter = new Filter<Type>() {
+        @Override
+        public boolean accepts(Type t) {
+            return t.tag != BOT;
+        }
+    };
+
     /** Instantiate undetermined type variable to the lub of all its lower bounds.
      *  Throw a NoInstanceException if this not possible.
      */
@@ -269,21 +276,18 @@
             // VGJ: sort of inlined maximizeInst() below.  Adding
             // bounds can cause lobounds that are above hibounds.
             List<Type> hibounds = Type.filter(that.hibounds, errorFilter);
+            Type hb = null;
             if (hibounds.isEmpty())
-                return;
-            Type hb = null;
-            if (hibounds.tail.isEmpty())
+                hb = syms.objectType;
+            else if (hibounds.tail.isEmpty())
                 hb = hibounds.head;
-            else for (List<Type> bs = hibounds;
-                      bs.nonEmpty() && hb == null;
-                      bs = bs.tail) {
-                if (isSubClass(bs.head, hibounds))
-                    hb = types.fromUnknownFun.apply(bs.head);
-            }
+            else
+                hb = types.glb(hibounds);
             if (hb == null ||
-                !types.isSubtypeUnchecked(hb, hibounds, warn) ||
-                !types.isSubtypeUnchecked(that.inst, hb, warn))
-                throw ambiguousNoInstanceException;
+                hb.isErroneous())
+                throw ambiguousNoInstanceException
+                        .setMessage("incompatible.upper.bounds",
+                                    that.qtype, hibounds);
         }
     }
 
@@ -332,25 +336,29 @@
             //replace uninferred type-vars
             targs = types.subst(targs,
                     that.tvars,
-                    instaniateAsUninferredVars(undetvars, that.tvars));
+                    instantiateAsUninferredVars(undetvars, that.tvars));
         }
         return chk.checkType(warn.pos(), that.inst(targs, types), to);
     }
     //where
-    private List<Type> instaniateAsUninferredVars(List<Type> undetvars, List<Type> tvars) {
+    private List<Type> instantiateAsUninferredVars(List<Type> undetvars, List<Type> tvars) {
+        Assert.check(undetvars.length() == tvars.length());
         ListBuffer<Type> new_targs = ListBuffer.lb();
-        //step 1 - create syntethic captured vars
+        //step 1 - create synthetic captured vars
         for (Type t : undetvars) {
             UndetVar uv = (UndetVar)t;
             Type newArg = new CapturedType(t.tsym.name, t.tsym, uv.inst, syms.botType, null);
             new_targs = new_targs.append(newArg);
         }
         //step 2 - replace synthetic vars in their bounds
+        List<Type> formals = tvars;
         for (Type t : new_targs.toList()) {
             CapturedType ct = (CapturedType)t;
             ct.bound = types.subst(ct.bound, tvars, new_targs.toList());
-            WildcardType wt = new WildcardType(ct.bound, BoundKind.EXTENDS, syms.boundClass);
+            WildcardType wt = new WildcardType(syms.objectType, BoundKind.UNBOUND, syms.boundClass);
+            wt.bound = (TypeVar)formals.head;
             ct.wildcard = wt;
+            formals = formals.tail;
         }
         return new_targs.toList();
     }
@@ -470,7 +478,8 @@
                         UndetVar uv = (UndetVar)t;
                         if (uv.qtype == tv) {
                             switch (ck) {
-                                case EXTENDS: return uv.hibounds.appendList(types.subst(types.getBounds(tv), all_tvars, inferredTypes));
+                                case EXTENDS: return Type.filter(uv.hibounds, botFilter)
+                                        .appendList(types.subst(types.getBounds(tv), all_tvars, inferredTypes));
                                 case SUPER: return uv.lobounds;
                                 case EQUAL: return uv.inst != null ? List.of(uv.inst) : List.<Type>nil();
                             }
--- a/src/share/classes/com/sun/tools/javac/comp/Lower.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java	Wed Feb 15 17:09:06 2012 +0000
@@ -2271,6 +2271,14 @@
         tree.extending = translate(tree.extending);
         tree.implementing = translate(tree.implementing);
 
+        if (currentClass.isLocal()) {
+            ClassSymbol encl = currentClass.owner.enclClass();
+            if (encl.trans_local == null) {
+                encl.trans_local = List.nil();
+            }
+            encl.trans_local = encl.trans_local.prepend(currentClass);
+        }
+
         // Recursively translate members, taking into account that new members
         // might be created during the translation and prepended to the member
         // list `tree.defs'.
--- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Wed Feb 15 17:09:06 2012 +0000
@@ -42,6 +42,7 @@
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.*;
 import static com.sun.tools.javac.code.TypeTags.*;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 
 /** This is the second phase of Enter, in which classes are completed
@@ -140,7 +141,7 @@
                 JCDiagnostic msg = diags.fragment("fatal.err.no.java.lang");
                 throw new FatalError(msg);
             } else {
-                log.error(pos, "doesnt.exist", tsym);
+                log.error(DiagnosticFlag.RESOLVE_ERROR, pos, "doesnt.exist", tsym);
             }
         }
         env.toplevel.starImportScope.importAll(tsym.members());
--- a/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Wed Feb 15 17:09:06 2012 +0000
@@ -863,10 +863,10 @@
         }
         if (c.type.tag != CLASS) return; // arrays
         if (pool != null && // pool might be null if called from xClassName
-            c.owner.kind != PCK &&
+            c.owner.enclClass() != null &&
             (innerClasses == null || !innerClasses.contains(c))) {
 //          log.errWriter.println("enter inner " + c);//DEBUG
-            if (c.owner.kind == TYP) enterInner((ClassSymbol)c.owner);
+            enterInner(c.owner.enclClass());
             pool.put(c);
             pool.put(c.name);
             if (innerClasses == null) {
@@ -1505,6 +1505,13 @@
             default : Assert.error();
             }
         }
+
+        if (c.trans_local != null) {
+            for (ClassSymbol local : c.trans_local) {
+                enterInner(local);
+            }
+        }
+
         databuf.appendChar(fieldsCount);
         writeFields(c.members().elems);
         databuf.appendChar(methodsCount);
--- a/src/share/classes/com/sun/tools/javac/main/Main.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/main/Main.java	Wed Feb 15 17:09:06 2012 +0000
@@ -31,6 +31,7 @@
 import java.net.URL;
 import java.security.DigestInputStream;
 import java.security.MessageDigest;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.LinkedHashSet;
 import java.util.MissingResourceException;
@@ -205,6 +206,10 @@
      *  @param flags    The array of command line arguments.
      */
     public Collection<File> processArgs(String[] flags) { // XXX sb protected
+        return processArgs(flags, null);
+    }
+
+    public Collection<File> processArgs(String[] flags, String[] classNames) { // XXX sb protected
         int ac = 0;
         while (ac < flags.length) {
             String flag = flags[ac];
@@ -245,6 +250,10 @@
             }
         }
 
+        if (this.classnames != null && classNames != null) {
+            this.classnames.addAll(Arrays.asList(classNames));
+        }
+
         if (!checkDirectory(D))
             return null;
         if (!checkDirectory(S))
@@ -341,6 +350,15 @@
                        List<JavaFileObject> fileObjects,
                        Iterable<? extends Processor> processors)
     {
+        return compile(args,  null, context, fileObjects, processors);
+    }
+
+    public int compile(String[] args,
+                       String[] classNames,
+                       Context context,
+                       List<JavaFileObject> fileObjects,
+                       Iterable<? extends Processor> processors)
+    {
         if (options == null)
             options = Options.instance(context); // creates a new one
 
@@ -353,14 +371,16 @@
          * into account.
          */
         try {
-            if (args.length == 0 && fileObjects.isEmpty()) {
+            if (args.length == 0
+                && (classNames == null || classNames.length == 0)
+                && fileObjects.isEmpty()) {
                 help();
                 return EXIT_CMDERR;
             }
 
             Collection<File> files;
             try {
-                files = processArgs(CommandLine.parse(args));
+                files = processArgs(CommandLine.parse(args), classNames);
                 if (files == null) {
                     // null signals an error in options, abort
                     return EXIT_CMDERR;
--- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Feb 15 17:09:06 2012 +0000
@@ -68,9 +68,13 @@
 compiler.err.already.annotated=\
     {0} {1} has already been annotated
 
-# 0: symbol, 1: symbol
+# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol
 compiler.err.already.defined=\
-    {0} is already defined in {1}
+    {0} {1} is already defined in {2} {3}
+
+# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol kind, 4: symbol
+compiler.err.already.defined.in.clinit=\
+    {0} {1} is already defined in {2} of {3} {4}
 
 # 0: string
 compiler.err.already.defined.single.import=\
@@ -1602,6 +1606,10 @@
 compiler.misc.no.unique.minimal.instance.exists=\
     no unique minimal instance exists for type variable {0} with lower bounds {1}
 
+# 0: type, 1: list of type
+compiler.misc.incompatible.upper.bounds=\
+    inference variable {0} has incompatible upper bounds {1}
+
 # 0: list of type, 1: type, 2: type
 compiler.misc.infer.no.conforming.instance.exists=\
     no instance(s) of type variable(s) {0} exist so that {1} conforms to {2}
@@ -1757,6 +1765,12 @@
 compiler.misc.kindname.package=\
     package
 
+compiler.misc.kindname.static.init=\
+    static initializer
+
+compiler.misc.kindname.instance.init=\
+    instance initializer
+
 #####
 
 compiler.misc.no.args=\
--- a/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Wed Feb 15 17:09:06 2012 +0000
@@ -412,7 +412,7 @@
         @Override
         public String visitMethodSymbol(MethodSymbol s, Locale locale) {
             String ownerName = visit(s.owner, locale);
-            if ((s.flags() & BLOCK) != 0) {
+            if (s.isStaticOrInstanceInit()) {
                return ownerName;
             } else {
                 String ms = (s.name == s.name.table.names.init)
--- a/test/Makefile	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/Makefile	Wed Feb 15 17:09:06 2012 +0000
@@ -34,6 +34,14 @@
     ARCH=i586
   endif
 endif
+ifeq ($(OSNAME), Darwin)
+  PLATFORM = bsd
+  JT_PLATFORM = linux
+  ARCH = $(shell uname -m)
+  ifeq ($(ARCH), i386)
+    ARCH=i586
+  endif
+endif
 ifeq ($(OSNAME), Windows_NT)
   PLATFORM = windows
   JT_PLATFORM = win32
@@ -240,6 +248,7 @@
 # JTREG_REFERENCE
 #	(Optional) reference results (e.g. work, report or summary.txt)
 #
+jtreg_tests: jtreg-tests
 jtreg-tests: check-jtreg FRC
 	@rm -f -r $(JTREG_OUTPUT_DIR)/JTwork $(JTREG_OUTPUT_DIR)/JTreport \
 	    $(JTREG_OUTPUT_DIR)/diff.html $(JTREG_OUTPUT_DIR)/status.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testHelpFile/TestHelpFile.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2012, 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      7132631
+ * @summary  Make sure that the help file is generated correctly.
+ * @author   Bhavesh Patel
+ * @library  ../lib/
+ * @build    JavadocTester TestHelpFile
+ * @run main TestHelpFile
+ */
+
+public class TestHelpFile extends JavadocTester {
+
+    //Test information.
+    private static final String BUG_ID = "7132631";
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR,
+            SRC_DIR + FS + "TestHelpFile.java"
+    };
+
+    private static final String[][] NEGATED_TEST = NO_TEST;
+
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "help-doc.html",
+            "<a href=\"constant-values.html\">Constant Field Values</a>"
+        },
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestHelpFile tester = new TestHelpFile();
+        run(tester, ARGS, TEST, NEGATED_TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
--- a/test/com/sun/javadoc/testUseOption/TestUseOption.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/com/sun/javadoc/testUseOption/TestUseOption.java	Wed Feb 15 17:09:06 2012 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4496290 4985072 7006178
+ * @bug 4496290 4985072 7006178 7068595
  * @summary A simple test to determine if -use works.
  * @author jamieh
  * @library ../lib/
@@ -34,7 +34,7 @@
 
 public class TestUseOption extends JavadocTester {
 
-    private static final String BUG_ID = "4496290-4985072-7006178";
+    private static final String BUG_ID = "4496290-4985072-7006178-7068595";
 
     //Input for string search tests.
     private static final String[] TEST2 = {
@@ -64,6 +64,13 @@
         }
     };
 
+    private static final String[][] TEST4 = {
+        {BUG_ID + "-4" + FS + "pkg2" + FS + "class-use" + FS + "C3.html", "<a href=" +
+                 "\"../../index.html?pkg2/class-use/C3.html\" target=\"_top\">" +
+                 "Frames</a></li>"
+        }
+    };
+
     private static final String[] ARGS = new String[] {
         "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
     };
@@ -76,6 +83,10 @@
         "-d", BUG_ID + "-3", "-sourcepath", SRC_DIR, "-use", SRC_DIR + FS + "C.java", SRC_DIR + FS + "UsedInC.java"
     };
 
+    private static final String[] ARGS4 = new String[] {
+        "-d", BUG_ID + "-4", "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
+    };
+
     /**
      * The entry point of the test.
      * @param args the array of command line arguments.
@@ -108,6 +119,7 @@
         }
         tester.printSummary();
         run(tester, ARGS3, TEST3, NO_TEST);
+        run(tester, ARGS4, TEST4, NO_TEST);
         tester.printSummary();
     }
 
--- a/test/jprt.config	Mon Feb 13 16:21:45 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-#!echo "This is not a shell script"
-#############################################################################
-# Copyright (c) 2006, 2007, 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.
-#############################################################################
-#
-# JPRT shell configuration for testing.
-#
-# Input environment variables:
-#    Windows Only:
-#      PATH
-#      ROOTDIR
-#
-# Output variable settings:
-#    make    Full path to GNU make
-#
-# Output environment variables:
-#    PATH
-#
-#############################################################################
-
-#############################################################################
-# Error
-error() # message
-{
-  echo "ERROR: $1"
-  exit 6
-}
-# Directory must exist
-dirMustExist() # dir name
-{
-  if [ ! -d "$1" ] ; then
-    error "Directory for $2 does not exist: $1"
-  fi
-}
-# File must exist
-fileMustExist() # dir name
-{
-  if [ ! -f "$1" ] ; then
-    error "File for $2 does not exist: $1"
-  fi
-}
-#############################################################################
-
-# Should be set by JPRT as the 3 basic inputs
-slashjava="${ALT_SLASH_JAVA}"
-if [ "${slashjava}" = "" ] ; then
-  slashjava=/java
-fi
-
-# Check input
-dirMustExist "${slashjava}"  ALT_SLASH_JAVA
-
-# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
-osname=`uname -s`
-if [ "${osname}" = SunOS ] ; then
-   
-    # SOLARIS: Sparc or X86
-    osarch=`uname -p`
-    if [ "${osarch}" = sparc ] ; then
-	solaris_arch=sparc
-    else
-	solaris_arch=i386
-    fi
-
-    # Add basic solaris system paths
-    path4sdk=/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
-
-    # Find GNU make
-    make=/usr/sfw/bin/gmake
-    if [ ! -f ${make} ] ; then
-	make=/opt/sfw/bin/gmake
-	if [ ! -f ${make} ] ; then
-	    make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
-        fi 
-    fi
-    fileMustExist "${make}" make
-
-    # File creation mask
-    umask 002
-
-elif [ "${osname}" = Linux ] ; then
-   
-    # Add basic paths
-    path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
-
-    # Find GNU make
-    make=/usr/bin/make
-    fileMustExist "${make}" make
-
-    umask 002
-
-else
-
-    # Windows: Differs on CYGWIN vs. MKS.
-   
-    # We need to determine if we are running a CYGWIN shell or an MKS shell
-    #    (if uname isn't available, then it will be unix_toolset=unknown)
-    unix_toolset=unknown
-    if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
-        # We kind of assume ROOTDIR is where MKS is and it's ok
-        unix_toolset=MKS
-        mkshome=`dosname -s "${ROOTDIR}"`
-        # Most unix utilities are in the mksnt directory of ROOTDIR
-        unixcommand_path="${mkshome}/mksnt"
-        path4sdk="${unixcommand_path}"
-	devtools_path="${slashjava}/devtools/win32/bin"
-	path4sdk="${devtools_path};${path4sdk}"
-        # Find GNU make
-        make="${devtools_path}/gnumake.exe"
-        fileMustExist "${make}" make
-    elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
-        # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
-        unix_toolset=CYGWIN
-        # Most unix utilities are in the /usr/bin
-        unixcommand_path="/usr/bin"
-        path4sdk="${unixcommand_path}"
-        # Find GNU make
-        make="${unixcommand_path}/make.exe"
-        fileMustExist "${make}" make
-    else
-      echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
-    fi
-
-    
-    # For windows, it's hard to know where the system is, so we just add this
-    #    to PATH.
-    slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
-    path4sdk="${slash_path};${PATH}"
-    
-    # Convert path4sdk to cygwin style
-    if [ "${unix_toolset}" = CYGWIN ] ; then
-	path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
-    fi
-
-fi
-
-# Export PATH setting
-PATH="${path4sdk}"
-export PATH
-
--- a/test/tools/javac/4846262/Test.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/4846262/Test.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -44,7 +44,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     FS="/"
     ;;
   CYGWIN* )
--- a/test/tools/javac/6302184/T6302184.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/6302184/T6302184.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -41,7 +41,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     FS="/"
     ;;
   CYGWIN* )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7003595/T7003595.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2011, 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 7003595
+ * @summary IncompatibleClassChangeError with unreferenced local class with subclass
+ */
+
+import com.sun.source.util.JavacTask;
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.InnerClasses_attribute;
+import com.sun.tools.classfile.ConstantPool.*;
+import com.sun.tools.javac.api.JavacTool;
+
+import java.io.File;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.ArrayList;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+
+public class T7003595 {
+
+    /** global decls ***/
+
+    // Create a single file manager and reuse it for each compile to save time.
+    static StandardJavaFileManager fm = JavacTool.create().getStandardFileManager(null, null, null);
+
+    //statistics
+    static int checkCount = 0;
+
+    enum ClassKind {
+        NESTED("static class #N { #B }", "$", true),
+        INNER("class #N { #B }", "$", false),
+        LOCAL_REF("void test() { class #N { #B }; new #N(); }", "$1", false),
+        LOCAL_NOREF("void test() { class #N { #B }; }", "$1", false),
+        ANON("void test() { new Object() { #B }; }", "$1", false),
+        NONE("", "", false);
+
+        String memberInnerStr;
+        String sep;
+        boolean staticAllowed;
+
+        private ClassKind(String memberInnerStr, String sep, boolean staticAllowed) {
+            this.memberInnerStr = memberInnerStr;
+            this.sep = sep;
+            this.staticAllowed = staticAllowed;
+        }
+
+        String getSource(String className, String outerName, String nested) {
+            return memberInnerStr.replaceAll("#O", outerName).
+                    replaceAll("#N", className).replaceAll("#B", nested);
+        }
+
+        static String getClassfileName(String[] names, ClassKind[] outerKinds, int pos) {
+            System.out.println(" pos = " + pos + " kind = " + outerKinds[pos] + " sep = " + outerKinds[pos].sep);
+            String name = outerKinds[pos] != ANON ?
+                    names[pos] : "";
+            if (pos == 0) {
+                return "Test" + outerKinds[pos].sep + name;
+            } else {
+                String outerStr = getClassfileName(names, outerKinds, pos - 1);
+                return outerStr + outerKinds[pos].sep + name;
+            }
+        }
+
+        boolean isAllowed(ClassKind nestedKind) {
+            return nestedKind != NESTED ||
+                    staticAllowed;
+        }
+    }
+
+    enum LocalInnerClass {
+        LOCAL_REF("class L {}; new L();", "Test$1L"),
+        LOCAL_NOREF("class L {};", "Test$1L"),
+        ANON("new Object() {};", "Test$1"),
+        NONE("", "");
+
+        String localInnerStr;
+        String canonicalInnerStr;
+
+        private LocalInnerClass(String localInnerStr, String canonicalInnerStr) {
+            this.localInnerStr = localInnerStr;
+            this.canonicalInnerStr = canonicalInnerStr;
+        }
+    }
+
+    public static void main(String... args) throws Exception {
+        for (ClassKind ck1 : ClassKind.values()) {
+            String cname1 = "C1";
+            for (ClassKind ck2 : ClassKind.values()) {
+                if (!ck1.isAllowed(ck2)) continue;
+                String cname2 = "C2";
+                for (ClassKind ck3 : ClassKind.values()) {
+                    if (!ck2.isAllowed(ck3)) continue;
+                    String cname3 = "C3";
+                    new T7003595(new ClassKind[] {ck1, ck2, ck3}, new String[] { cname1, cname2, cname3 }).compileAndCheck();
+                }
+            }
+        }
+
+        System.out.println("Total checks made: " + checkCount);
+    }
+
+    /** instance decls **/
+
+    ClassKind[] cks;
+    String[] cnames;
+
+    T7003595(ClassKind[] cks, String[] cnames) {
+        this.cks = cks;
+        this.cnames = cnames;
+    }
+
+    void compileAndCheck() throws Exception {
+        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+        JavaSource source = new JavaSource();
+        JavacTask ct = (JavacTask)tool.getTask(null, fm, null,
+                null, null, Arrays.asList(source));
+        ct.call();
+        verifyBytecode(source);
+    }
+
+    void verifyBytecode(JavaSource source) {
+        for (int i = 0; i < 3 ; i ++) {
+            if (cks[i] == ClassKind.NONE) break;
+            checkCount++;
+            String filename = cks[i].getClassfileName(cnames, cks, i);
+            File compiledTest = new File(filename + ".class");
+            try {
+                ClassFile cf = ClassFile.read(compiledTest);
+                if (cf == null) {
+                    throw new Error("Classfile not found: " + filename);
+                }
+
+                InnerClasses_attribute innerClasses = (InnerClasses_attribute)cf.getAttribute(Attribute.InnerClasses);
+
+                ArrayList<String> foundInnerSig = new ArrayList<>();
+                if (innerClasses != null) {
+                    for (InnerClasses_attribute.Info info : innerClasses.classes) {
+                        String foundSig = info.getInnerClassInfo(cf.constant_pool).getName();
+                        foundInnerSig.add(foundSig);
+                    }
+                }
+
+                ArrayList<String> expectedInnerSig = new ArrayList<>();
+                //add inner class (if any)
+                if (i < 2 && cks[i + 1] != ClassKind.NONE) {
+                    expectedInnerSig.add(cks[i + 1].getClassfileName(cnames, cks, i + 1));
+                }
+                //add inner classes
+                for (int j = 0 ; j != i + 1 && j < 3; j++) {
+                    expectedInnerSig.add(cks[j].getClassfileName(cnames, cks, j));
+                }
+
+                if (expectedInnerSig.size() != foundInnerSig.size()) {
+                    throw new Error("InnerClasses attribute for " + cnames[i] + " has wrong size\n" +
+                                    "expected " + expectedInnerSig.size() + "\n" +
+                                    "found " + innerClasses.number_of_classes + "\n" +
+                                    source);
+                }
+
+                for (String foundSig : foundInnerSig) {
+                    if (!expectedInnerSig.contains(foundSig)) {
+                        throw new Error("InnerClasses attribute for " + cnames[i] + " has unexpected signature: " +
+                                foundSig + "\n" + source + "\n" + expectedInnerSig);
+                    }
+                }
+
+                for (String expectedSig : expectedInnerSig) {
+                    if (!foundInnerSig.contains(expectedSig)) {
+                        throw new Error("InnerClasses attribute for " + cnames[i] + " does not contain expected signature: " +
+                                    expectedSig + "\n" + source);
+                    }
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+                throw new Error("error reading " + compiledTest +": " + e);
+            }
+        }
+    }
+
+    class JavaSource extends SimpleJavaFileObject {
+
+        static final String source_template = "class Test { #C }";
+
+        String source;
+
+        public JavaSource() {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+            String c3 = cks[2].getSource(cnames[2], cnames[1], "");
+            String c2 = cks[1].getSource(cnames[1], cnames[0], c3);
+            String c1 = cks[0].getSource(cnames[0], "Test", c2);
+            source = source_template.replace("#C", c1);
+        }
+
+        @Override
+        public String toString() {
+            return source;
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return source;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7003595/T7003595b.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, 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 7003595
+ * @summary IncompatibleClassChangeError with unreferenced local class with subclass
+ */
+
+public class T7003595b {
+    public static void main(String... args) throws Exception {
+        class A {}
+        class B extends A {}
+        B.class.getSuperclass().getDeclaringClass();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7085024/T7085024.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,12 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 7085024
+ * @summary internal error; cannot instantiate Foo
+ * @compile/fail/ref=T7085024.out -XDrawDiagnostics T7085024.java
+ */
+
+class T7085024 {
+    T7085024 (boolean ret) { } //internal error goes away if constructor accepts a reference type
+
+    T7085024 f = new T7085024((NonExistentClass) null );
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7085024/T7085024.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,2 @@
+T7085024.java:11:32: compiler.err.cant.resolve.location: kindname.class, NonExistentClass, , , (compiler.misc.location: kindname.class, T7085024, null)
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7086595/T7086595.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,32 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 7086595
+ * @summary Error message bug: name of initializer is 'null'
+ * @compile/fail/ref=T7086595.out -XDrawDiagnostics T7086595.java
+ */
+
+class T7086595 {
+
+    String s = "x";
+    String s = nonExistent;
+
+    int foo() {
+        String s = "x";
+        String s = nonExistent;
+    }
+
+    static int bar() {
+        String s = "x";
+        String s = nonExistent;
+    }
+
+    {
+        String s = "x";
+        String s = nonExistent;
+    }
+
+    static {
+        String s = "x";
+        String s = nonExistent;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7086595/T7086595.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,11 @@
+T7086595.java:11:12: compiler.err.already.defined: kindname.variable, s, kindname.class, T7086595
+T7086595.java:11:16: compiler.err.cant.resolve.location: kindname.variable, nonExistent, , , (compiler.misc.location: kindname.class, T7086595, null)
+T7086595.java:15:16: compiler.err.already.defined: kindname.variable, s, kindname.method, foo()
+T7086595.java:15:20: compiler.err.cant.resolve.location: kindname.variable, nonExistent, , , (compiler.misc.location: kindname.class, T7086595, null)
+T7086595.java:20:16: compiler.err.already.defined: kindname.variable, s, kindname.method, bar()
+T7086595.java:20:20: compiler.err.cant.resolve.location: kindname.variable, nonExistent, , , (compiler.misc.location: kindname.class, T7086595, null)
+T7086595.java:25:16: compiler.err.already.defined.in.clinit: kindname.variable, s, kindname.instance.init, kindname.class, T7086595
+T7086595.java:25:20: compiler.err.cant.resolve.location: kindname.variable, nonExistent, , , (compiler.misc.location: kindname.class, T7086595, null)
+T7086595.java:30:16: compiler.err.already.defined.in.clinit: kindname.variable, s, kindname.static.init, kindname.class, T7086595
+T7086595.java:30:20: compiler.err.cant.resolve.location: kindname.variable, nonExistent, , , (compiler.misc.location: kindname.class, T7086595, null)
+10 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7129225/Anno.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.ElementType;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+public @interface Anno {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7129225/AnnoProcessor.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2012, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.util.Set;
+import javax.annotation.processing.*;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.TypeElement;
+import javax.tools.Diagnostic.Kind;
+
+@SupportedAnnotationTypes("Anno")
+public class AnnoProcessor extends JavacTestingAbstractProcessor {
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    @Override
+    public boolean process(Set<? extends TypeElement> set, RoundEnvironment re) {
+        messager.printMessage(Kind.NOTE, "RUNNING - lastRound = " + re.processingOver());
+        return true;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7129225/NegTest.ref	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,2 @@
+TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7129225/TestImportStar.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2012, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 7129225
+ * @summary import xxx.* isn't handled correctly by annotation processing
+ * @library ../lib
+ * @build JavacTestingAbstractProcessor
+ * @compile/fail/ref=NegTest.ref -XDrawDiagnostics TestImportStar.java
+ * @compile Anno.java AnnoProcessor.java
+ * @compile/ref=TestImportStar.ref -XDrawDiagnostics -processor AnnoProcessor -proc:only TestImportStar.java
+ */
+
+ //The @compile/fail... verifies that the fix doesn't break the normal compilation of import xxx.*
+ //The @comple/ref... verifies the fix fixes the bug
+
+import xxx.*;
+
+@Anno
+public class TestImportStar {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7129225/TestImportStar.ref	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,3 @@
+- compiler.note.proc.messager: RUNNING - lastRound = false
+TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
+- compiler.note.proc.messager: RUNNING - lastRound = true
--- a/test/tools/javac/ClassPathTest/ClassPathTest.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/ClassPathTest/ClassPathTest.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -56,7 +56,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     FS="/"
     ;;
   Windows* )
--- a/test/tools/javac/Diagnostics/6860795/T6860795.out	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/Diagnostics/6860795/T6860795.out	Wed Feb 15 17:09:06 2012 +0000
@@ -1,2 +1,2 @@
-T6860795.java:10:27: compiler.err.already.defined: x, foo
+T6860795.java:10:27: compiler.err.already.defined: kindname.variable, x, kindname.method, foo
 1 error
--- a/test/tools/javac/Diagnostics/6862608/T6862608a.out	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/Diagnostics/6862608/T6862608a.out	Wed Feb 15 17:09:06 2012 +0000
@@ -1,3 +1,3 @@
-T6862608a.java:19:41: compiler.err.prob.found.req: (compiler.misc.incompatible.types.1: (compiler.misc.infer.no.conforming.instance.exists: T, java.util.Comparator<T>, java.util.Comparator<java.lang.String>)), <T>java.util.Comparator<T>, java.util.Comparator<java.lang.String>
+T6862608a.java:19:41: compiler.err.invalid.inferred.types: T, (compiler.misc.no.conforming.assignment.exists: java.util.List<java.util.Comparator<?>>, java.lang.Iterable<? extends java.util.Comparator<? super java.lang.String>>)
 - compiler.misc.where.description.typevar: T,{(compiler.misc.where.typevar: T, java.lang.Object, kindname.method, <T>compound(java.lang.Iterable<? extends java.util.Comparator<? super T>>))}
 1 error
--- a/test/tools/javac/ExtDirs/ExtDirs.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/ExtDirs/ExtDirs.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -54,7 +54,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     PS=":"
     FS="/"
     ;;
--- a/test/tools/javac/LocalClasses_2.out	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/LocalClasses_2.out	Wed Feb 15 17:09:06 2012 +0000
@@ -1,2 +1,2 @@
-LocalClasses_2.java:15:13: compiler.err.already.defined: Local, foo()
+LocalClasses_2.java:15:13: compiler.err.already.defined: kindname.class, Local, kindname.method, foo()
 1 error
--- a/test/tools/javac/MissingInclude.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/MissingInclude.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -47,7 +47,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     FS="/"
     ;;
   Windows* )
--- a/test/tools/javac/NestedInnerClassNames.out	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/NestedInnerClassNames.out	Wed Feb 15 17:09:06 2012 +0000
@@ -1,18 +1,18 @@
-NestedInnerClassNames.java:16:5: compiler.err.already.defined: NestedInnerClassNames, compiler.misc.unnamed.package
-NestedInnerClassNames.java:23:9: compiler.err.already.defined: NestedInnerClassNames.foo, NestedInnerClassNames
-NestedInnerClassNames.java:34:9: compiler.err.already.defined: NestedInnerClassNames, compiler.misc.unnamed.package
-NestedInnerClassNames.java:45:9: compiler.err.already.defined: NestedInnerClassNames.baz, NestedInnerClassNames
-NestedInnerClassNames.java:46:13: compiler.err.already.defined: NestedInnerClassNames.baz.baz, NestedInnerClassNames.baz
-NestedInnerClassNames.java:59:9: compiler.err.already.defined: NestedInnerClassNames.foo$bar, NestedInnerClassNames
-NestedInnerClassNames.java:76:13: compiler.err.already.defined: NestedInnerClassNames.$bar, NestedInnerClassNames
-NestedInnerClassNames.java:90:13: compiler.err.already.defined: NestedInnerClassNames.bar$bar.bar, NestedInnerClassNames.bar$bar
+NestedInnerClassNames.java:16:5: compiler.err.already.defined: kindname.class, NestedInnerClassNames, kindname.package, compiler.misc.unnamed.package
+NestedInnerClassNames.java:23:9: compiler.err.already.defined: kindname.class, NestedInnerClassNames.foo, kindname.class, NestedInnerClassNames
+NestedInnerClassNames.java:34:9: compiler.err.already.defined: kindname.class, NestedInnerClassNames, kindname.package, compiler.misc.unnamed.package
+NestedInnerClassNames.java:45:9: compiler.err.already.defined: kindname.class, NestedInnerClassNames.baz, kindname.class, NestedInnerClassNames
+NestedInnerClassNames.java:46:13: compiler.err.already.defined: kindname.class, NestedInnerClassNames.baz.baz, kindname.class, NestedInnerClassNames.baz
+NestedInnerClassNames.java:59:9: compiler.err.already.defined: kindname.class, NestedInnerClassNames.foo$bar, kindname.class, NestedInnerClassNames
+NestedInnerClassNames.java:76:13: compiler.err.already.defined: kindname.class, NestedInnerClassNames.$bar, kindname.class, NestedInnerClassNames
+NestedInnerClassNames.java:90:13: compiler.err.already.defined: kindname.class, NestedInnerClassNames.bar$bar.bar, kindname.class, NestedInnerClassNames.bar$bar
 NestedInnerClassNames.java:109:5: compiler.err.duplicate.class: NestedInnerClassNames.foo.foo
-NestedInnerClassNames.java:19:9: compiler.err.already.defined: NestedInnerClassNames, compiler.misc.unnamed.package
-NestedInnerClassNames.java:28:13: compiler.err.already.defined: foo, m2()
-NestedInnerClassNames.java:40:13: compiler.err.already.defined: NestedInnerClassNames, compiler.misc.unnamed.package
-NestedInnerClassNames.java:52:13: compiler.err.already.defined: baz, m4()
-NestedInnerClassNames.java:53:17: compiler.err.already.defined: baz.baz, baz
-NestedInnerClassNames.java:67:13: compiler.err.already.defined: foo$bar, m5()
-NestedInnerClassNames.java:83:17: compiler.err.already.defined: $bar, m6()
-NestedInnerClassNames.java:97:17: compiler.err.already.defined: bar$bar.bar, bar$bar
+NestedInnerClassNames.java:19:9: compiler.err.already.defined: kindname.class, NestedInnerClassNames, kindname.package, compiler.misc.unnamed.package
+NestedInnerClassNames.java:28:13: compiler.err.already.defined: kindname.class, foo, kindname.method, m2()
+NestedInnerClassNames.java:40:13: compiler.err.already.defined: kindname.class, NestedInnerClassNames, kindname.package, compiler.misc.unnamed.package
+NestedInnerClassNames.java:52:13: compiler.err.already.defined: kindname.class, baz, kindname.method, m4()
+NestedInnerClassNames.java:53:17: compiler.err.already.defined: kindname.class, baz.baz, kindname.class, baz
+NestedInnerClassNames.java:67:13: compiler.err.already.defined: kindname.class, foo$bar, kindname.method, m5()
+NestedInnerClassNames.java:83:17: compiler.err.already.defined: kindname.class, $bar, kindname.method, m6()
+NestedInnerClassNames.java:97:17: compiler.err.already.defined: kindname.class, bar$bar.bar, kindname.class, bar$bar
 17 errors
--- a/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -52,7 +52,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     PS=":"
     FS="/"
     ;;
--- a/test/tools/javac/T5090006/compiler.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/T5090006/compiler.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -47,7 +47,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     FS="/"
     ;;
   Windows* )
--- a/test/tools/javac/TryWithResources/BadTwr.out	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/TryWithResources/BadTwr.out	Wed Feb 15 17:09:06 2012 +0000
@@ -1,5 +1,5 @@
-BadTwr.java:13:46: compiler.err.already.defined: r1, main(java.lang.String...)
-BadTwr.java:18:20: compiler.err.already.defined: args, main(java.lang.String...)
+BadTwr.java:13:46: compiler.err.already.defined: kindname.variable, r1, kindname.method, main(java.lang.String...)
+BadTwr.java:18:20: compiler.err.already.defined: kindname.variable, args, kindname.method, main(java.lang.String...)
 BadTwr.java:21:13: compiler.err.cant.assign.val.to.final.var: thatsIt
-BadTwr.java:26:24: compiler.err.already.defined: name, main(java.lang.String...)
+BadTwr.java:26:24: compiler.err.already.defined: kindname.variable, name, kindname.method, main(java.lang.String...)
 4 errors
--- a/test/tools/javac/TryWithResources/DuplicateResourceDecl.out	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/TryWithResources/DuplicateResourceDecl.out	Wed Feb 15 17:09:06 2012 +0000
@@ -1,2 +1,2 @@
-DuplicateResourceDecl.java:12:56: compiler.err.already.defined: c, main(java.lang.String[])
+DuplicateResourceDecl.java:12:56: compiler.err.already.defined: kindname.variable, c, kindname.method, main(java.lang.String[])
 1 error
--- a/test/tools/javac/api/T6397104.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/api/T6397104.java	Wed Feb 15 17:09:06 2012 +0000
@@ -26,10 +26,10 @@
  * @bug     6397104
  * @summary JSR 199: JavaFileManager.getFileForOutput should have sibling argument
  * @author  Peter von der Ah\u00e9
- * @ignore  this test should be rewritten when fixing 6473901
  */
 
 import java.io.File;
+import java.net.URI;
 import java.util.Arrays;
 import javax.tools.*;
 import javax.tools.JavaFileManager.Location;
@@ -52,10 +52,14 @@
             : fm.getJavaFileObjectsFromFiles(Arrays.asList(siblingFile)).iterator().next();
         FileObject fileObject =
             fm.getFileForOutput(location, "java.lang", relName, sibling);
-        if (!fileObject.toUri().getPath().equals(expectedPath))
-            throw new AssertionError("Expected " + expectedPath +
-                                     ", got " + fileObject.toUri().getPath());
-        System.out.format("OK: (%s, %s) => %s%n", siblingFile, relName, fileObject.toUri());
+
+        File expectedFile = new File(expectedPath).getCanonicalFile();
+        File fileObjectFile = new File(fileObject.toUri()).getCanonicalFile();
+
+        if (!fileObjectFile.equals(expectedFile))
+            throw new AssertionError("Expected " + expectedFile +
+                                     ", got " + fileObjectFile);
+        System.out.format("OK: (%s, %s) => %s%n", siblingFile, relName, fileObjectFile);
     }
 
     void test(boolean hasLocation, File siblingFile, String relName, String expectedPath)
--- a/test/tools/javac/apt.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/apt.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -38,7 +38,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     NULL=/dev/null
     PS=":"
     FS="/"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/cast/7123100/T7123100a.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,16 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug     7123100
+ * @summary javac fails with java.lang.StackOverflowError
+ * @compile/fail/ref=T7123100a.out -Werror -Xlint:unchecked -XDrawDiagnostics T7123100a.java
+ */
+
+class T7123100a {
+    <E extends Enum<E>> E m() {
+        return null;
+    }
+
+    <Z> void test() {
+        Z z = (Z)m();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/cast/7123100/T7123100a.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,4 @@
+T7123100a.java:14:19: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), compiler.misc.type.captureof: 1, ?, Z
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/cast/7123100/T7123100b.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,12 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug     7123100
+ * @summary javac fails with java.lang.StackOverflowError
+ * @compile/fail/ref=T7123100b.out -Werror -Xlint:unchecked -XDrawDiagnostics T7123100b.java
+ */
+
+class T7123100b {
+    <Z> void test(Enum<?> e) {
+        Z z = (Z)e;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/cast/7123100/T7123100b.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,4 @@
+T7123100b.java:10:18: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), java.lang.Enum<compiler.misc.type.captureof: 1, ?>, Z
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/cast/7123100/T7123100c.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,16 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug     7123100
+ * @summary javac fails with java.lang.StackOverflowError
+ * @compile/fail/ref=T7123100c.out -Werror -Xlint:unchecked -XDrawDiagnostics T7123100c.java
+ */
+
+class T7123100c {
+    <E> E m(E e) {
+        return null;
+    }
+
+    <Z> void test(Enum<?> e) {
+        Z z = (Z)m(e);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/cast/7123100/T7123100c.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,4 @@
+T7123100c.java:14:19: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), java.lang.Enum<compiler.misc.type.captureof: 1, ?>, Z
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/cast/7123100/T7123100d.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,16 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug     7123100
+ * @summary javac fails with java.lang.StackOverflowError
+ * @compile/fail/ref=T7123100d.out -Werror -Xlint:unchecked -XDrawDiagnostics T7123100d.java
+ */
+
+class T7123100d {
+    <E extends Enum<E>> E m(Enum<E> e) {
+        return null;
+    }
+
+    <Z> void test(Enum<?> e) {
+        Z z = (Z)m(e);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/cast/7123100/T7123100d.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,4 @@
+T7123100d.java:14:19: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), compiler.misc.type.captureof: 1, ?, Z
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/test/tools/javac/constDebug/ConstDebug.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/constDebug/ConstDebug.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -47,7 +47,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     PS=":"
     FS="/"
     ;;
--- a/test/tools/javac/diags/CheckExamples.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/diags/CheckExamples.java	Wed Feb 15 17:09:06 2012 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2012, 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
@@ -23,10 +23,13 @@
 
 /*
  * @test
- * @bug 6968063
+ * @bug 6968063 7127924
  * @summary provide examples of code that generate diagnostics
  * @build Example CheckExamples
- * @run main CheckExamples
+ * @run main/othervm CheckExamples
+ */
+/*
+ *      See CR 7127924 for info on why othervm is used.
  */
 
 import java.io.*;
--- a/test/tools/javac/diags/MessageInfo.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/diags/MessageInfo.java	Wed Feb 15 17:09:06 2012 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2012, 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
@@ -23,10 +23,13 @@
 
 /**
  * @test
- * @bug 7013272
+ * @bug 7013272 7127924
  * @summary Automatically generate info about how compiler resource keys are used
  * @build Example ArgTypeCompilerFactory MessageFile MessageInfo
- * @run main MessageInfo
+ * @run main/othervm MessageInfo
+ */
+/*
+ *      See CR 7127924 for info on why othervm is used.
  */
 
 import java.io.*;
--- a/test/tools/javac/diags/RunExamples.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/diags/RunExamples.java	Wed Feb 15 17:09:06 2012 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2012, 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
@@ -23,10 +23,13 @@
 
 /**
  * @test
- * @bug 6968063
+ * @bug 6968063 7127924
  * @summary provide examples of code that generate diagnostics
  * @build ArgTypeCompilerFactory Example HTMLWriter RunExamples
- * @run main RunExamples
+ * @run main/othervm RunExamples
+ */
+/*
+ *      See CR 7127924 for info on why othervm is used.
  */
 
 import java.io.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/AlreadyDefinedClinit.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, 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.already.defined.in.clinit
+
+class AlreadyDefinedClinit {
+    static {
+        int i;
+        int i;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/IncompatibleUpperBounds.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011, 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.cant.apply.symbols
+//key: compiler.misc.inapplicable.method
+//key: compiler.misc.arg.length.mismatch
+//key: compiler.misc.incompatible.upper.bounds
+
+import java.util.List;
+
+class IncompatibleUpperBounds {
+    <S> void m(List<? super S> s1, List<? super S> s2) { }
+    void m(Object o) {}
+
+    void test(List<Integer> li, List<String> ls) {
+        m(li, ls);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/KindnameInstanceInit.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2011, 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.already.defined.in.clinit
+// key: compiler.misc.kindname.instance.init
+// key: compiler.misc.kindname.class
+// key: compiler.misc.kindname.variable
+// key: compiler.misc.count.error
+// key: compiler.err.error
+// run: backdoor
+
+class KindnameInstanceInit {
+    {
+        int i;
+        int i;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/KindnameStaticInit.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2011, 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.already.defined.in.clinit
+// key: compiler.misc.kindname.static.init
+// key: compiler.misc.kindname.class
+// key: compiler.misc.kindname.variable
+// key: compiler.misc.count.error
+// key: compiler.err.error
+// run: backdoor
+
+class KindnameStaticInit {
+    static {
+        int i;
+        int i;
+    }
+}
--- a/test/tools/javac/fatalErrors/NoJavaLang.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/fatalErrors/NoJavaLang.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -48,7 +48,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     FS="/"
     ;;
   CYGWIN* )
--- a/test/tools/javac/generics/6910550/T6910550d.out	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/generics/6910550/T6910550d.out	Wed Feb 15 17:09:06 2012 +0000
@@ -1,2 +1,2 @@
-T6910550d.java:12:14: compiler.err.already.defined: <X>m(X), T6910550d
+T6910550d.java:12:14: compiler.err.already.defined: kindname.method, <X>m(X), kindname.class, T6910550d
 1 error
--- a/test/tools/javac/generics/inference/6638712/T6638712a.out	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/generics/inference/6638712/T6638712a.out	Wed Feb 15 17:09:06 2012 +0000
@@ -1,2 +1,2 @@
-T6638712a.java:16:41: compiler.err.prob.found.req: (compiler.misc.incompatible.types.1: (compiler.misc.infer.no.conforming.instance.exists: T, java.util.Comparator<T>, java.util.Comparator<java.lang.String>)), <T>java.util.Comparator<T>, java.util.Comparator<java.lang.String>
+T6638712a.java:16:41: compiler.err.invalid.inferred.types: T, (compiler.misc.no.conforming.assignment.exists: java.util.List<java.util.Comparator<?>>, java.lang.Iterable<? extends java.util.Comparator<? super java.lang.String>>)
 1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/7086586/T7086586.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,19 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 7086586
+ * @summary Inference producing null type argument
+ * @compile/fail/ref=T7086586.out -XDrawDiagnostics T7086586.java
+ */
+import java.util.List;
+
+class T7086586 {
+
+    <T> List<T> m(List<? super T> dummy) { return null; }
+
+    void test(List<?> l) {
+        String s = m(l).get(0);
+        Number n = m(l).get(0);
+        Exception e = m(l).get(0);
+        m(l).nonExistentMethod();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/7086586/T7086586.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,5 @@
+T7086586.java:14:21: compiler.err.invalid.inferred.types: T, (compiler.misc.no.conforming.assignment.exists: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super java.lang.Object>)
+T7086586.java:15:21: compiler.err.invalid.inferred.types: T, (compiler.misc.no.conforming.assignment.exists: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super java.lang.Object>)
+T7086586.java:16:24: compiler.err.invalid.inferred.types: T, (compiler.misc.no.conforming.assignment.exists: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super java.lang.Object>)
+T7086586.java:17:10: compiler.err.invalid.inferred.types: T, (compiler.misc.no.conforming.assignment.exists: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super java.lang.Object>)
+4 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/7086601/T7086601a.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,34 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 7086601
+ * @summary Error message bug: cause for method mismatch is 'null'
+ * @compile/fail/ref=T7086601a.out -XDrawDiagnostics T7086601a.java
+ */
+
+class T7086601 {
+    static <S> void m1(Iterable<? super S> s1, Iterable<? super S> s2) { }
+    static void m1(Object o) {}
+
+    static <S> void m2(Iterable<? super S> s1, Iterable<? super S> s2, Iterable<? super S> s3) { }
+    static void m2(Object o) {}
+
+    @SafeVarargs
+    static <S> void m3(Iterable<? super S>... ss) { }
+    static void m3(Object o) {}
+
+    static void test1(Iterable<String> is, Iterable<Integer> ii) {
+        m1(is, ii);
+    }
+
+    static void test2(Iterable<String> is, Iterable<Integer> ii, Iterable<Double> id) {
+        m2(is, ii, id);
+    }
+
+    static void test3(Iterable<String> is, Iterable<Integer> ii) {
+        m3(is, ii);
+    }
+
+    static void test4(Iterable<String> is, Iterable<Integer> ii, Iterable<Double> id) {
+        m3(is, ii, id);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/7086601/T7086601a.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,5 @@
+T7086601a.java:20:9: compiler.err.cant.apply.symbols: kindname.method, m1, java.lang.Iterable<java.lang.String>,java.lang.Iterable<java.lang.Integer>,{(compiler.misc.inapplicable.method: kindname.method, T7086601, m1(java.lang.Object), (compiler.misc.arg.length.mismatch)),(compiler.misc.inapplicable.method: kindname.method, T7086601, <S>m1(java.lang.Iterable<? super S>,java.lang.Iterable<? super S>), (compiler.misc.incompatible.upper.bounds: S, java.lang.Integer,java.lang.String))}
+T7086601a.java:24:9: compiler.err.cant.apply.symbols: kindname.method, m2, java.lang.Iterable<java.lang.String>,java.lang.Iterable<java.lang.Integer>,java.lang.Iterable<java.lang.Double>,{(compiler.misc.inapplicable.method: kindname.method, T7086601, m2(java.lang.Object), (compiler.misc.arg.length.mismatch)),(compiler.misc.inapplicable.method: kindname.method, T7086601, <S>m2(java.lang.Iterable<? super S>,java.lang.Iterable<? super S>,java.lang.Iterable<? super S>), (compiler.misc.incompatible.upper.bounds: S, java.lang.Double,java.lang.Integer,java.lang.String))}
+T7086601a.java:28:9: compiler.err.cant.apply.symbols: kindname.method, m3, java.lang.Iterable<java.lang.String>,java.lang.Iterable<java.lang.Integer>,{(compiler.misc.inapplicable.method: kindname.method, T7086601, m3(java.lang.Object), (compiler.misc.arg.length.mismatch)),(compiler.misc.inapplicable.method: kindname.method, T7086601, <S>m3(java.lang.Iterable<? super S>...), (compiler.misc.incompatible.upper.bounds: S, java.lang.Integer,java.lang.String))}
+T7086601a.java:32:9: compiler.err.cant.apply.symbols: kindname.method, m3, java.lang.Iterable<java.lang.String>,java.lang.Iterable<java.lang.Integer>,java.lang.Iterable<java.lang.Double>,{(compiler.misc.inapplicable.method: kindname.method, T7086601, m3(java.lang.Object), (compiler.misc.arg.length.mismatch)),(compiler.misc.inapplicable.method: kindname.method, T7086601, <S>m3(java.lang.Iterable<? super S>...), (compiler.misc.incompatible.upper.bounds: S, java.lang.Double,java.lang.Integer,java.lang.String))}
+4 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/7086601/T7086601b.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2011, 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 7086601
+ * @summary Error message bug: cause for method mismatch is 'null'
+ */
+
+import com.sun.source.util.JavacTask;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.ArrayList;
+import javax.tools.Diagnostic;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+
+public class T7086601b {
+
+    static int checkCount = 0;
+
+    enum TypeKind {
+        STRING("String", false),
+        INTEGER("Integer", false),
+        NUMBER("Number", false),
+        SERIALIZABLE("java.io.Serializable", true),
+        CLONEABLE("Cloneable", true),
+        X("X", false),
+        Y("Y", false),
+        Z("Z", false);
+
+        String typeStr;
+        boolean isInterface;
+
+        private TypeKind(String typeStr, boolean isInterface) {
+            this.typeStr = typeStr;
+            this.isInterface = isInterface;
+        }
+
+        boolean isSubtypeof(TypeKind other) {
+            return (this == INTEGER && other == NUMBER ||
+                    this == Z && other == Y ||
+                    this == other);
+        }
+    }
+
+    enum MethodCallKind {
+        ARITY_ONE("m(a1);", 1),
+        ARITY_TWO("m(a1, a2);", 2),
+        ARITY_THREE("m(a1, a2, a3);", 3);
+
+        String invokeString;
+        int arity;
+
+        private MethodCallKind(String invokeString, int arity) {
+            this.invokeString = invokeString;
+            this.arity = arity;
+        }
+    }
+
+    public static void main(String... args) throws Exception {
+
+        //create default shared JavaCompiler - reused across multiple compilations
+        JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
+        StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null);
+
+        for (TypeKind a1 : TypeKind.values()) {
+            for (TypeKind a2 : TypeKind.values()) {
+                for (TypeKind a3 : TypeKind.values()) {
+                    for (MethodCallKind mck : MethodCallKind.values()) {
+                        new T7086601b(a1, a2, a3, mck).run(comp, fm);
+                    }
+                }
+            }
+        }
+        System.out.println("Total check executed: " + checkCount);
+    }
+
+    TypeKind a1;
+    TypeKind a2;
+    TypeKind a3;
+    MethodCallKind mck;
+    JavaSource source;
+    DiagnosticChecker diagChecker;
+
+    T7086601b(TypeKind a1, TypeKind a2, TypeKind a3, MethodCallKind mck) {
+        this.a1 = a1;
+        this.a2 = a2;
+        this.a3 = a3;
+        this.mck = mck;
+        this.source = new JavaSource();
+        this.diagChecker = new DiagnosticChecker();
+    }
+
+    class JavaSource extends SimpleJavaFileObject {
+
+        final String bodyTemplate = "import java.util.List;\n"+
+                              "class Test {\n" +
+                              "   <Z> void m(List<? super Z> l1) { }\n" +
+                              "   <Z> void m(List<? super Z> l1, List<? super Z> l2) { }\n" +
+                              "   <Z> void m(List<? super Z> l1, List<? super Z> l2, List<? super Z> l3) { }\n" +
+                              "   <X,Y,Z extends Y> void test(List<#A1> a1, List<#A2> a2, List<#A3> a3) { #MC } }";
+
+        String source;
+
+        public JavaSource() {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+            source = bodyTemplate.replace("#A1", a1.typeStr)
+                             .replace("#A2", a2.typeStr).replace("#A3", a3.typeStr)
+                             .replace("#MC", mck.invokeString);
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return source;
+        }
+    }
+
+    void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception {
+        JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
+                null, null, Arrays.asList(source));
+        try {
+            ct.analyze();
+        } catch (Throwable ex) {
+            throw new AssertionError("Error thron when compiling the following code:\n" + source.getCharContent(true));
+        }
+        check();
+    }
+
+    void check() {
+        checkCount++;
+
+        boolean errorExpected = false;
+
+        if (mck.arity > 1) {
+            TypeKind[] argtypes = { a1, a2, a3 };
+            ArrayList<TypeKind> classes = new ArrayList<>();
+            for (int i = 0 ; i < mck.arity ; i ++ ) {
+                if (!argtypes[i].isInterface) {
+                    classes.add(argtypes[i]);
+                }
+            }
+            boolean glb_exists = true;
+            for (TypeKind arg_i : classes) {
+                glb_exists = true;
+                for (TypeKind arg_j : classes) {
+                    if (!arg_i.isSubtypeof(arg_j)) {
+                        glb_exists = false;
+                        break;
+                    }
+                }
+                if (glb_exists) break;
+            }
+            errorExpected = !glb_exists;
+        }
+
+        if (errorExpected != diagChecker.errorFound) {
+            throw new Error("invalid diagnostics for source:\n" +
+                source.getCharContent(true) +
+                "\nFound error: " + diagChecker.errorFound +
+                "\nExpected error: " + errorExpected);
+        }
+    }
+
+    static class DiagnosticChecker implements javax.tools.DiagnosticListener<JavaFileObject> {
+
+        boolean errorFound;
+
+        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
+            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
+                errorFound = true;
+            }
+        }
+    }
+}
--- a/test/tools/javac/innerClassFile/Driver.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/innerClassFile/Driver.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -53,7 +53,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     FS="/"
     ;;
   Windows* )
--- a/test/tools/javac/javazip/Test.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/javazip/Test.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -41,13 +41,13 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     FS="/"
     SCR=`pwd`
     ;;
   CYGWIN* )
     FS="/"
-    SCR=`pwd | cygpath -d`
+    SCR=`pwd | cygpath -d -f -`
     ;;
   Windows* )
     FS="\\"
--- a/test/tools/javac/links/links.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/links/links.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -53,7 +53,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     NULL=/dev/null
     PS=":"
     FS="/"
--- a/test/tools/javac/newlines/Newlines.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/newlines/Newlines.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -50,7 +50,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     FS="/"
     ;;
   Windows* )
--- a/test/tools/javac/stackmap/T4955930.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/stackmap/T4955930.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -41,7 +41,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     FS="/"
     ;;
   Windows_95 | Windows_98 | Windows_NT )
--- a/test/tools/javac/unicode/SupplementaryJavaID6.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/unicode/SupplementaryJavaID6.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -55,7 +55,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     if [ -d /usr/lib/locale/en_US.UTF-8 -o -d /usr/lib/locale/en_US.utf8 ]
     then
         ENV="env LANG=en_US.UTF-8"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/varargs/7097436/T7097436.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,18 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug     7097436
+ * @summary  ClassCastException occurs in assignment expressions without any heap pollutions
+ * @compile/fail/ref=T7097436.out -Xlint:varargs -Werror -XDrawDiagnostics T7097436.java
+ */
+
+import java.util.List;
+
+class T7097436 {
+    @SafeVarargs
+    static void m(List<String>... ls) {
+        Object o = ls; //warning
+        Object[] oArr = ls; //warning
+        String s = ls; // no warning
+        Integer[] iArr = ls; // no warning
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/varargs/7097436/T7097436.out	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,6 @@
+T7097436.java:13:20: compiler.warn.varargs.unsafe.use.varargs.param: ls
+T7097436.java:14:25: compiler.warn.varargs.unsafe.use.varargs.param: ls
+T7097436.java:15:20: compiler.err.prob.found.req: (compiler.misc.incompatible.types), java.util.List<java.lang.String>[], java.lang.String
+T7097436.java:16:26: compiler.err.prob.found.req: (compiler.misc.incompatible.types), java.util.List<java.lang.String>[], java.lang.Integer[]
+2 errors
+2 warnings
--- a/test/tools/javac/varargs/warning/Warn5.java	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javac/varargs/warning/Warn5.java	Wed Feb 15 17:09:06 2012 +0000
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug     6993978
+ * @bug     6993978 7097436
  * @summary Project Coin: Annotation to reduce varargs warnings
  * @author  mcimadamore
  * @run main Warn5
@@ -31,8 +31,8 @@
 import com.sun.source.util.JavacTask;
 import com.sun.tools.javac.api.JavacTool;
 import java.net.URI;
-import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.EnumSet;
 import javax.tools.Diagnostic;
 import javax.tools.JavaCompiler;
 import javax.tools.JavaFileObject;
@@ -95,7 +95,6 @@
         METHOD("void m"),
         CONSTRUCTOR("Test");
 
-
         String name;
 
         MethodKind(String name) {
@@ -155,7 +154,124 @@
         }
     }
 
-    static class JavaSource extends SimpleJavaFileObject {
+    enum WarningKind {
+        UNSAFE_BODY,
+        UNSAFE_DECL,
+        MALFORMED_SAFEVARARGS,
+        REDUNDANT_SAFEVARARGS;
+    }
+
+    // Create a single file manager and reuse it for each compile to save time.
+    static StandardJavaFileManager fm = JavacTool.create().getStandardFileManager(null, null, null);
+
+    public static void main(String... args) throws Exception {
+        for (SourceLevel sourceLevel : SourceLevel.values()) {
+            for (XlintOption xlint : XlintOption.values()) {
+                for (TrustMe trustMe : TrustMe.values()) {
+                    for (SuppressLevel suppressLevel : SuppressLevel.values()) {
+                        for (ModifierKind modKind : ModifierKind.values()) {
+                            for (MethodKind methKind : MethodKind.values()) {
+                                for (SignatureKind sig : SignatureKind.values()) {
+                                    for (BodyKind body : BodyKind.values()) {
+                                        new Warn5(sourceLevel,
+                                                xlint,
+                                                trustMe,
+                                                suppressLevel,
+                                                modKind,
+                                                methKind,
+                                                sig,
+                                                body).test();
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    final SourceLevel sourceLevel;
+    final XlintOption xlint;
+    final TrustMe trustMe;
+    final SuppressLevel suppressLevel;
+    final ModifierKind modKind;
+    final MethodKind methKind;
+    final SignatureKind sig;
+    final BodyKind body;
+    final JavaSource source;
+    final DiagnosticChecker dc;
+
+    public Warn5(SourceLevel sourceLevel, XlintOption xlint, TrustMe trustMe, SuppressLevel suppressLevel, ModifierKind modKind, MethodKind methKind, SignatureKind sig, BodyKind body) {
+        this.sourceLevel = sourceLevel;
+        this.xlint = xlint;
+        this.trustMe = trustMe;
+        this.suppressLevel = suppressLevel;
+        this.modKind = modKind;
+        this.methKind = methKind;
+        this.sig = sig;
+        this.body = body;
+        this.source = new JavaSource();
+        this.dc = new DiagnosticChecker();
+    }
+
+    void test() throws Exception {
+        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+        JavacTask ct = (JavacTask)tool.getTask(null, fm, dc,
+                Arrays.asList(xlint.getXlintOption(), "-source", sourceLevel.sourceKey), null, Arrays.asList(source));
+        ct.analyze();
+        check();
+    }
+
+    void check() {
+
+        EnumSet<WarningKind> expectedWarnings = EnumSet.noneOf(WarningKind.class);
+
+        if (sourceLevel == SourceLevel.JDK_7 &&
+                trustMe == TrustMe.TRUST &&
+                suppressLevel != SuppressLevel.VARARGS &&
+                xlint != XlintOption.NONE &&
+                sig.isVarargs && !sig.isReifiableArg && body.hasAliasing &&
+                (methKind == MethodKind.CONSTRUCTOR || (methKind == MethodKind.METHOD && modKind != ModifierKind.NONE))) {
+            expectedWarnings.add(WarningKind.UNSAFE_BODY);
+        }
+
+        if (sourceLevel == SourceLevel.JDK_7 &&
+                trustMe == TrustMe.DONT_TRUST &&
+                sig.isVarargs &&
+                !sig.isReifiableArg &&
+                xlint == XlintOption.ALL) {
+            expectedWarnings.add(WarningKind.UNSAFE_DECL);
+        }
+
+        if (sourceLevel == SourceLevel.JDK_7 &&
+                trustMe == TrustMe.TRUST &&
+                (!sig.isVarargs ||
+                (modKind == ModifierKind.NONE && methKind == MethodKind.METHOD))) {
+            expectedWarnings.add(WarningKind.MALFORMED_SAFEVARARGS);
+        }
+
+        if (sourceLevel == SourceLevel.JDK_7 &&
+                trustMe == TrustMe.TRUST &&
+                xlint != XlintOption.NONE &&
+                suppressLevel != SuppressLevel.VARARGS &&
+                (modKind != ModifierKind.NONE || methKind == MethodKind.CONSTRUCTOR) &&
+                sig.isVarargs &&
+                sig.isReifiableArg) {
+            expectedWarnings.add(WarningKind.REDUNDANT_SAFEVARARGS);
+        }
+
+        if (!expectedWarnings.containsAll(dc.warnings) ||
+                !dc.warnings.containsAll(expectedWarnings)) {
+            throw new Error("invalid diagnostics for source:\n" +
+                    source.getCharContent(true) +
+                    "\nOptions: " + xlint.getXlintOption() +
+                    "\nExpected warnings: " + expectedWarnings +
+                    "\nFound warnings: " + dc.warnings);
+        }
+    }
+
+    class JavaSource extends SimpleJavaFileObject {
 
         String template = "import com.sun.tools.javac.api.*;\n" +
                           "import java.util.List;\n" +
@@ -167,12 +283,11 @@
 
         String source;
 
-        public JavaSource(TrustMe trustMe, SuppressLevel suppressLevel, ModifierKind modKind,
-                MethodKind methKind, SignatureKind meth, BodyKind body) {
+        public JavaSource() {
             super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
             source = template.replace("#T", trustMe.anno).
                     replace("#S", suppressLevel.getSuppressAnno()).
-                    replace("#M", meth.getSignature(modKind, methKind)).
+                    replace("#M", sig.getSignature(modKind, methKind)).
                     replace("#B", body.body);
         }
 
@@ -182,117 +297,34 @@
         }
     }
 
-    public static void main(String... args) throws Exception {
-        for (SourceLevel sourceLevel : SourceLevel.values()) {
-            for (XlintOption xlint : XlintOption.values()) {
-                for (TrustMe trustMe : TrustMe.values()) {
-                    for (SuppressLevel suppressLevel : SuppressLevel.values()) {
-                        for (ModifierKind modKind : ModifierKind.values()) {
-                            for (MethodKind methKind : MethodKind.values()) {
-                                for (SignatureKind sig : SignatureKind.values()) {
-                                    for (BodyKind body : BodyKind.values()) {
-                                        test(sourceLevel,
-                                                xlint,
-                                                trustMe,
-                                                suppressLevel,
-                                                modKind,
-                                                methKind,
-                                                sig,
-                                                body);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    // Create a single file manager and reuse it for each compile to save time.
-    static StandardJavaFileManager fm = JavacTool.create().getStandardFileManager(null, null, null);
-
-    static void test(SourceLevel sourceLevel, XlintOption xlint, TrustMe trustMe, SuppressLevel suppressLevel,
-            ModifierKind modKind, MethodKind methKind, SignatureKind sig, BodyKind body) throws Exception {
-        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
-        JavaSource source = new JavaSource(trustMe, suppressLevel, modKind, methKind, sig, body);
-        DiagnosticChecker dc = new DiagnosticChecker();
-        JavacTask ct = (JavacTask)tool.getTask(null, fm, dc,
-                Arrays.asList(xlint.getXlintOption(), "-source", sourceLevel.sourceKey), null, Arrays.asList(source));
-        ct.analyze();
-        check(sourceLevel, dc, source, xlint, trustMe,
-                suppressLevel, modKind, methKind, sig, body);
-    }
-
-    static void check(SourceLevel sourceLevel, DiagnosticChecker dc, JavaSource source,
-            XlintOption xlint, TrustMe trustMe, SuppressLevel suppressLevel, ModifierKind modKind,
-            MethodKind methKind, SignatureKind meth, BodyKind body) {
+    class DiagnosticChecker implements javax.tools.DiagnosticListener<JavaFileObject> {
 
-        boolean hasPotentiallyUnsafeBody = sourceLevel == SourceLevel.JDK_7 &&
-                trustMe == TrustMe.TRUST &&
-                suppressLevel != SuppressLevel.VARARGS &&
-                xlint != XlintOption.NONE &&
-                meth.isVarargs && !meth.isReifiableArg && body.hasAliasing &&
-                (methKind == MethodKind.CONSTRUCTOR || (methKind == MethodKind.METHOD && modKind != ModifierKind.NONE));
-
-        boolean hasPotentiallyPollutingDecl = sourceLevel == SourceLevel.JDK_7 &&
-                trustMe == TrustMe.DONT_TRUST &&
-                meth.isVarargs &&
-                !meth.isReifiableArg &&
-                xlint == XlintOption.ALL;
-
-        boolean hasMalformedAnnoInDecl = sourceLevel == SourceLevel.JDK_7 &&
-                trustMe == TrustMe.TRUST &&
-                (!meth.isVarargs ||
-                (modKind == ModifierKind.NONE && methKind == MethodKind.METHOD));
-
-        boolean hasRedundantAnnoInDecl = sourceLevel == SourceLevel.JDK_7 &&
-                trustMe == TrustMe.TRUST &&
-                xlint != XlintOption.NONE &&
-                suppressLevel != SuppressLevel.VARARGS &&
-                (modKind != ModifierKind.NONE || methKind == MethodKind.CONSTRUCTOR) &&
-                meth.isVarargs &&
-                meth.isReifiableArg;
-
-        if (hasPotentiallyUnsafeBody != dc.hasPotentiallyUnsafeBody ||
-                hasPotentiallyPollutingDecl != dc.hasPotentiallyPollutingDecl ||
-                hasMalformedAnnoInDecl != dc.hasMalformedAnnoInDecl ||
-                hasRedundantAnnoInDecl != dc.hasRedundantAnnoInDecl) {
-            throw new Error("invalid diagnostics for source:\n" +
-                    source.getCharContent(true) +
-                    "\nOptions: " + xlint.getXlintOption() +
-                    "\nExpected potentially unsafe body warning: " + hasPotentiallyUnsafeBody +
-                    "\nExpected potentially polluting decl warning: " + hasPotentiallyPollutingDecl +
-                    "\nExpected malformed anno error: " + hasMalformedAnnoInDecl +
-                    "\nExpected redundant anno warning: " + hasRedundantAnnoInDecl +
-                    "\nFound potentially unsafe body warning: " + dc.hasPotentiallyUnsafeBody +
-                    "\nFound potentially polluting decl warning: " + dc.hasPotentiallyPollutingDecl +
-                    "\nFound malformed anno error: " + dc.hasMalformedAnnoInDecl +
-                    "\nFound redundant anno warning: " + dc.hasRedundantAnnoInDecl);
-        }
-    }
-
-    static class DiagnosticChecker implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean hasPotentiallyUnsafeBody = false;
-        boolean hasPotentiallyPollutingDecl = false;
-        boolean hasMalformedAnnoInDecl = false;
-        boolean hasRedundantAnnoInDecl = false;
+        EnumSet<WarningKind> warnings = EnumSet.noneOf(WarningKind.class);
 
         public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
             if (diagnostic.getKind() == Diagnostic.Kind.WARNING) {
                     if (diagnostic.getCode().contains("unsafe.use.varargs.param")) {
-                        hasPotentiallyUnsafeBody = true;
+                        setWarning(WarningKind.UNSAFE_BODY);
                     } else if (diagnostic.getCode().contains("redundant.trustme")) {
-                        hasRedundantAnnoInDecl = true;
+                        setWarning(WarningKind.REDUNDANT_SAFEVARARGS);
                     }
             } else if (diagnostic.getKind() == Diagnostic.Kind.MANDATORY_WARNING &&
                     diagnostic.getCode().contains("varargs.non.reifiable.type")) {
-                hasPotentiallyPollutingDecl = true;
+                setWarning(WarningKind.UNSAFE_DECL);
             } else if (diagnostic.getKind() == Diagnostic.Kind.ERROR &&
                     diagnostic.getCode().contains("invalid.trustme")) {
-                hasMalformedAnnoInDecl = true;
+                setWarning(WarningKind.MALFORMED_SAFEVARARGS);
             }
         }
+
+        void setWarning(WarningKind wk) {
+            if (!warnings.add(wk)) {
+                throw new AssertionError("Duplicate warning of kind " + wk + " in source:\n" + source);
+            }
+        }
+
+        boolean hasWarning(WarningKind wk) {
+            return warnings.contains(wk);
+        }
     }
 }
--- a/test/tools/javah/6257087/foo.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javah/6257087/foo.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -41,7 +41,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     PS=":"
     FS="/"
     ;;
--- a/test/tools/javah/ConstMacroTest.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javah/ConstMacroTest.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -56,7 +56,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux )
+  SunOS | Linux | Darwin )
     PS=":"
     FS="/"
     ;;
--- a/test/tools/javah/MissingParamClassTest.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javah/MissingParamClassTest.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -58,7 +58,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     PS=":"
     FS="/"
     ;;
--- a/test/tools/javah/ReadOldClass.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javah/ReadOldClass.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -43,7 +43,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     PS=":"
     FS="/"
     ;;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javah/T7126832/T7126832.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2012, 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 7126832
+ * @compile java.java
+ * @summary com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager cannot be cast
+ * @run main T7126832
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class T7126832 {
+    public static void main(String... args) throws Exception {
+        new T7126832().run();
+    }
+
+    void run() throws Exception {
+        Locale prev = Locale.getDefault();
+        Locale.setDefault(Locale.ENGLISH);
+        try {
+            // Verify that a .java file is correctly diagnosed
+            File ff = writeFile(new File("JavahTest.java"), "class JavahTest {}");
+            test(Arrays.asList(ff.getPath()), 1, "Could not find class file for 'JavahTest.java'.");
+
+            // Verify that a class named 'xx.java' is accepted.
+            // Note that ./xx/java.class exists, so this should work ok
+            test(Arrays.asList("xx.java"), 0, null);
+
+            if (errors > 0) {
+                throw new Exception(errors + " errors occurred");
+            }
+        } finally {
+           Locale.setDefault(prev);
+        }
+    }
+
+    void test(List<String> args, int expectRC, String expectOut) {
+        System.err.println("Test: " + args
+                + " rc:" + expectRC
+                + ((expectOut != null) ? " out:" + expectOut : ""));
+
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = 0;
+        String out = null;
+        try {
+            rc = com.sun.tools.javah.Main.run(args.toArray(new String[args.size()]), pw);
+            out = sw.toString();
+        } catch(Exception ee) {
+            rc = 1;
+            out = ee.toString();;
+        }
+        pw.close();
+        if (!out.isEmpty()) {
+            System.err.println(out);
+        }
+        if (rc != expectRC) {
+            error("Unexpected exit code: " + rc + "; expected: " + expectRC);
+        }
+        if (expectOut != null && !out.contains(expectOut)) {
+            error("Expected string not found: " + expectOut);
+        }
+
+        System.err.println();
+    }
+
+    File writeFile(File ff, String ss) throws IOException {
+        if (ff.getParentFile() != null)
+            ff.getParentFile().mkdirs();
+
+        try (FileWriter out = new FileWriter(ff)) {
+            out.write(ss);
+        }
+        return ff;
+    }
+
+    void error(String msg) {
+        System.err.println(msg);
+        errors++;
+    }
+
+    int errors;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javah/T7126832/java.java	Wed Feb 15 17:09:06 2012 +0000
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2012, 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 xx;
+class java {
+    int fred;
+}
--- a/test/tools/javap/pathsep.sh	Mon Feb 13 16:21:45 2012 +0000
+++ b/test/tools/javap/pathsep.sh	Wed Feb 15 17:09:06 2012 +0000
@@ -40,7 +40,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | CYGWIN* )
+  SunOS | Linux | Darwin | CYGWIN* )
     FS="/"
     ;;
   Windows* )