changeset 1487:e79c085784c2

Merge
author ewendeli
date Mon, 04 Feb 2013 00:29:20 +0100
parents 6f47d66e3af1 8f74ebe757f3
children dd7c68e93717
files .hgtags
diffstat 28 files changed, 802 insertions(+), 85 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Feb 01 10:25:58 2013 -0800
+++ b/.hgtags	Mon Feb 04 00:29:20 2013 +0100
@@ -199,6 +199,7 @@
 dd3e29d8892fcaba6d76431d5fa9d49e7c088f76 jdk7u6-b23
 6aac89e84fc96d15bb78b13aa71c9e6b73d7237e jdk7u6-b24
 bcd1d067d525065630deb98b678bc00b499adbe1 jdk7u6-b30
+2d6017454236d4e95aad7feaff5fc92a612598f4 jdk7u6-b31
 2d6017454236d4e95aad7feaff5fc92a612598f4 jdk7u7-b10
 27041587508dbc4e08c956ba98a11ce0d5608dc4 jdk7u7-b30
 b92a9f4f6bce4ec500ed3adb8203e6424b579f94 jdk7u7-b11
@@ -212,16 +213,16 @@
 0d4cb328938002fa9a2efc8190ea97beae3230a9 jdk7u9-b02
 9148cdb9a18b55ad7d51bb9644b6db812de34eea jdk7u9-b04
 1de4a0865a714076b4922a9a7119adb98aee23f2 jdk7u9-b05
-8dfbebb98865d822ddd9e0b9641d21e8bdb8a866 jdk7u10-b10
-01c6dde274bd520067264231b3015c37e8e62d24 jdk7u10-b11
-1fb02747d3bce646374c2cab95048c516cec6b01 jdk7u10-b12
-14735b3d8bdffc7892f1db04b6262bdaad2eb9d7 jdk7u10-b13
-f555fcdbd07156ee11b25fb4ac106065bbf496b4 jdk7u10-b14
-dfcd16ac3fbcabed815b8ef4e792716cce0bce21 jdk7u10-b15
-eaa8a0141c35edc382d7ce0b1148912db8422b16 jdk7u10-b16
-7101b3e80e96b000b0b4f0bd7fe4dd7910d02f74 jdk7u10-b17
-4f529e320d83f517a55065b4710c7f1e5ff692c9 jdk7u10-b18
-1e5aed8511b9bea5c2ebe51a2d9094be8bac73cc jdk7u10-b30
+a35ca56cf8d09b92511f0cd71208a2ea05c8a338 jdk7u8-b01
+41bc8da868e58f7182d26b2ab9b6f8a4b09894ed jdk7u8-b02
+df5cbe436d3460af4667d416877e03400de54524 jdk7u8-b03
+d4296a07e45a0cffbca17c608916ff6bcec78d75 jdk7u8-b04
+1b7eaaffd58359639346661196309005a374192f jdk7u8-b05
+e1f380574f5490ef785282b81b6b38626109444b jdk7u10-b06
+cd18b83736af19afbccce4b7351c5a3c857356ac jdk7u10-b07
+3204f355a32d83ffceeed1c0c8a52a2d834ae29f jdk7u10-b08
+0b90d3480dbfc16aa3901df249b3cb21bcfa0b32 jdk7u10-b09
+87683444edad33cc9f4bbcd9008d98ba34350ded jdk7u12-b01
 b01338429ab6821f44d19601de433b538942b53d jdk7u11-b20
 aeef1c7e43bc2d4a0960ebf42b642f7a34ec8afc jdk7u11-b21
 eaa8a0141c35edc382d7ce0b1148912db8422b16 jdk7u11-b03
@@ -232,3 +233,12 @@
 a0d9abc405580d6fa0ae217fab96608285a38c41 jdk7u11-b08
 a778aaf53c52f78c92f29a1220d9f46de94c9247 jdk7u13-b09
 761b933e269693fd689c2af5d8317201b2172dbb jdk7u13-b20
+12996c33d506d741ae7c3cc8e2aa2f650a36b839 jdk7u12-b02
+3fe61a8a2cfb02ee2b1cd4cd257b76c5b8668cd3 jdk7u12-b03
+e2adb6f53caaa618521bdf965bc484c7ffae190f jdk7u12-b04
+454ce2fa72e9ad14e83ebf54636c196d75e35509 jdk7u12-b05
+ab820babd394eed07c58bc2bffc58b0d92ca39b8 jdk7u12-b06
+382bab6d9682eefa2185a1643dfa32d65b6c20e5 jdk7u12-b07
+7c0c3aeb2c603baba2cabba9adc5a0a49afb4f47 jdk7u12-b08
+96c4f3ec63552a87a825baabd7f0dfafec299483 jdk7u12-b09
+e5b1403fa68abe3ac7174c031f19e6ecf77624a0 jdk7u14-b10
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Mon Feb 04 00:29:20 2013 +0100
@@ -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
@@ -227,46 +227,44 @@
             String[] os = options[oi];
             String opt = os[0].toLowerCase();
             if (opt.equals("-footer")) {
-                footer =  os[1];
-            } else  if (opt.equals("-header")) {
-                header =  os[1];
-            } else  if (opt.equals("-packagesheader")) {
-                packagesheader =  os[1];
-            } else  if (opt.equals("-doctitle")) {
-                doctitle =  os[1];
-            } else  if (opt.equals("-windowtitle")) {
-                windowtitle =  os[1];
-            } else  if (opt.equals("-top")) {
-                top =  os[1];
-            } else  if (opt.equals("-bottom")) {
-                bottom =  os[1];
-            } else  if (opt.equals("-helpfile")) {
-                helpfile =  os[1];
-            } else  if (opt.equals("-stylesheetfile")) {
-                stylesheetfile =  os[1];
-            } else  if (opt.equals("-charset")) {
-                charset =  os[1];
+                footer = os[1];
+            } else if (opt.equals("-header")) {
+                header = os[1];
+            } else if (opt.equals("-packagesheader")) {
+                packagesheader = os[1];
+            } else if (opt.equals("-doctitle")) {
+                doctitle = os[1];
+            } else if (opt.equals("-windowtitle")) {
+                windowtitle = os[1];
+            } else if (opt.equals("-top")) {
+                top = os[1];
+            } else if (opt.equals("-bottom")) {
+                bottom = os[1];
+            } else if (opt.equals("-helpfile")) {
+                helpfile = os[1];
+            } else if (opt.equals("-stylesheetfile")) {
+                stylesheetfile = os[1];
+            } else if (opt.equals("-charset")) {
+                charset = os[1];
             } else if (opt.equals("-xdocrootparent")) {
                 docrootparent = os[1];
-            } else  if (opt.equals("-nohelp")) {
+            } else if (opt.equals("-nohelp")) {
                 nohelp = true;
-            } else  if (opt.equals("-splitindex")) {
+            } else if (opt.equals("-splitindex")) {
                 splitindex = true;
-            } else  if (opt.equals("-noindex")) {
+            } else if (opt.equals("-noindex")) {
                 createindex = false;
-            } else  if (opt.equals("-use")) {
+            } else if (opt.equals("-use")) {
                 classuse = true;
-            } else  if (opt.equals("-notree")) {
+            } else if (opt.equals("-notree")) {
                 createtree = false;
-            } else  if (opt.equals("-nodeprecatedlist")) {
+            } else if (opt.equals("-nodeprecatedlist")) {
                 nodeprecatedlist = true;
-            } else  if (opt.equals("-nosince")) {
-                nosince = true;
-            } else  if (opt.equals("-nonavbar")) {
+            } else if (opt.equals("-nonavbar")) {
                 nonavbar = true;
-            } else  if (opt.equals("-nooverview")) {
+            } else if (opt.equals("-nooverview")) {
                 nooverview = true;
-            } else  if (opt.equals("-overview")) {
+            } else if (opt.equals("-overview")) {
                 overview = true;
             }
         }
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Mon Feb 04 00:29:20 2013 +0100
@@ -364,19 +364,21 @@
             if (opt.equals("-d")) {
                 destDirName = addTrailingFileSep(os[1]);
                 docFileDestDirName = destDirName;
-            } else  if (opt.equals("-docfilessubdirs")) {
+            } else if (opt.equals("-docfilessubdirs")) {
                 copydocfilesubdirs = true;
-            } else  if (opt.equals("-docencoding")) {
+            } else if (opt.equals("-docencoding")) {
                 docencoding = os[1];
-            } else  if (opt.equals("-encoding")) {
+            } else if (opt.equals("-encoding")) {
                 encoding = os[1];
-            } else  if (opt.equals("-author")) {
+            } else if (opt.equals("-author")) {
                 showauthor = true;
-            } else  if (opt.equals("-version")) {
+            } else if (opt.equals("-nosince")) {
+                nosince = true;
+            } else if (opt.equals("-version")) {
                 showversion = true;
-            } else  if (opt.equals("-nodeprecated")) {
+            } else if (opt.equals("-nodeprecated")) {
                 nodeprecated = true;
-            } else  if (opt.equals("-sourcepath")) {
+            } else if (opt.equals("-sourcepath")) {
                 sourcepath = os[1];
             } else if (opt.equals("-classpath") &&
                        sourcepath.length() == 0) {
@@ -400,17 +402,17 @@
                     message.warning("doclet.sourcetab_warning");
                     sourcetab = DocletConstants.DEFAULT_TAB_STOP_LENGTH;
                 }
-            } else  if (opt.equals("-notimestamp")) {
+            } else if (opt.equals("-notimestamp")) {
                 notimestamp = true;
-            } else  if (opt.equals("-nocomment")) {
+            } else if (opt.equals("-nocomment")) {
                 nocomment = true;
             } else if (opt.equals("-tag") || opt.equals("-taglet")) {
                 customTagStrs.add(os);
             } else if (opt.equals("-tagletpath")) {
                 tagletpath = os[1];
-            } else  if (opt.equals("-keywords")) {
+            } else if (opt.equals("-keywords")) {
                 keywords = true;
-            } else  if (opt.equals("-serialwarn")) {
+            } else if (opt.equals("-serialwarn")) {
                 serialwarn = true;
             } else if (opt.equals("-group")) {
                 group.checkPackageGroups(os[1], os[2]);
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ExpertTaglet.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ExpertTaglet.java	Mon Feb 04 00:29:20 2013 +0100
@@ -1,6 +1,26 @@
 /*
- * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * Copyright (c) 2006, 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.
  */
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Mon Feb 04 00:29:20 2013 +0100
@@ -600,6 +600,7 @@
         ArrayList<Taglet> mTags = new ArrayList<Taglet>(customTags.size());
         ArrayList<Taglet> iTags = new ArrayList<Taglet>(customTags.size());
         ArrayList<Taglet> oTags = new ArrayList<Taglet>(customTags.size());
+        ArrayList<Taglet> sTags = new ArrayList<Taglet>();
         Taglet current;
         while (it.hasNext()) {
             current = it.next();
@@ -634,11 +635,12 @@
         inlineTags = iTags.toArray(new Taglet[] {});
 
         //Init the serialized form tags
-        serializedFormTags = new Taglet[4];
-        serializedFormTags[0] = customTags.get("serialData");
-        serializedFormTags[1] = customTags.get("throws");
-        serializedFormTags[2] = customTags.get("since");
-        serializedFormTags[3] = customTags.get("see");
+        sTags.add(customTags.get("serialData"));
+        sTags.add(customTags.get("throws"));
+        if (!nosince)
+            sTags.add(customTags.get("since"));
+        sTags.add(customTags.get("see"));
+        serializedFormTags = sTags.toArray(new Taglet[] {});
     }
 
     /**
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java	Mon Feb 04 00:29:20 2013 +0100
@@ -372,7 +372,13 @@
                     while((n = in.read(buf))>0) out.write(buf,0,n);
                 } else {
                     BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-                    BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out));
+                    BufferedWriter writer;
+                    if (configuration.docencoding == null) {
+                        writer = new BufferedWriter(new OutputStreamWriter(out));
+                    } else {
+                        writer = new BufferedWriter(new OutputStreamWriter(out,
+                            configuration.docencoding));
+                    }
                     try {
                         String line;
                         while ((line = reader.readLine()) != null) {
--- a/src/share/classes/com/sun/tools/javac/code/Types.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Mon Feb 04 00:29:20 2013 +0100
@@ -1616,9 +1616,14 @@
      * type parameters in t are deleted.
      */
     public Type erasure(Type t) {
-        return erasure(t, false);
+        return eraseNotNeeded(t)? t : erasure(t, false);
     }
     //where
+    private boolean eraseNotNeeded(Type t) {
+        return (t.tag <= lastBaseTag) || (syms.stringType.tsym == t.tsym);
+    }
+
+    //where
     private Type erasure(Type t, boolean recurse) {
         if (t.tag <= lastBaseTag)
             return t; /* fast special case */
--- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Feb 04 00:29:20 2013 +0100
@@ -1649,13 +1649,15 @@
         for (Scope.Entry e1 = t1.tsym.members().elems; e1 != null; e1 = e1.sibling) {
             Symbol s1 = e1.sym;
             Type st1 = null;
-            if (s1.kind != MTH || !s1.isInheritedIn(site.tsym, types)) continue;
+            if (s1.kind != MTH || !s1.isInheritedIn(site.tsym, types) ||
+                    (s1.flags() & SYNTHETIC) != 0) continue;
             Symbol impl = ((MethodSymbol)s1).implementation(site.tsym, types, false);
             if (impl != null && (impl.flags() & ABSTRACT) == 0) continue;
             for (Scope.Entry e2 = t2.tsym.members().lookup(s1.name); e2.scope != null; e2 = e2.next()) {
                 Symbol s2 = e2.sym;
                 if (s1 == s2) continue;
-                if (s2.kind != MTH || !s2.isInheritedIn(site.tsym, types)) continue;
+                if (s2.kind != MTH || !s2.isInheritedIn(site.tsym, types) ||
+                        (s2.flags() & SYNTHETIC) != 0) continue;
                 if (st1 == null) st1 = types.memberType(t1, s1);
                 Type st2 = types.memberType(t2, s2);
                 if (types.overrideEquivalent(st1, st2)) {
--- a/src/share/classes/com/sun/tools/javac/comp/Lower.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java	Mon Feb 04 00:29:20 2013 +0100
@@ -3458,7 +3458,6 @@
                 JCExpression expression = oneCase.getExpression();
 
                 if (expression != null) { // expression for a "default" case is null
-                    expression = TreeInfo.skipParens(expression);
                     String labelExpr = (String) expression.type.constValue();
                     Integer mapping = caseLabelToPosition.put(labelExpr, casePosition);
                     Assert.checkNull(mapping);
--- a/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Mon Feb 04 00:29:20 2013 +0100
@@ -247,7 +247,7 @@
             JCTry t = (JCTry) tree;
             return endPos((t.finalizer != null)
                           ? t.finalizer
-                          : t.catchers.last().body);
+                          : (t.catchers.isEmpty()? t.body : t.catchers.last().body));
         } else
             return tree.pos;
     }
--- a/src/share/classes/com/sun/tools/javah/JavahTask.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/src/share/classes/com/sun/tools/javah/JavahTask.java	Mon Feb 04 00:29:20 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, 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
@@ -506,7 +506,7 @@
         List<String> opts = new ArrayList<String>();
         opts.add("-proc:only");
         opts.addAll(javac_extras);
-        CompilationTask t = c.getTask(log, fileManager, diagnosticListener, opts, internalize(classes), null);
+        CompilationTask t = c.getTask(log, fileManager, diagnosticListener, opts, classes, null);
         JavahProcessor p = new JavahProcessor(g);
         t.setProcessors(Collections.singleton(p));
 
@@ -516,14 +516,6 @@
         return ok;
     }
 
-    private List<String> internalize(List<String> classes) {
-        List<String> l = new ArrayList<String>();
-        for (String c: classes) {
-            l.add(c.replace('$', '.'));
-        }
-        return l;
-    }
-
     private List<File> pathToFiles(String path) {
         List<File> files = new ArrayList<File>();
         for (String f: path.split(File.pathSeparator)) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testDocEncoding/TestDocEncoding.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,81 @@
+/*
+ * 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
+ * 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.
+ */
+
+/*
+ * Portions Copyright (c) 2012 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug      8000743
+ * @summary  Run tests on -docencoding to see if the value is
+             used for stylesheet as well.
+ * @author   jayashree viswanathan
+ * @library  ../lib/
+ * @build    JavadocTester TestDocEncoding
+ * @run main TestDocEncoding
+ */
+
+public class TestDocEncoding extends JavadocTester {
+
+    //Test information.
+    private static final String BUG_ID = "8000743";
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-docencoding", "Cp930",
+        "-sourcepath", SRC_DIR, "pkg"
+    };
+
+    private static final String[][] TEST = NO_TEST;
+
+    private static final String[][] NEGATED_TEST = {
+        {BUG_ID + FS + "stylesheet.css",
+            "body {" + NL + "    background-color:#ffffff;"}
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestDocEncoding tester = new TestDocEncoding();
+        run(tester, ARGS, TEST, NEGATED_TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testDocEncoding/pkg/Test.java	Mon Feb 04 00:29:20 2013 +0100
@@ -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.
+ *
+ * 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.
+ */
+
+/*
+ * Portions Copyright (c) 2012 IBM Corporation
+ */
+
+package pkg;
+
+public class Test {}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testSinceTag/TestSinceTag.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,84 @@
+/*
+ * 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      7180906
+ * @summary  Test to make sure that the since tag works correctly
+ * @author   Bhavesh Patel
+ * @library  ../lib/
+ * @build    JavadocTester TestSinceTag
+ * @run main TestSinceTag
+ */
+
+public class TestSinceTag extends JavadocTester {
+
+    //Test information.
+    private static final String BUG_ID = "7180906";
+
+    //Javadoc arguments.
+    private static final String[] ARGS1 = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"
+    };
+
+    private static final String[] ARGS2 = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-nosince", "pkg1"
+    };
+
+    //Input for string search tests.
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "pkg1" + FS + "C1.html",
+            "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+            "  <dd>JDK1.0</dd>"
+        },
+        {BUG_ID + FS + "serialized-form.html",
+            "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+            "  <dd>1.4</dd>"
+        }
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestSinceTag tester = new TestSinceTag();
+        run(tester, ARGS1, TEST, NO_TEST);
+        run(tester, ARGS2, NO_TEST, TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testSinceTag/pkg1/C1.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+package pkg1;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A class comment for testing.
+ *
+ * @author      Bhavesh Patel
+ * @since       JDK1.0
+ */
+public class C1 implements Serializable {
+
+    /**
+     * This field indicates whether the C1 is undecorated.
+     *
+     * @see #setUndecorated(boolean)
+     * @since 1.4
+     * @serial
+     * @deprecated As of JDK version 1.5, replaced by
+     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+     */
+    @Deprecated
+    public boolean undecorated = false;
+
+    /**
+     * This enum specifies the possible modal exclusion types.
+     *
+     * @since 1.6
+     */
+    public static enum ModalExclusionType {
+
+        /**
+         * No modal exclusion.
+         */
+        NO_EXCLUDE,
+        /**
+         * <code>APPLICATION_EXCLUDE</code> indicates that a top-level window
+         * won't be blocked by any application-modal dialogs. Also, it isn't
+         * blocked by document-modal dialogs from outside of its child hierarchy.
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * Constructor.
+     *
+     * @param title the title
+     * @param test boolean value
+     * @exception IllegalArgumentException if the <code>owner</code>'s
+     *     <code>GraphicsConfiguration</code> is not from a screen device
+     * @exception HeadlessException
+     */
+    public C1(String title, boolean test) {
+    }
+
+    public C1(String title) {
+    }
+
+    /**
+     * Method comments.
+     * @param  undecorated <code>true</code> if no decorations are
+     *         to be enabled;
+     *         <code>false</code> if decorations are to be enabled.
+     * @see    #readObject()
+     * @since 1.4
+     */
+    public void setUndecorated(boolean undecorated) {
+        /* Make sure we don't run in the middle of peer creation.*/
+    }
+
+    /**
+     * @see #setUndecorated(boolean)
+     */
+    public void readObject() throws IOException {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/StringsInSwitch/7181320/BinOpInCaseLabel.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,38 @@
+/*
+ * 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     7181320
+ * @summary javac NullPointerException for switch labels with cast to String expressions
+ * @compile BinOpInCaseLabel.java
+ */
+
+public class BinOpInCaseLabel {
+    public static void main(String [] args) {
+        switch (args[0]) {
+            case "hello" + "world":
+                break;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/StringsInSwitch/7181320/CastInCaseLabel.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,38 @@
+/*
+ * 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     7181320
+ * @summary javac NullPointerException for switch labels with cast to String expressions
+ * @compile CastInCaseLabel.java
+ */
+
+public class CastInCaseLabel {
+    public static void main(String [] args) {
+        switch (args[0]) {
+            case (String)"hello":
+                break;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/StringsInSwitch/7181320/CondExprInCaseLabel.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,39 @@
+/*
+ * 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     7181320
+ * @summary javac NullPointerException for switch labels with cast to String expressions
+ * @compile CondExprInCaseLabel.java
+ */
+
+public class CondExprInCaseLabel {
+    public static void main(String [] args) {
+        final boolean cond = true;
+        switch (args[0]) {
+            case cond ? "hello" : "world":
+                break;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/StringsInSwitch/7181320/CondExprInCaseLabel1.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,39 @@
+/*
+ * 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     7181320
+ * @summary javac NullPointerException for switch labels with cast to String expressions
+ * @compile CondExprInCaseLabel1.java
+ */
+
+public class CondExprInCaseLabel1 {
+    public static void main(String [] args) {
+        final boolean cond = true;
+        switch (args[0]) {
+            case cond ? (String)"hello" : "world":
+                break;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/StringsInSwitch/7181320/CondExprInCaseLabel2.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,39 @@
+/*
+ * 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     7181320
+ * @summary javac NullPointerException for switch labels with cast to String expressions
+ * @compile CondExprInCaseLabel2.java
+ */
+
+public class CondExprInCaseLabel2 {
+    public static void main(String [] args) {
+        final boolean cond = true;
+        switch (args[0]) {
+            case cond ? "hello" : (String)"world":
+                break;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/TryWithResources/T7178324.java	Mon Feb 04 00:29:20 2013 +0100
@@ -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.
+ *
+ * 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 7178324
+ * @summary Crash when compiling for(i : x) try(AutoCloseable x = ...) {}
+ * @compile T7178324.java
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+class T7178324 {
+    public static void main(String[] args) throws Exception {
+        List<File> files = new ArrayList<>();
+        for (File f : files)
+            try (FileInputStream is = new FileInputStream(f)) {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/8004094/B.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+abstract class A {
+
+    private static String s = null;
+
+    static void test() {
+        new Object() {
+            void m() {
+                Object o = s;
+            }
+        };
+    }
+}
+
+public abstract class B<T> extends A {
+
+    private static Integer i = null;
+
+    static void test() {
+        new Object() {
+            void m() {
+                Object o = i;
+            }
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/8004094/T8004094.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,32 @@
+/*
+ * 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 8004094
+ * @summary Javac compiler error - synthetic method accessor generated with duplicate name
+ *
+ * @compile B.java T8004094.java
+ */
+
+public class T8004094 extends B<Object> { }
--- a/test/tools/javac/processing/6348499/T6348499.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/test/tools/javac/processing/6348499/T6348499.java	Mon Feb 04 00:29:20 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -47,6 +47,7 @@
     public static void main(String... args) {
         String testSrc = System.getProperty("test.src", ".");
         String testClasses = System.getProperty("test.classes");
+        String testClassPath = System.getProperty("test.class.path", testClasses);
         String A_java = new File(testSrc, "A.java").getPath();
         JavacTool tool = JavacTool.create();
         MyDiagListener dl = new MyDiagListener();
@@ -55,7 +56,7 @@
             fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, "A.java")));
         Iterable<String> opts = Arrays.asList("-proc:only",
                                               "-processor", "A",
-                                              "-processorpath", testClasses);
+                                              "-processorpath", testClassPath);
         StringWriter out = new StringWriter();
         JavacTask task = tool.getTask(out, fm, dl, opts, null, files);
         task.call();
--- a/test/tools/javac/processing/6414633/T6414633.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/test/tools/javac/processing/6414633/T6414633.java	Mon Feb 04 00:29:20 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -43,20 +43,20 @@
     public static void main(String... args) {
         String testSrc = System.getProperty("test.src", ".");
         String testClasses = System.getProperty("test.classes", ".");
+        String testClassPath = System.getProperty("test.class.path", testClasses);
 
         JavacTool tool = JavacTool.create();
         MyDiagListener dl = new MyDiagListener();
         StandardJavaFileManager fm = tool.getStandardFileManager(dl, null, null);
         try {
-            fm.setLocation(StandardLocation.CLASS_PATH, Arrays.asList(new File(testClasses)));
+            fm.setLocation(StandardLocation.CLASS_PATH, pathToFiles(testClassPath));
         } catch (IOException e) {
             throw new AssertionError(e);
         }
         Iterable<? extends JavaFileObject> files =
             fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, A.class.getName()+".java")));
         String[] opts = { "-proc:only",
-                          "-processor", A.class.getName(),
-                          "-classpath", testClasses + System.getProperty("path.separator") + "../../lib" };
+                          "-processor", A.class.getName() };
         JavacTask task = tool.getTask(null, fm, dl, Arrays.asList(opts), null, files);
         task.call();
 
@@ -65,6 +65,15 @@
             throw new AssertionError(dl.diags + " diagnostics reported");
     }
 
+    private static List<File> pathToFiles(String path) {
+        List<File> list = new ArrayList<File>();
+        for (String s: path.split(File.pathSeparator)) {
+            if (!s.isEmpty())
+                list.add(new File(s));
+        }
+        return list;
+    }
+
     private static class MyDiagListener implements DiagnosticListener<JavaFileObject>
     {
         public void report(Diagnostic d) {
--- a/test/tools/javac/processing/6430209/T6430209.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/test/tools/javac/processing/6430209/T6430209.java	Mon Feb 04 00:29:20 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -56,6 +56,7 @@
         // -proc:only -processor b6341534 -cp . ./src/*.java
         String testSrc = System.getProperty("test.src", ".");
         String testClasses = System.getProperty("test.classes") + System.getProperty("path.separator") + "../../lib";
+        String testClassPath = System.getProperty("test.class.path", testClasses);
         JavacTool tool = JavacTool.create();
         MyDiagListener dl = new MyDiagListener();
         StandardJavaFileManager fm = tool.getStandardFileManager(dl, null, null);
@@ -64,7 +65,7 @@
             new File(testSrc, "test0.java"), new File(testSrc, "test1.java")));
         Iterable<String> opts = Arrays.asList("-proc:only",
                                               "-processor", "b6341534",
-                                              "-processorpath", testClasses);
+                                              "-processorpath", testClassPath);
         StringWriter out = new StringWriter();
         JavacTask task = tool.getTask(out, fm, dl, opts, null, files);
         task.call();
--- a/test/tools/javac/processing/T6920317.java	Fri Feb 01 10:25:58 2013 -0800
+++ b/test/tools/javac/processing/T6920317.java	Mon Feb 04 00:29:20 2013 +0100
@@ -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
@@ -156,7 +156,9 @@
         String expect = null;
 
         opts.add("-processorpath");
-        opts.add(System.getProperty("test.classes"));
+        String testClasses = System.getProperty("test.classes");
+        String testClassPath = System.getProperty("test.class.path", testClasses);
+        opts.add(testClassPath);
         opts.add("-processor");
         opts.add(Processor.class.getName());
         opts.add("-proc:only");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javah/T7185778.java	Mon Feb 04 00:29:20 2013 +0100
@@ -0,0 +1,56 @@
+/*
+ * 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 7185778
+ * @summary javah error "Not a valid class name" on class names with dollar signs
+ *   The first two tests are on an inner class name whose name does not contain $.
+ *   The second two tests are on an inner class name whose name does contain $.
+ *   The last test is on an outer class whose name contains $.
+ * @run main T7185778 T7185778$inner
+ * @run main T7185778 T7185778.inner
+ * @run main T7185778 T7185778$inner$
+ * @run main T7185778 T7185778.inner$
+ * @run main T7185778 xx$yy
+ */
+
+public class T7185778 {
+    class inner {
+        native byte[] xxxxx(String name);
+    }
+    class inner$ {
+        native byte[] xxxxx(String name);
+    }
+
+    static public void main(String[] args) {
+        int rc = com.sun.tools.javah.Main.run(args, null);
+        if ( rc != 0) {
+            throw new Error("javah returned non zero: " + rc);
+        }
+    }
+}
+
+class xx$yy {
+    native byte[] xxxxx(String name);
+}