changeset 2586:0fde5fa9febf

Merge
author briangoetz
date Mon, 28 Oct 2013 18:30:14 -0400
parents cc5933483c1a (current diff) 860f1d21763a (diff)
children cacf685c22c7
files .hgtags make/build.properties make/build.xml makefiles/Makefile src/share/classes/com/sun/javadoc/package.html src/share/classes/com/sun/source/tree/LambdaExpressionTree.java src/share/classes/com/sun/source/tree/MemberReferenceTree.java src/share/classes/com/sun/source/tree/Tree.java src/share/classes/com/sun/source/tree/TreeVisitor.java src/share/classes/com/sun/source/util/DocTrees.java src/share/classes/com/sun/source/util/JavacTask.java src/share/classes/com/sun/source/util/Plugin.java src/share/classes/com/sun/source/util/SimpleTreeVisitor.java src/share/classes/com/sun/source/util/TreePath.java src/share/classes/com/sun/source/util/TreeScanner.java src/share/classes/com/sun/tools/classfile/package.html src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java src/share/classes/com/sun/tools/doclets/formats/html/markup/package.html src/share/classes/com/sun/tools/doclets/formats/html/package.html src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/package.html src/share/classes/com/sun/tools/doclets/internal/toolkit/package.html src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/package.html src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/package.html src/share/classes/com/sun/tools/doclets/internal/toolkit/util/package.html src/share/classes/com/sun/tools/doclets/package.html src/share/classes/com/sun/tools/javac/api/JavacTool.java src/share/classes/com/sun/tools/javac/code/Attribute.java src/share/classes/com/sun/tools/javac/code/Flags.java src/share/classes/com/sun/tools/javac/code/Printer.java src/share/classes/com/sun/tools/javac/code/Symbol.java src/share/classes/com/sun/tools/javac/code/SymbolMetadata.java src/share/classes/com/sun/tools/javac/code/Type.java src/share/classes/com/sun/tools/javac/code/Types.java src/share/classes/com/sun/tools/javac/comp/Annotate.java src/share/classes/com/sun/tools/javac/comp/Attr.java src/share/classes/com/sun/tools/javac/comp/Check.java src/share/classes/com/sun/tools/javac/comp/Flow.java src/share/classes/com/sun/tools/javac/comp/Infer.java src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java src/share/classes/com/sun/tools/javac/comp/Lower.java src/share/classes/com/sun/tools/javac/comp/MemberEnter.java src/share/classes/com/sun/tools/javac/comp/Resolve.java src/share/classes/com/sun/tools/javac/comp/TransTypes.java src/share/classes/com/sun/tools/javac/jvm/ClassReader.java src/share/classes/com/sun/tools/javac/jvm/Gen.java src/share/classes/com/sun/tools/javac/jvm/Pool.java src/share/classes/com/sun/tools/javac/main/JavaCompiler.java src/share/classes/com/sun/tools/javac/model/JavacAnnoConstructs.java src/share/classes/com/sun/tools/javac/parser/JavacParser.java src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java src/share/classes/com/sun/tools/javac/resources/compiler.properties src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java src/share/classes/com/sun/tools/javac/tree/JCTree.java src/share/classes/com/sun/tools/javac/tree/Pretty.java src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java src/share/classes/com/sun/tools/javadoc/DocEnv.java src/share/classes/com/sun/tools/javadoc/RootDocImpl.java src/share/classes/com/sun/tools/javap/package.html src/share/classes/com/sun/tools/jdeps/Profiles.java src/share/classes/jdk/Supported.java test/Makefile test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java test/com/sun/javadoc/testNavigation/TestNavigation.java test/com/sun/javadoc/testProfiles/TestProfiles.java test/tools/javac/T8019486/WrongLVTForLambdaTest.java test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.out test/tools/javac/annotations/typeAnnotations/failures/IncompleteVararg.java test/tools/javac/annotations/typeAnnotations/failures/IncompleteVararg.out test/tools/javac/annotations/typeAnnotations/failures/StaticMethods.java test/tools/javac/annotations/typeAnnotations/failures/StaticMethods.out test/tools/javac/diags/examples.not-yet.txt test/tools/javac/diags/examples/CantAnnotateNestedType.java test/tools/javac/diags/examples/CantAnnotateStaticClass.java test/tools/javac/diags/examples/DuplicateAnnotation.java test/tools/javac/diags/examples/RepeatableAnnotationsNotSupported.java test/tools/javac/generics/OverrideBridge.java test/tools/javac/lambda/8016081/T8016081.java test/tools/javac/lambda/LambdaExpr13.java test/tools/javac/lambda/TargetType58.java test/tools/javac/lambda/TestSelfRef.java test/tools/javac/lambdaShapes/org/openjdk/tests/separate/TestHarness.java test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java
diffstat 489 files changed, 12974 insertions(+), 4229 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Oct 11 17:51:08 2013 -0700
+++ b/.hgtags	Mon Oct 28 18:30:14 2013 -0400
@@ -236,3 +236,5 @@
 252f872b8a2f81a416f9127e77924ca56a4578b0 jdk8-b108
 985abf1cd327169a317d4ff4f318a8162a5cd47d jdk8-b109
 41541097533aa3933a018c8c1c426c1871dfd76e jdk8-b110
+af6244ba81b6b8d1bf4ab06587a2067e021e4570 jdk8-b111
+954dd199d6ff3e4cfc42b894c1f611150526eecd jdk8-b112
--- a/make/build.properties	Fri Oct 11 17:51:08 2013 -0700
+++ b/make/build.properties	Mon Oct 28 18:30:14 2013 -0400
@@ -163,11 +163,11 @@
 #
 
 sjavac.includes = \
-        com/sun/tools/sjavac/ 
+        com/sun/tools/sjavac/
 
 sjavac.tests = \
         tools/sjavac
-        
+
 #
 
 # The following files require the latest JDK to be available.
--- a/make/build.xml	Fri Oct 11 17:51:08 2013 -0700
+++ b/make/build.xml	Mon Oct 28 18:30:14 2013 -0400
@@ -89,7 +89,7 @@
       build-classes-TOOL        build the classes for the tool
       build-TOOL                build the jar file and script for the tool
       jtreg-TOOL                build the tool and run the appropriate tests
-      findbugs-TOOL             run findbugs on the tool's source oode
+      findbugs-TOOL             run findbugs on the tool's source code
       TOOL                      build the tool, run the tests, and run findbugs
  - utility definitions
  -->
@@ -360,7 +360,7 @@
             datafile="${build.coverage.dir}/cobertura.ser"/>
     </target>
 
-    <target name="diags-examples" depends="build-javac">
+    <target name="diags-examples" depends="build-javac,build-javap">
         <!-- can override the following on the command line if desired. -->
         <property name="diags.examples.out" location="${build.dir}/diag-examples/diags-examples.html"/>
         <mkdir dir="${build.dir}/diag-examples/classes"/>
@@ -370,7 +370,7 @@
             destdir="${build.dir}/diag-examples/classes"
             includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java,DocCommentProcessor.java"
             sourcepath=""
-            classpath="${dist.lib.dir}/javac.jar"
+            classpath="${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar"
             includeAntRuntime="no"
             debug="${javac.debug}"
             debuglevel="${javac.debuglevel}">
@@ -379,7 +379,7 @@
         <java fork="true"
             jvm="${target.java.home}/bin/java"
             dir="test/tools/javac/diags"
-            classpath="${build.dir}/diag-examples/classes;${dist.lib.dir}/javac.jar"
+            classpath="${build.dir}/diag-examples/classes;${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar"
             classname="RunExamples">
             <jvmarg value="-Dtest.classes=${build.dir}/diag-examples/classes"/>
             <arg value="-examples"/>
--- a/makefiles/BuildLangtools.gmk	Fri Oct 11 17:51:08 2013 -0700
+++ b/makefiles/BuildLangtools.gmk	Mon Oct 28 18:30:14 2013 -0400
@@ -32,44 +32,49 @@
 
 # The BOOT_JAVAC setup uses the bootdir compiler to compile the tools
 # and the bootstrap javac, to be run by the bootdir jvm.
-$(eval $(call SetupJavaCompiler,BOOT_JAVAC,\
-	JAVAC:=$(JAVAC),\
-        SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-        SERVER_JVM:=$(SJAVAC_SERVER_JAVA),\
-        FLAGS:=-XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
+$(eval $(call SetupJavaCompiler,BOOT_JAVAC, \
+    JAVAC := $(JAVAC), \
+    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+    SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
+    FLAGS := -XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
 
 # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied.
-RESOURCE_SUFFIXES:=.gif .xml .css .js javax.tools.JavaCompilerTool
+RESOURCE_SUFFIXES := .gif .xml .css .js javax.tools.JavaCompilerTool
 
 # Now setup the compilation of the properties compilation tool. You can depend
 # upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we
 # add src/share/classes to the sourcepath. This is necessary since the GenStubs
 # program needs to be linked and run towards the new javac sources.
-$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
-		SETUP:=BOOT_JAVAC,\
-		DISABLE_SJAVAC:=true,\
-                ADD_JAVAC_FLAGS:=-Xprefer:source,\
-		SRC:=$(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes,\
-		INCLUDES:=compileproperties genstubs,\
-		BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses))
+$(eval $(call SetupJavaCompilation,BUILD_TOOLS, \
+    SETUP := BOOT_JAVAC, \
+    DISABLE_SJAVAC := true, \
+    ADD_JAVAC_FLAGS := -Xprefer:source, \
+    SRC := $(LANGTOOLS_TOPDIR)/make/tools $(LANGTOOLS_TOPDIR)/src/share/classes, \
+    INCLUDES := compileproperties genstubs, \
+    BIN := $(LANGTOOLS_OUTPUTDIR)/btclasses))
 
 # The compileprops tools compiles a properties file into a resource bundle.
-TOOL_COMPILEPROPS_CMD:=$(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet
+TOOL_COMPILEPROPS_CMD := $(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/btclasses compileproperties.CompileProperties -quiet
+
 # Lookup the properties that need to be compiled into resource bundles.
-PROPSOURCES:=$(shell $(FIND) $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties")
+PROPSOURCES := $(shell $(FIND) $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties")
+
 # Strip away prefix and suffix, leaving for example only: "com/sun/tools/javac/resources/javac_zh_CN"
-PROPPATHS:=$(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties,%,$(PROPSOURCES))
+PROPPATHS := $(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties, %, $(PROPSOURCES))
+
 # Generate the list of java files to be created.
-PROPJAVAS:=$(patsubst %,$(LANGTOOLS_OUTPUTDIR)/gensrc/%.java,$(PROPPATHS))
+PROPJAVAS := $(patsubst %, $(LANGTOOLS_OUTPUTDIR)/gensrc/%.java, $(PROPPATHS))
+
 # Generate the package dirs for the tobe generated java files.
-PROPDIRS:=$(dir $(PROPJAVAS))
+PROPDIRS := $(dir $(PROPJAVAS))
+
 # Now generate a sequence of "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle"
 # suitable to be fed into the CompileProperties command.
-PROPCMDLINE:=$(subst _SPACE_,$(SPACE),$(join $(addprefix -compile_SPACE_,$(PROPSOURCES)), \
-		$(addsuffix _SPACE_java.util.ListResourceBundle,$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/,$(addsuffix .java,$(PROPPATHS))))))
+PROPCMDLINE := $(subst _SPACE_, $(SPACE), $(join $(addprefix -compile_SPACE_, $(PROPSOURCES)), \
+    $(addsuffix _SPACE_java.util.ListResourceBundle, $(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/, $(addsuffix .java, $(PROPPATHS))))))
 
 # Now setup the rule for the generation of the resource bundles.
-$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d : $(PROPSOURCES) $(BUILD_TOOLS)
+$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d: $(PROPSOURCES) $(BUILD_TOOLS)
 	$(RM) -r $(@D)/*
 	$(MKDIR) -p $(@D) $(PROPDIRS)
 	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties
@@ -78,115 +83,119 @@
 	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" > $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties
 	$(ECHO) Compiling $(words $(PROPSOURCES) v1 v2 v3) properties into resource bundles
 	$(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \
-		-compile 	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \
-				java.util.ListResourceBundle \
-		-compile 	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \
-				java.util.ListResourceBundle \
-		-compile	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \
-				java.util.ListResourceBundle \
-		-compile	$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.java \
-				java.util.ListResourceBundle
-	$(ECHO) PROPS_ARE_CREATED=yes > $@
+	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \
+	        $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \
+	        java.util.ListResourceBundle \
+	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \
+	        $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \
+	        java.util.ListResourceBundle \
+	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \
+	        $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \
+	        java.util.ListResourceBundle \
+	    -compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties \
+	        $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.java \
+	        java.util.ListResourceBundle
+	$(ECHO) PROPS_ARE_CREATED = yes > $@
 
 # Trigger the generation of the resource bundles. After the resource bundles have
 # been compiled, then the makefile will restart and the newly created java files
 # will become part of the build further along in the makefile.
 -include $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
 
-ifeq ($(PROPS_ARE_CREATED),yes)
-        # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac
-        # that can be compiled with an old javac. The intermediate javac is then used
-        # to compile javac again and to build the complete new jdk.
-        $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS,\
-		SETUP:=BOOT_JAVAC,\
-		DISABLE_SJAVAC:=true,\
-		SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\
-		EXCLUDES:=com/sun/tools/javac/nio,\
-		COPY:=$(RESOURCE_SUFFIXES),\
-		BIN:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap))
+ifeq ($(PROPS_ARE_CREATED), yes)
+  # Setup the rules to build a dist/bootstrap/lib/javac.jar, ie a smaller intermediate javac
+  # that can be compiled with an old javac. The intermediate javac is then used
+  # to compile javac again and to build the complete new jdk.
+  $(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_LANGTOOLS, \
+      SETUP := BOOT_JAVAC, \
+      DISABLE_SJAVAC := true, \
+      SRC := $(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc, \
+      EXCLUDES := com/sun/tools/javac/nio, \
+      COPY := $(RESOURCE_SUFFIXES), \
+      BIN := $(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap))
+
+  $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC, $(BUILD_BOOTSTRAP_LANGTOOLS), \
+      SRCS := $(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap, \
+      JAR := $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar, \
+      SUFFIXES := .class $(RESOURCE_SUFFIXES)))
 
-        $(eval $(call SetupArchive,ARCHIVE_BOOTSTRAP_JAVAC,$(BUILD_BOOTSTRAP_LANGTOOLS),\
-		SRCS:=$(LANGTOOLS_OUTPUTDIR)/btclasses/bootstrap,\
-		JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar,\
-		SUFFIXES:=.class $(RESOURCE_SUFFIXES)))
+  # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not
+  # yet built. It is currently not needed but might be again in the future. The following
+  # exercises the functionality to verify that it works.
+  TOOL_GENSTUBS_CMD = $(JAVA) \
+       "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
+       -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \
+       genstubs.GenStubs
 
-        # GenStubs is used to bootstrap any dependencies from javac to the new JDK that is not 
-        # yet built. It is currently not needed but might be again in the future. The following
-        # exercises the functionality to verify that it works.
-        TOOL_GENSTUBS_CMD=$(JAVA) \
-             "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
-             -classpath $(LANGTOOLS_OUTPUTDIR)/btclasses \
-             genstubs.GenStubs
-        # We fetch source from the JDK...
-        JDKS=$(JDK_TOPDIR)/src/share/classes
-        # Build the list of classes to generate stubs from. java/util/function/Predicate.java isn't
-        # currently needed, but is used as a demo for now.
-	 STUBSOURCES:=$(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \
-		    -e "$(JDKS)/java/util/function/Predicate.java")
-        # Rewrite the file names into class names because the GenStubs tool require this.
-        STUBCLASSES:=$(subst /,.,$(patsubst $(JDKS)/%.java,%,$(STUBSOURCES)))
+  # We fetch source from the JDK...
+  JDKS = $(JDK_TOPDIR)/src/share/classes
+
+  # Build the list of classes to generate stubs from. java/util/function/Predicate.java isn't
+  # currently needed, but is used as a demo for now.
+
+  STUBSOURCES := $(shell $(FIND) $(JDKS) -name "*.java" | $(GREP) \
+      -e "$(JDKS)/java/util/function/Predicate.java")
+
+  # Rewrite the file names into class names because the GenStubs tool require this.
+  STUBCLASSES := $(subst /,., $(patsubst $(JDKS)/%.java, %, $(STUBSOURCES)))
 
-        # Now setup the build recipe for genstubs.
-        $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d : $(STUBSOURCES) $(BUILD_TOOLS) \
-				$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
-				$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
-	       	$(MKDIR) -p $(@D)
-		$(MKDIR) -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs
-	       	$(ECHO) $(LOG_INFO) Generating stubs from JDK sources.
-	       	($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && $(ECHO) STUBS_ARE_CREATED=yes > $@)
-		if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \
-			$(ECHO) $(LOG_INFO) No changes in the stubs!; \
-			$(RM) -r $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \
-		else \
-			$(ECHO) $(LOG_INFO) Changes in stubs detected!; \
-			$(RM) -r $(@D); \
-			$(MV) $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \
-		fi
-		$(ECHO) STUBS_ARE_CREATED=yes > $@
+  # Now setup the build recipe for genstubs.
+  $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d: $(STUBSOURCES) $(BUILD_TOOLS) \
+      $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+      $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props.d
+	$(MKDIR) -p $(@D)
+	$(MKDIR) -p $(LANGTOOLS_OUTPUTDIR)/tmpstubs
+	$(ECHO) $(LOG_INFO) Generating stubs from JDK sources.
+	($(TOOL_GENSTUBS_CMD) -s $(LANGTOOLS_OUTPUTDIR)/tmpstubs -sourcepath $(JDKS) $(STUBCLASSES) && $(ECHO) STUBS_ARE_CREATED = yes > $@)
+	if $(DIFF) -x "_the*" -rq $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(LANGTOOLS_OUTPUTDIR)/genstubs > /dev/null 2>&1; then \
+	  $(ECHO) $(LOG_INFO) No changes in the stubs!; \
+	  $(RM) -r $(LANGTOOLS_OUTPUTDIR)/tmpstubs; \
+	else \
+	  $(ECHO) $(LOG_INFO) Changes in stubs detected!; \
+	  $(RM) -r $(@D); \
+	  $(MV) $(LANGTOOLS_OUTPUTDIR)/tmpstubs $(@D); \
+	fi
+	$(ECHO) STUBS_ARE_CREATED = yes > $@
 
-        # Trigger a generation of the genstubs java source code and a restart
-        # of the makefile to make sure that the following build setup use the 
-        # newly created java files.
-        -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d
+  # Trigger a generation of the genstubs java source code and a restart
+  # of the makefile to make sure that the following build setup use the
+  # newly created java files.
+  -include $(LANGTOOLS_OUTPUTDIR)/genstubs/_the_stubs.d
 
-	ifeq ($(STUBS_ARE_CREATED),yes)
-                # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar
-                # that generates code for the new jdk that is being built.
-                # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm.
-                $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
-                  JVM:=$(JAVA),\
-                  JAVAC:="-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
-			 -cp $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
-			 com.sun.tools.javac.Main,\
-                  FLAGS:=-XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror,\
-                  SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
-                  SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+  ifeq ($(STUBS_ARE_CREATED), yes)
+    # Setup a compiler configuration using the intermediate javac in dist/bootstrap/lib/javac.jar
+    # that generates code for the new jdk that is being built.
+    # The code compiled by this compiler setup, cannot necessarily be run with the bootstrap jvm.
+    $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE, \
+        JVM := $(JAVA), \
+        JAVAC := "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
+            -cp $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+            com.sun.tools.javac.Main, \
+        FLAGS := -XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror, \
+        SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+        SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
-                $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC,\
-			SETUP:=GENERATE_NEWBYTECODE,\
-			SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \
-			     $(LANGTOOLS_OUTPUTDIR)/genstubs,\
-			EXCLUDES:=java/util java/io java/nio,\
-			COPY:=$(RESOURCE_SUFFIXES),\
-			BIN:=$(LANGTOOLS_OUTPUTDIR)/classes))
+    $(eval $(call SetupJavaCompilation,BUILD_FULL_JAVAC, \
+        SETUP := GENERATE_NEWBYTECODE, \
+        SRC := $(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc \
+            $(LANGTOOLS_OUTPUTDIR)/genstubs, \
+        EXCLUDES := java/util java/io java/nio, \
+        COPY := $(RESOURCE_SUFFIXES), \
+        BIN := $(LANGTOOLS_OUTPUTDIR)/classes))
 
-                $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC,$(BUILD_FULL_JAVAC),\
-			SETUP:=GENERATE_NEWBYTECODE,\
-			SRCS:=$(LANGTOOLS_OUTPUTDIR)/classes,\
-			SUFFIXES:=.class $(RESOURCE_SUFFIXES),\
-			JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar))
+    $(eval $(call SetupArchive,ARCHIVE_FULL_JAVAC, $(BUILD_FULL_JAVAC), \
+        SETUP := GENERATE_NEWBYTECODE, \
+        SRCS := $(LANGTOOLS_OUTPUTDIR)/classes, \
+        SUFFIXES := .class $(RESOURCE_SUFFIXES), \
+        JAR := $(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar))
 
-                $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE,\
-			SRC:=$(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc,\
-			ZIP:=$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip))
+    $(eval $(call SetupZipArchive,ZIP_FULL_JAVAC_SOURCE, \
+        SRC := $(LANGTOOLS_TOPDIR)/src/share/classes $(LANGTOOLS_OUTPUTDIR)/gensrc, \
+        ZIP := $(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip))
 
-                all: 		$(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \
-				$(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \
-	                 	$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
+    all: $(LANGTOOLS_OUTPUTDIR)/dist/lib/classes.jar \
+        $(LANGTOOLS_OUTPUTDIR)/dist/lib/src.zip \
+        $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
 
-        endif
+  endif
 endif
--- a/makefiles/Makefile	Fri Oct 11 17:51:08 2013 -0700
+++ b/makefiles/Makefile	Mon Oct 28 18:30:14 2013 -0400
@@ -24,19 +24,19 @@
 #
 
 # Locate this Makefile
-ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
-    makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
+ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
+  makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
 else
-    makefile_path:=$(lastword $(MAKEFILE_LIST))
+  makefile_path := $(lastword $(MAKEFILE_LIST))
 endif
-repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path))
+repo_dir := $(patsubst %/makefiles/Makefile, %, $(makefile_path))
 
 # What is the name of this subsystem (langtools, corba, etc)?
-subsystem_name:=$(notdir $(repo_dir))
+subsystem_name := $(notdir $(repo_dir))
 
 # Try to locate top-level makefile
-top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile
-ifneq ($(wildcard $(top_level_makefile)),)
+top_level_makefile := $(repo_dir)/../common/makefiles/Makefile
+ifneq ($(wildcard $(top_level_makefile)), )
   $(info Will run $(subsystem_name) target on top-level Makefile)
   $(info WARNING: This is a non-recommended way of building!)
   $(info ===================================================)
--- a/src/share/classes/com/sun/javadoc/Tag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/javadoc/Tag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -72,7 +72,7 @@
      * <code>kind()&nbsp;==&nbsp;name()</code>;
      * the following table lists those cases where there is more
      * than one tag of a given kind:
-     * <p>
+     *
      * <table border="1" cellpadding="4" cellspacing="0" summary="related tags">
      * <tr><th>{@code kind()  }</th>  <th>{@code name()      }</th></tr>
      * <tr><td>{@code @throws }</td>  <td>{@code @throws     }</td></tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/javadoc/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 1998, 2013, 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.
+ */
+
+/**
+The Doclet API (also called the Javadoc API) provides a mechanism
+for clients to inspect the source-level structure of programs and
+libraries, including javadoc comments embedded in the source.
+This is useful for documentation, program checking, automatic
+code generation and many other tools.
+<p>
+
+Doclets are invoked by javadoc and use this API to write out
+program information to files.  For example, the standard doclet is called
+by default and writes out documentation to HTML files.
+<p>
+
+The invocation is defined by the abstract {@link com.sun.javadoc.Doclet} class
+-- the entry point is the {@link com.sun.javadoc.Doclet#start(RootDoc) start} method:
+<pre>
+    public static boolean <b>start</b>(RootDoc root)
+</pre>
+The {@link com.sun.javadoc.RootDoc} instance holds the root of the program structure
+information. From this root all other program structure
+information can be extracted.
+<p>
+
+<a name="terminology"></a>
+<h3>Terminology</h3>
+
+<a name="included"></a>
+When calling javadoc, you pass in package names and source file names --
+these are called the <em>specified</em> packages and classes.
+You also pass in Javadoc options; the <em>access control</em> Javadoc options
+(<code>-public</code>, <code>-protected</code>, <code>-package</code>,
+and <code>-private</code>) filter program elements, producing a
+result set, called the <em>included</em> set, or "documented" set.
+(The unfiltered set is also available through
+{@link com.sun.javadoc.PackageDoc#allClasses(boolean) allClasses(false)}.)
+<p>
+
+<a name="class"></a>
+Throughout this API, the term <em>class</em> is normally a
+shorthand for "class or interface", as in: {@link com.sun.javadoc.ClassDoc},
+{@link com.sun.javadoc.PackageDoc#allClasses() allClasses()}, and
+{@link com.sun.javadoc.PackageDoc#findClass(String) findClass(String)}.
+In only a couple of other places, it means "class, as opposed to interface",
+as in:  {@link com.sun.javadoc.Doc#isClass()}.
+In the second sense, this API calls out four kinds of classes:
+{@linkplain com.sun.javadoc.Doc#isOrdinaryClass() ordinary classes},
+{@linkplain com.sun.javadoc.Doc#isEnum() enums},
+{@linkplain com.sun.javadoc.Doc#isError() errors} and
+{@linkplain com.sun.javadoc.Doc#isException() exceptions}.
+Throughout the API, the detailed description of each program element
+describes explicitly which meaning is being used.
+<p>
+
+<a name="qualified"></a>
+A <em>qualified</em> class or interface name is one that has its package
+name prepended to it, such as <code>java.lang.String</code>.  A non-qualified
+name has no package name, such as <code>String</code>.
+<p>
+
+<a name="example"></a>
+<h3>Example</h3>
+
+The following is an example doclet that
+displays information in the <code>@param</code> tags of the processed
+classes:
+<pre>
+import com.sun.javadoc.*;
+
+public class ListParams extends <font color=red title="Doclet API">Doclet</font> {
+
+    public static boolean start(<font color=red title="Doclet API">RootDoc</font> root) {
+        <font color=red title="Doclet API">ClassDoc</font>[] classes = root.<font color=red title="Doclet API">classes</font>();
+        for (int i = 0; i < classes.length; ++i) {
+            <font color=red title="Doclet API">ClassDoc</font> cd = classes[i];
+            printMembers(cd.<font color=red title="Doclet API">constructors</font>());
+            printMembers(cd.<font color=red title="Doclet API">methods</font>());
+        }
+        return true;
+    }
+
+    static void printMembers(<font color=red title="Doclet API">ExecutableMemberDoc</font>[] mems) {
+        for (int i = 0; i < mems.length; ++i) {
+            <font color=red title="Doclet API">ParamTag</font>[] params = mems[i].<font color=red title="Doclet API">paramTags</font>();
+            System.out.println(mems[i].<font color=red title="Doclet API">qualifiedName</font>());
+            for (int j = 0; j < params.length; ++j) {
+                System.out.println("   " + params[j].<font color=red title="Doclet API">parameterName</font>()
+                    + " - " + params[j].<font color=red title="Doclet API">parameterComment</font>());
+            }
+        }
+    }
+}
+</pre>
+Interfaces and methods from the Javadoc API are marked in
+<font color=red title="Doclet API">red</font>.
+{@link com.sun.javadoc.Doclet Doclet} is an abstract class that specifies
+the invocation interface for doclets,
+{@link com.sun.javadoc.Doclet Doclet} holds class or interface information,
+{@link com.sun.javadoc.ExecutableMemberDoc} is a
+superinterface of {@link com.sun.javadoc.MethodDoc} and
+{@link com.sun.javadoc.ConstructorDoc},
+and {@link com.sun.javadoc.ParamTag} holds information
+from "<code>@param</code>" tags.
+<p>
+This doclet when invoked with a command line like:
+<pre>
+    javadoc -doclet ListParams -sourcepath &lt;source-location&gt; java.util
+</pre>
+producing output like:
+<pre>
+    ...
+    java.util.ArrayList.add
+       index - index at which the specified element is to be inserted.
+       element - element to be inserted.
+    java.util.ArrayList.remove
+       index - the index of the element to removed.
+    ...
+
+</pre>
+@see com.sun.javadoc.Doclet
+@see com.sun.javadoc.RootDoc
+*/
+@jdk.Exported
+package com.sun.javadoc;
--- a/src/share/classes/com/sun/javadoc/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-<html>
-<head>
-<TITLE>Doclet API Package</TITLE>
-<!--
- 
-Copyright (c) 1998, 2003, 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.
--->
-</head>
-<body bgcolor="white">
-
-The Doclet API (also called the Javadoc API) provides a mechanism
-for clients to inspect the source-level structure of programs and 
-libraries, including javadoc comments embedded in the source.
-This is useful for documentation, program checking, automatic
-code generation and many other tools.
-<p>
-
-Doclets are invoked by javadoc and use this API to write out 
-program information to files.  For example, the standard doclet is called
-by default and writes out documentation to HTML files.
-<p>
-
-The invocation is defined by the abstract {@link com.sun.javadoc.Doclet} class 
--- the entry point is the {@link com.sun.javadoc.Doclet#start(RootDoc) start} method:
-<pre>
-    public static boolean <b>start</b>(RootDoc root)
-</pre>
-The {@link com.sun.javadoc.RootDoc} instance holds the root of the program structure
-information. From this root all other program structure 
-information can be extracted.  
-<p>
-
-<a name="terminology"></a>
-<h3>Terminology</h3>
-
-<a name="included"></a>
-When calling javadoc, you pass in package names and source file names --
-these are called the <em>specified</em> packages and classes.  
-You also pass in Javadoc options; the <em>access control</em> Javadoc options 
-(<code>-public</code>, <code>-protected</code>, <code>-package</code>, 
-and <code>-private</code>) filter program elements, producing a 
-result set, called the <em>included</em> set, or "documented" set.
-(The unfiltered set is also available through 
-{@link com.sun.javadoc.PackageDoc#allClasses(boolean) allClasses(false)}.)
-<p>
-
-<a name="class"></a>
-Throughout this API, the term <em>class</em> is normally a
-shorthand for "class or interface", as in: {@link com.sun.javadoc.ClassDoc}, 
-{@link com.sun.javadoc.PackageDoc#allClasses() allClasses()}, and
-{@link com.sun.javadoc.PackageDoc#findClass(String) findClass(String)}.
-In only a couple of other places, it means "class, as opposed to interface", 
-as in:  {@link com.sun.javadoc.Doc#isClass()}.
-In the second sense, this API calls out four kinds of classes:
-{@linkplain com.sun.javadoc.Doc#isOrdinaryClass() ordinary classes}, 
-{@linkplain com.sun.javadoc.Doc#isEnum() enums},
-{@linkplain com.sun.javadoc.Doc#isError() errors} and 
-{@linkplain com.sun.javadoc.Doc#isException() exceptions}.
-Throughout the API, the detailed description of each program element 
-describes explicitly which meaning is being used.
-<p>
-
-<a name="qualified"></a>
-A <em>qualified</em> class or interface name is one that has its package
-name prepended to it, such as <code>java.lang.String</code>.  A non-qualified
-name has no package name, such as <code>String</code>.
-<p>
-
-<a name="example"></a>
-<h3>Example</h3>
- 
-The following is an example doclet that 
-displays information in the <code>@param</code> tags of the processed
-classes:
-<pre>
-import com.sun.javadoc.*;
-
-public class ListParams extends <font color=red title="Doclet API">Doclet</font> {
-
-    public static boolean start(<font color=red title="Doclet API">RootDoc</font> root) {
-        <font color=red title="Doclet API">ClassDoc</font>[] classes = root.<font color=red title="Doclet API">classes</font>();
-        for (int i = 0; i < classes.length; ++i) {
-            <font color=red title="Doclet API">ClassDoc</font> cd = classes[i];
-            printMembers(cd.<font color=red title="Doclet API">constructors</font>());
-            printMembers(cd.<font color=red title="Doclet API">methods</font>());
-        }
-        return true;
-    }
-
-    static void printMembers(<font color=red title="Doclet API">ExecutableMemberDoc</font>[] mems) {
-        for (int i = 0; i < mems.length; ++i) {
-            <font color=red title="Doclet API">ParamTag</font>[] params = mems[i].<font color=red title="Doclet API">paramTags</font>();
-            System.out.println(mems[i].<font color=red title="Doclet API">qualifiedName</font>());
-            for (int j = 0; j < params.length; ++j) {
-                System.out.println("   " + params[j].<font color=red title="Doclet API">parameterName</font>()
-                    + " - " + params[j].<font color=red title="Doclet API">parameterComment</font>());
-            }
-        }
-    }        
-}
-</pre>
-Interfaces and methods from the Javadoc API are marked in 
-<font color=red title="Doclet API">red</font>. 
-{@link com.sun.javadoc.Doclet Doclet} is an abstract class that specifies 
-the invocation interface for doclets, 
-{@link com.sun.javadoc.Doclet Doclet} holds class or interface information, 
-{@link com.sun.javadoc.ExecutableMemberDoc} is a
-superinterface of {@link com.sun.javadoc.MethodDoc} and 
-{@link com.sun.javadoc.ConstructorDoc}, 
-and {@link com.sun.javadoc.ParamTag} holds information
-from "<code>@param</code>" tags.
-<p>
-This doclet when invoked with a command line like:
-<pre>
-    javadoc -doclet ListParams -sourcepath &lt;source-location&gt; java.util
-</pre>
-producing output like:
-<pre>
-    ...
-    java.util.ArrayList.add
-       index - index at which the specified element is to be inserted.
-       element - element to be inserted.
-    java.util.ArrayList.remove
-       index - the index of the element to removed.
-    ...
-
-</pre>
-@see com.sun.javadoc.Doclet
-@see com.sun.javadoc.RootDoc
-</BODY>
-</HTML>
--- a/src/share/classes/com/sun/source/doctree/AttributeTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/AttributeTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -33,9 +33,9 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface AttributeTree extends DocTree {
-    @jdk.Supported
+    @jdk.Exported
     enum ValueKind { EMPTY, UNQUOTED, SINGLE, DOUBLE };
 
     Name getName();
--- a/src/share/classes/com/sun/source/doctree/AuthorTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/AuthorTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface AuthorTree extends BlockTagTree {
     List<? extends DocTree> getName();
 }
--- a/src/share/classes/com/sun/source/doctree/BlockTagTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/BlockTagTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -31,7 +31,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface BlockTagTree extends DocTree {
     String getTagName();
 }
--- a/src/share/classes/com/sun/source/doctree/CommentTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/CommentTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -33,7 +33,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface CommentTree extends DocTree {
     String getBody();
 }
--- a/src/share/classes/com/sun/source/doctree/DeprecatedTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/DeprecatedTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DeprecatedTree extends BlockTagTree {
     List<? extends DocTree> getBody();
 }
--- a/src/share/classes/com/sun/source/doctree/DocCommentTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/DocCommentTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocCommentTree extends DocTree {
     List<? extends DocTree> getFirstSentence();
     List<? extends DocTree> getBody();
--- a/src/share/classes/com/sun/source/doctree/DocRootTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/DocRootTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -33,5 +33,5 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocRootTree extends InlineTagTree { }
--- a/src/share/classes/com/sun/source/doctree/DocTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/DocTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -30,9 +30,9 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocTree {
-    @jdk.Supported
+    @jdk.Exported
     enum Kind {
         /**
          * Used for instances of {@link AttributeTree}
--- a/src/share/classes/com/sun/source/doctree/DocTreeVisitor.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/DocTreeVisitor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -54,7 +54,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocTreeVisitor<R,P> {
     R visitAttribute(AttributeTree node, P p);
     R visitAuthor(AuthorTree node, P p);
--- a/src/share/classes/com/sun/source/doctree/EndElementTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/EndElementTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface EndElementTree extends DocTree {
     Name getName();
 }
--- a/src/share/classes/com/sun/source/doctree/EntityTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/EntityTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface EntityTree extends DocTree {
     Name getName();
 }
--- a/src/share/classes/com/sun/source/doctree/ErroneousTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/ErroneousTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -32,7 +32,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ErroneousTree extends TextTree {
     /**
      * Gets a diagnostic object giving details about
--- a/src/share/classes/com/sun/source/doctree/IdentifierTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/IdentifierTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface IdentifierTree extends DocTree {
     Name getName();
 }
--- a/src/share/classes/com/sun/source/doctree/InheritDocTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/InheritDocTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -34,5 +34,5 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface InheritDocTree extends InlineTagTree { }
--- a/src/share/classes/com/sun/source/doctree/InlineTagTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/InlineTagTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -31,7 +31,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface InlineTagTree extends DocTree {
     String getTagName();
 }
--- a/src/share/classes/com/sun/source/doctree/LinkTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/LinkTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface LinkTree extends InlineTagTree {
     ReferenceTree getReference();
     List<? extends DocTree> getLabel();
--- a/src/share/classes/com/sun/source/doctree/LiteralTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/LiteralTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -34,7 +34,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface LiteralTree extends InlineTagTree {
     TextTree getBody();
 }
--- a/src/share/classes/com/sun/source/doctree/ParamTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/ParamTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ParamTree extends BlockTagTree {
     boolean isTypeParameter();
     IdentifierTree getName();
--- a/src/share/classes/com/sun/source/doctree/ReferenceTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/ReferenceTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -33,7 +33,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ReferenceTree extends DocTree {
     String getSignature();
 }
--- a/src/share/classes/com/sun/source/doctree/ReturnTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/ReturnTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ReturnTree extends BlockTagTree {
     List<? extends DocTree> getDescription();
 }
--- a/src/share/classes/com/sun/source/doctree/SeeTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/SeeTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -38,7 +38,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SeeTree extends BlockTagTree {
     List<? extends DocTree> getReference();
 }
--- a/src/share/classes/com/sun/source/doctree/SerialDataTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/SerialDataTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SerialDataTree extends BlockTagTree {
     List<? extends DocTree> getDescription();
 }
--- a/src/share/classes/com/sun/source/doctree/SerialFieldTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/SerialFieldTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SerialFieldTree extends BlockTagTree {
     IdentifierTree getName();
     ReferenceTree getType();
--- a/src/share/classes/com/sun/source/doctree/SerialTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/SerialTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SerialTree extends BlockTagTree {
     List<? extends DocTree> getDescription();
 }
--- a/src/share/classes/com/sun/source/doctree/SinceTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/SinceTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface SinceTree extends BlockTagTree {
     List<? extends DocTree> getBody();
 }
--- a/src/share/classes/com/sun/source/doctree/StartElementTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/StartElementTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface StartElementTree extends DocTree {
     Name getName();
     List<? extends DocTree> getAttributes();
--- a/src/share/classes/com/sun/source/doctree/TextTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/TextTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -30,7 +30,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface TextTree extends DocTree {
     String getBody();
 }
--- a/src/share/classes/com/sun/source/doctree/ThrowsTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/ThrowsTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -38,7 +38,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ThrowsTree extends BlockTagTree {
     ReferenceTree getExceptionName();
     List<? extends DocTree> getDescription();
--- a/src/share/classes/com/sun/source/doctree/UnknownBlockTagTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/UnknownBlockTagTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  * @since 1.8
  *
  */
-@jdk.Supported
+@jdk.Exported
 public interface UnknownBlockTagTree extends BlockTagTree {
     List<? extends DocTree> getContent();
 }
--- a/src/share/classes/com/sun/source/doctree/UnknownInlineTagTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/UnknownInlineTagTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  * @since 1.8
  *
  */
-@jdk.Supported
+@jdk.Exported
 public interface UnknownInlineTagTree extends InlineTagTree {
     List<? extends DocTree> getContent();
 }
--- a/src/share/classes/com/sun/source/doctree/ValueTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/ValueTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -33,7 +33,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface ValueTree extends InlineTagTree {
     ReferenceTree getReference();
 }
--- a/src/share/classes/com/sun/source/doctree/VersionTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/VersionTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface VersionTree extends BlockTagTree {
     List<? extends DocTree> getBody();
 }
--- a/src/share/classes/com/sun/source/doctree/package-info.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/doctree/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -31,5 +31,5 @@
  * @since 1.8
  * @see <a href="http://download.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#javadoctags">http://download.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#javadoctags</a>
  */
-@jdk.Supported
+@jdk.Exported
 package com.sun.source.doctree;
--- a/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Mahmood Ali
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface AnnotatedTypeTree extends ExpressionTree {
     List<? extends AnnotationTree> getAnnotations();
     ExpressionTree getUnderlyingType();
--- a/src/share/classes/com/sun/source/tree/AnnotationTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/AnnotationTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface AnnotationTree extends ExpressionTree {
     Tree getAnnotationType();
     List<? extends ExpressionTree> getArguments();
--- a/src/share/classes/com/sun/source/tree/ArrayAccessTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ArrayAccessTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ArrayAccessTree extends ExpressionTree {
     ExpressionTree getExpression();
     ExpressionTree getIndex();
--- a/src/share/classes/com/sun/source/tree/ArrayTypeTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ArrayTypeTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ArrayTypeTree extends Tree {
     Tree getType();
 }
--- a/src/share/classes/com/sun/source/tree/AssertTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/AssertTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface AssertTree extends StatementTree {
     ExpressionTree getCondition();
     ExpressionTree getDetail();
--- a/src/share/classes/com/sun/source/tree/AssignmentTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/AssignmentTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface AssignmentTree extends ExpressionTree {
     ExpressionTree getVariable();
     ExpressionTree getExpression();
--- a/src/share/classes/com/sun/source/tree/BinaryTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/BinaryTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface BinaryTree extends ExpressionTree {
     ExpressionTree getLeftOperand();
     ExpressionTree getRightOperand();
--- a/src/share/classes/com/sun/source/tree/BlockTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/BlockTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface BlockTree extends StatementTree {
     boolean isStatic();
     List<? extends StatementTree> getStatements();
--- a/src/share/classes/com/sun/source/tree/BreakTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/BreakTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -43,7 +43,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface BreakTree extends StatementTree {
     Name getLabel();
 }
--- a/src/share/classes/com/sun/source/tree/CaseTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/CaseTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface CaseTree extends Tree {
     /**
      * @return null if and only if this Case is {@code default:}
--- a/src/share/classes/com/sun/source/tree/CatchTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/CatchTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface CatchTree extends Tree {
     VariableTree getParameter();
     BlockTree getBlock();
--- a/src/share/classes/com/sun/source/tree/ClassTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ClassTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,7 +48,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ClassTree extends StatementTree {
     ModifiersTree getModifiers();
     Name getSimpleName();
--- a/src/share/classes/com/sun/source/tree/CompilationUnitTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/CompilationUnitTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -37,7 +37,7 @@
  * @author Peter von der Ah&eacute;
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface CompilationUnitTree extends Tree {
     List<? extends AnnotationTree> getPackageAnnotations();
     ExpressionTree getPackageName();
--- a/src/share/classes/com/sun/source/tree/CompoundAssignmentTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/CompoundAssignmentTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface CompoundAssignmentTree extends ExpressionTree {
     ExpressionTree getVariable();
     ExpressionTree getExpression();
--- a/src/share/classes/com/sun/source/tree/ConditionalExpressionTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ConditionalExpressionTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ConditionalExpressionTree extends ExpressionTree {
     ExpressionTree getCondition();
     ExpressionTree getTrueExpression();
--- a/src/share/classes/com/sun/source/tree/ContinueTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ContinueTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ContinueTree extends StatementTree {
     Name getLabel();
 }
--- a/src/share/classes/com/sun/source/tree/DoWhileLoopTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/DoWhileLoopTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface DoWhileLoopTree extends StatementTree {
     ExpressionTree getCondition();
     StatementTree getStatement();
--- a/src/share/classes/com/sun/source/tree/EmptyStatementTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/EmptyStatementTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,5 +39,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface EmptyStatementTree extends StatementTree {}
--- a/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface EnhancedForLoopTree extends StatementTree {
     VariableTree getVariable();
     ExpressionTree getExpression();
--- a/src/share/classes/com/sun/source/tree/ErroneousTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ErroneousTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -34,7 +34,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ErroneousTree extends ExpressionTree {
     List<? extends Tree> getErrorTrees();
 }
--- a/src/share/classes/com/sun/source/tree/ExpressionStatementTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ExpressionStatementTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ExpressionStatementTree extends StatementTree {
     ExpressionTree getExpression();
 }
--- a/src/share/classes/com/sun/source/tree/ExpressionTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ExpressionTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,5 +35,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ExpressionTree extends Tree {}
--- a/src/share/classes/com/sun/source/tree/ForLoopTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ForLoopTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ForLoopTree extends StatementTree {
     List<? extends StatementTree> getInitializer();
     ExpressionTree getCondition();
--- a/src/share/classes/com/sun/source/tree/IdentifierTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/IdentifierTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface IdentifierTree extends ExpressionTree {
     Name getName();
 }
--- a/src/share/classes/com/sun/source/tree/IfTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/IfTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface IfTree extends StatementTree {
     ExpressionTree getCondition();
     StatementTree getThenStatement();
--- a/src/share/classes/com/sun/source/tree/ImportTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ImportTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ImportTree extends Tree {
     boolean isStatic();
     /**
--- a/src/share/classes/com/sun/source/tree/InstanceOfTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/InstanceOfTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface InstanceOfTree extends ExpressionTree {
     ExpressionTree getExpression();
     Tree getType();
--- a/src/share/classes/com/sun/source/tree/IntersectionTypeTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/IntersectionTypeTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -34,7 +34,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface IntersectionTypeTree extends Tree {
     List<? extends Tree> getBounds();
 }
--- a/src/share/classes/com/sun/source/tree/LabeledStatementTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/LabeledStatementTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface LabeledStatementTree extends StatementTree {
     Name getLabel();
     StatementTree getStatement();
--- a/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -37,14 +37,14 @@
  *   (x,y)-> { return x + y; }
  * }</pre>
  */
-@jdk.Supported
+@jdk.Exported
 public interface LambdaExpressionTree extends ExpressionTree {
 
     /**
      * Lambda expressions come in two forms: (i) expression lambdas, whose body
      * is an expression, and (ii) statement lambdas, whose body is a block
      */
-    @jdk.Supported
+    @jdk.Exported
     public enum BodyKind {
         /** enum constant for expression lambdas */
         EXPRESSION,
--- a/src/share/classes/com/sun/source/tree/LineMap.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/LineMap.java	Mon Oct 28 18:30:14 2013 -0400
@@ -31,7 +31,7 @@
  *
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface LineMap {
     /**
      * Find the start position of a line.
--- a/src/share/classes/com/sun/source/tree/LiteralTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/LiteralTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface LiteralTree extends ExpressionTree {
     Object getValue();
 }
--- a/src/share/classes/com/sun/source/tree/MemberReferenceTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/MemberReferenceTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,14 +39,14 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface MemberReferenceTree extends ExpressionTree {
 
     /**
      * There are two kinds of member references: (i) method references and
      * (ii) constructor references
      */
-    @jdk.Supported
+    @jdk.Exported
     public enum ReferenceMode {
         /** enum constant for method references */
         INVOKE,
--- a/src/share/classes/com/sun/source/tree/MemberSelectTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/MemberSelectTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface MemberSelectTree extends ExpressionTree {
     ExpressionTree getExpression();
     Name getIdentifier();
--- a/src/share/classes/com/sun/source/tree/MethodInvocationTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/MethodInvocationTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -43,7 +43,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface MethodInvocationTree extends ExpressionTree {
     List<? extends Tree> getTypeArguments();
     ExpressionTree getMethodSelect();
--- a/src/share/classes/com/sun/source/tree/MethodTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/MethodTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -46,7 +46,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface MethodTree extends Tree {
     ModifiersTree getModifiers();
     Name getName();
--- a/src/share/classes/com/sun/source/tree/ModifiersTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ModifiersTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ModifiersTree extends Tree {
     Set<Modifier> getFlags();
     List<? extends AnnotationTree> getAnnotations();
--- a/src/share/classes/com/sun/source/tree/NewArrayTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/NewArrayTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -25,7 +25,7 @@
 
 package com.sun.source.tree;
 
-import com.sun.tools.javac.util.List;
+import java.util.List;
 
 /**
  * A tree node for an expression to create a new instance of an array.
@@ -43,7 +43,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface NewArrayTree extends ExpressionTree {
     Tree getType();
     List<? extends ExpressionTree> getDimensions();
--- a/src/share/classes/com/sun/source/tree/NewClassTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/NewClassTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,7 +48,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface NewClassTree extends ExpressionTree {
     ExpressionTree getEnclosingExpression();
     List<? extends Tree> getTypeArguments();
--- a/src/share/classes/com/sun/source/tree/ParameterizedTypeTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ParameterizedTypeTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ParameterizedTypeTree extends Tree {
     Tree getType();
     List<? extends Tree> getTypeArguments();
--- a/src/share/classes/com/sun/source/tree/ParenthesizedTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ParenthesizedTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ParenthesizedTree extends ExpressionTree {
     ExpressionTree getExpression();
 }
--- a/src/share/classes/com/sun/source/tree/PrimitiveTypeTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/PrimitiveTypeTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface PrimitiveTypeTree extends Tree {
     TypeKind getPrimitiveTypeKind();
 }
--- a/src/share/classes/com/sun/source/tree/ReturnTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ReturnTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ReturnTree extends StatementTree {
     ExpressionTree getExpression();
 }
--- a/src/share/classes/com/sun/source/tree/Scope.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/Scope.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,7 +48,7 @@
  *
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface Scope {
     /**
      * Returns the enclosing scope.
--- a/src/share/classes/com/sun/source/tree/StatementTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/StatementTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,5 +35,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface StatementTree extends Tree {}
--- a/src/share/classes/com/sun/source/tree/SwitchTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/SwitchTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -43,7 +43,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface SwitchTree extends StatementTree {
     ExpressionTree getExpression();
     List<? extends CaseTree> getCases();
--- a/src/share/classes/com/sun/source/tree/SynchronizedTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/SynchronizedTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface SynchronizedTree extends StatementTree {
     ExpressionTree getExpression();
     BlockTree getBlock();
--- a/src/share/classes/com/sun/source/tree/ThrowTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/ThrowTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface ThrowTree extends StatementTree {
     ExpressionTree getExpression();
 }
--- a/src/share/classes/com/sun/source/tree/Tree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/Tree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,13 +39,13 @@
  *
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface Tree {
 
     /**
      * Enumerates all kinds of trees.
      */
-    @jdk.Supported
+    @jdk.Exported
     public enum Kind {
 
         ANNOTATED_TYPE(AnnotatedTypeTree.class),
--- a/src/share/classes/com/sun/source/tree/TreeVisitor.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/TreeVisitor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -56,7 +56,7 @@
  *
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TreeVisitor<R,P> {
     R visitAnnotatedType(AnnotatedTypeTree node, P p);
     R visitAnnotation(AnnotationTree node, P p);
--- a/src/share/classes/com/sun/source/tree/TryTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/TryTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -45,7 +45,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TryTree extends StatementTree {
     BlockTree getBlock();
     List<? extends CatchTree> getCatches();
--- a/src/share/classes/com/sun/source/tree/TypeCastTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/TypeCastTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -39,7 +39,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TypeCastTree extends ExpressionTree {
     Tree getType();
     ExpressionTree getExpression();
--- a/src/share/classes/com/sun/source/tree/TypeParameterTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/TypeParameterTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -46,7 +46,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TypeParameterTree extends Tree {
     Name getName();
     List<? extends Tree> getBounds();
--- a/src/share/classes/com/sun/source/tree/UnaryTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/UnaryTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface UnaryTree extends ExpressionTree {
     ExpressionTree getExpression();
 }
--- a/src/share/classes/com/sun/source/tree/UnionTypeTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/UnionTypeTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -34,7 +34,7 @@
  *
  * @since 1.7
  */
-@jdk.Supported
+@jdk.Exported
 public interface UnionTypeTree extends Tree {
     List<? extends Tree> getTypeAlternatives();
 }
--- a/src/share/classes/com/sun/source/tree/VariableTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/VariableTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -42,7 +42,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface VariableTree extends StatementTree {
     ModifiersTree getModifiers();
     Name getName();
--- a/src/share/classes/com/sun/source/tree/WhileLoopTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/WhileLoopTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,7 +41,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface WhileLoopTree extends StatementTree {
     ExpressionTree getCondition();
     StatementTree getStatement();
--- a/src/share/classes/com/sun/source/tree/WildcardTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/WildcardTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -44,7 +44,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface WildcardTree extends Tree {
     Tree getBound();
 }
--- a/src/share/classes/com/sun/source/tree/package-info.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/tree/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -31,5 +31,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 package com.sun.source.tree;
--- a/src/share/classes/com/sun/source/util/DocSourcePositions.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/DocSourcePositions.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface DocSourcePositions extends SourcePositions {
 
     /**
--- a/src/share/classes/com/sun/source/util/DocTreePath.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/DocTreePath.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public class DocTreePath implements Iterable<DocTree> {
     /**
      * Gets a documentation tree path for a tree node within a compilation unit.
--- a/src/share/classes/com/sun/source/util/DocTreePathScanner.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/DocTreePathScanner.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,7 +36,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public class DocTreePathScanner<R, P> extends DocTreeScanner<R, P> {
     /**
      * Scan a tree from a position identified by a TreePath.
--- a/src/share/classes/com/sun/source/util/DocTreeScanner.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/DocTreeScanner.java	Mon Oct 28 18:30:14 2013 -0400
@@ -67,7 +67,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public class DocTreeScanner<R,P> implements DocTreeVisitor<R,P> {
 
     /**
--- a/src/share/classes/com/sun/source/util/DocTrees.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/DocTrees.java	Mon Oct 28 18:30:14 2013 -0400
@@ -37,7 +37,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public abstract class DocTrees extends Trees {
     /**
      * Gets a DocTrees object for a given CompilationTask.
--- a/src/share/classes/com/sun/source/util/JavacTask.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/JavacTask.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,7 +48,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public abstract class JavacTask implements CompilationTask {
 
     /**
--- a/src/share/classes/com/sun/source/util/Plugin.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/Plugin.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,7 +48,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public interface Plugin {
     /**
      * Get the user-friendly name of this plug-in.
--- a/src/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -32,7 +32,7 @@
  *
  * @since 1.8
  */
-@jdk.Supported
+@jdk.Exported
 public class SimpleDocTreeVisitor<R,P> implements DocTreeVisitor<R, P> {
     protected final R DEFAULT_VALUE;
 
--- a/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -33,7 +33,7 @@
  * @author Peter von der Ah&eacute;
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> {
     protected final R DEFAULT_VALUE;
 
--- a/src/share/classes/com/sun/source/util/SourcePositions.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/SourcePositions.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
  * @author Peter von der Ah&eacute;
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface SourcePositions {
 
     /**
--- a/src/share/classes/com/sun/source/util/TaskEvent.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/TaskEvent.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,14 +36,14 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public final class TaskEvent
 {
     /**
      * Kind of task event.
      * @since 1.6
      */
-    @jdk.Supported
+    @jdk.Exported
     public enum Kind {
         /**
          * For events related to the parsing of a file.
--- a/src/share/classes/com/sun/source/util/TaskListener.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/TaskListener.java	Mon Oct 28 18:30:14 2013 -0400
@@ -32,7 +32,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public interface TaskListener
 {
     public void started(TaskEvent e);
--- a/src/share/classes/com/sun/source/util/TreePath.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/TreePath.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,7 +36,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public class TreePath implements Iterable<Tree> {
     /**
      * Gets a tree path for a tree node within a compilation unit.
--- a/src/share/classes/com/sun/source/util/TreePathScanner.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/TreePathScanner.java	Mon Oct 28 18:30:14 2013 -0400
@@ -38,7 +38,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public class TreePathScanner<R, P> extends TreeScanner<R, P> {
 
     /**
--- a/src/share/classes/com/sun/source/util/TreeScanner.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/TreeScanner.java	Mon Oct 28 18:30:14 2013 -0400
@@ -68,7 +68,7 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 public class TreeScanner<R,P> implements TreeVisitor<R,P> {
 
     /** Scan a single node.
--- a/src/share/classes/com/sun/source/util/Trees.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/Trees.java	Mon Oct 28 18:30:14 2013 -0400
@@ -51,7 +51,7 @@
  *
  * @author Peter von der Ah&eacute;
  */
-@jdk.Supported
+@jdk.Exported
 public abstract class Trees {
     /**
      * Gets a Trees object for a given CompilationTask.
--- a/src/share/classes/com/sun/source/util/package-info.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/source/util/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -30,5 +30,5 @@
  * @author Jonathan Gibbons
  * @since 1.6
  */
-@jdk.Supported
+@jdk.Exported
 package com.sun.source.util;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/classfile/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2007, 2013, 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.
+ */
+
+/**
+    A minimalist library to read and write class files into objects closely
+    based on the corresponding definitions in
+    <cite>The Java&trade; Virtual Machine Specification</cite> (JVMS).
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.classfile;
--- a/src/share/classes/com/sun/tools/classfile/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <title></title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-  </head>
-  <body>
-    A minimalist library to read and write class files into objects closely 
-    based on the corresponding definitions in 
-    <cite>The Java&trade; Virtual Machine Specification</cite> (JVMS).
-  </body>
-</html>
--- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -101,10 +101,10 @@
             Content tdSummary) {
         ExecutableMemberDoc emd = (ExecutableMemberDoc)member;
         String name = emd.name();
-        Content strong = HtmlTree.SPAN(HtmlStyle.strong,
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
                 writer.getDocLink(context, cd, (MemberDoc) emd,
                 name, false));
-        Content code = HtmlTree.CODE(strong);
+        Content code = HtmlTree.CODE(memberLink);
         addParameters(emd, false, code, name.length() - 1);
         tdSummary.addContent(code);
     }
@@ -305,6 +305,6 @@
             buf.append(t.dimension());
         }
         buf.append(")");
-        return foundTypeVariable ? buf.toString() : null;
+        return foundTypeVariable ? writer.getName(buf.toString()) : null;
     }
 }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -89,10 +89,11 @@
      * @param memberlist List of members for the unicode character
      * @param contentTree the content tree to which the information will be added
      */
-    protected void addContents(Character unicode, List<? extends Doc> memberlist,
+    protected void addContents(Character uc, List<? extends Doc> memberlist,
             Content contentTree) {
-        contentTree.addContent(getMarkerAnchor("_" + unicode + "_"));
-        Content headContent = new StringContent(unicode.toString());
+        String unicode = uc.toString();
+        contentTree.addContent(getMarkerAnchorForIndex(unicode));
+        Content headContent = new StringContent(unicode);
         Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, false,
                 HtmlStyle.title, headContent);
         contentTree.addContent(heading);
@@ -175,7 +176,7 @@
         String name = (member instanceof ExecutableMemberDoc)?
             member.name() + ((ExecutableMemberDoc)member).flatSignature() :
             member.name();
-        Content span = HtmlTree.SPAN(HtmlStyle.strong,
+        Content span = HtmlTree.SPAN(HtmlStyle.memberNameLink,
                 getDocLink(LinkInfoImpl.Kind.INDEX, member, name));
         Content dt = HtmlTree.DT(span);
         dt.addContent(" - ");
@@ -197,7 +198,7 @@
      */
     protected void addComment(ProgramElementDoc element, Content contentTree) {
         Tag[] tags;
-        Content span = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
+        Content span = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
         div.addStyle(HtmlStyle.block);
         if (Util.isDeprecated(element)) {
@@ -253,4 +254,24 @@
         addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing,
                 false, contentTree);
     }
+
+    /**
+     * Get the marker anchor which will be added to the index documentation tree.
+     *
+     * @param anchorNameForIndex the anchor name attribute for index page
+     * @return a content tree for the marker anchor
+     */
+    public Content getMarkerAnchorForIndex(String anchorNameForIndex) {
+        return getMarkerAnchor(getNameForIndex(anchorNameForIndex), null);
+    }
+
+    /**
+     * Generate a valid HTML name for member index page.
+     *
+     * @param unicode the string that needs to be converted to valid HTML name.
+     * @return a valid HTML name string.
+     */
+    public String getNameForIndex(String unicode) {
+        return "I:" + getName(unicode);
+    }
 }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -413,7 +413,7 @@
     protected void addDeprecatedAPI(List<Doc> deprmembers, String headingKey,
             String tableSummary, String[] tableHeader, Content contentTree) {
         if (deprmembers.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
                 writer.getTableCaption(configuration.getResource(headingKey)));
             table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
@@ -453,7 +453,7 @@
         List<? extends ProgramElementDoc> members = mems;
         boolean printedUseTableHeader = false;
         if (members.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
                     writer.getTableCaption(heading));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
             Iterator<? extends ProgramElementDoc> it = members.iterator();
@@ -480,7 +480,7 @@
                 if (cd != null && !(pgmdoc instanceof ConstructorDoc)
                         && !(pgmdoc instanceof ClassDoc)) {
                     HtmlTree name = new HtmlTree(HtmlTag.SPAN);
-                    name.addStyle(HtmlStyle.strong);
+                    name.addStyle(HtmlStyle.typeNameLabel);
                     name.addContent(cd.name() + ".");
                     tdLast.addContent(name);
                 }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -88,7 +88,7 @@
             Content memberDetailsTree) {
         if (!writer.printedAnnotationFieldHeading) {
             memberDetailsTree.addContent(writer.getMarkerAnchor(
-                    "annotation_type_field_detail"));
+                    SectionName.ANNOTATION_TYPE_FIELD_DETAIL));
             Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                     writer.fieldDetailsLabel);
             memberDetailsTree.addContent(heading);
@@ -217,7 +217,7 @@
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
         memberTree.addContent(writer.getMarkerAnchor(
-                "annotation_type_field_summary"));
+                SectionName.ANNOTATION_TYPE_FIELD_SUMMARY));
     }
 
     /**
@@ -237,9 +237,9 @@
      */
     protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
             Content tdSummary) {
-        Content strong = HtmlTree.SPAN(HtmlStyle.strong,
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
                 writer.getDocLink(context, (MemberDoc) member, member.name(), false));
-        Content code = HtmlTree.CODE(strong);
+        Content code = HtmlTree.CODE(memberLink);
         tdSummary.addContent(code);
     }
 
@@ -272,7 +272,8 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink("annotation_type_field_summary",
+            return writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_FIELD_SUMMARY,
                     writer.getResource("doclet.navField"));
         } else {
             return writer.getResource("doclet.navField");
@@ -284,7 +285,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("annotation_type_field_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_FIELD_DETAIL,
                     writer.getResource("doclet.navField")));
         } else {
             liNav.addContent(writer.getResource("doclet.navField"));
--- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -133,7 +133,7 @@
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
         memberTree.addContent(writer.getMarkerAnchor(
-                "annotation_type_optional_element_summary"));
+                SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY));
     }
 
     /**
@@ -141,7 +141,8 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink("annotation_type_optional_element_summary",
+            return writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY,
                     writer.getResource("doclet.navAnnotationTypeOptionalMember"));
         } else {
             return writer.getResource("doclet.navAnnotationTypeOptionalMember");
--- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -89,7 +89,7 @@
             Content memberDetailsTree) {
         if (!writer.printedAnnotationHeading) {
             memberDetailsTree.addContent(writer.getMarkerAnchor(
-                    "annotation_type_element_detail"));
+                    SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL));
             Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                     writer.annotationTypeDetailsLabel);
             memberDetailsTree.addContent(heading);
@@ -219,7 +219,7 @@
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
         memberTree.addContent(writer.getMarkerAnchor(
-                "annotation_type_required_element_summary"));
+                SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY));
     }
 
     /**
@@ -239,9 +239,9 @@
      */
     protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
             Content tdSummary) {
-        Content strong = HtmlTree.SPAN(HtmlStyle.strong,
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
                 writer.getDocLink(context, (MemberDoc) member, member.name(), false));
-        Content code = HtmlTree.CODE(strong);
+        Content code = HtmlTree.CODE(memberLink);
         tdSummary.addContent(code);
     }
 
@@ -274,7 +274,8 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink("annotation_type_required_element_summary",
+            return writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY,
                     writer.getResource("doclet.navAnnotationTypeRequiredMember"));
         } else {
             return writer.getResource("doclet.navAnnotationTypeRequiredMember");
@@ -286,7 +287,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("annotation_type_element_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL,
                     writer.getResource("doclet.navAnnotationTypeMember")));
         } else {
             liNav.addContent(writer.getResource("doclet.navAnnotationTypeMember"));
--- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -227,7 +227,7 @@
             addSrcLink(annotationType, annotationName, pre);
             pre.addContent(parameterLinks);
         } else {
-            Content span = HtmlTree.SPAN(HtmlStyle.strong, annotationName);
+            Content span = HtmlTree.SPAN(HtmlStyle.memberNameLabel, annotationName);
             span.addContent(parameterLinks);
             pre.addContent(span);
         }
@@ -262,8 +262,8 @@
         annotationInfoTree.addContent(hr);
         Tag[] deprs = annotationType.tags("deprecated");
         if (Util.isDeprecated(annotationType)) {
-            Content strong = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
-            Content div = HtmlTree.DIV(HtmlStyle.block, strong);
+            Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+            Content div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
             if (deprs.length > 0) {
                 Tag[] commentTags = deprs[0].inlineTags();
                 if (commentTags.length > 0) {
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -263,7 +263,7 @@
      * @param contentTree the content tree to which the packages list will be added
      */
     protected void addPackageList(Content contentTree) throws IOException {
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_Packages.that.use.0",
                 getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc
@@ -298,7 +298,7 @@
                 pkgToPackageAnnotations.isEmpty()) {
             return;
         }
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_PackageAnnotation",
                 getLink(new LinkInfoImpl(configuration,
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -254,7 +254,7 @@
             addSrcLink(classDoc, className, pre);
             pre.addContent(parameterLinks);
         } else {
-            Content span = HtmlTree.SPAN(HtmlStyle.strong, className);
+            Content span = HtmlTree.SPAN(HtmlStyle.typeNameLabel, className);
             span.addContent(parameterLinks);
             pre.addContent(span);
         }
@@ -547,8 +547,8 @@
         classInfoTree.addContent(hr);
         Tag[] deprs = classDoc.tags("deprecated");
         if (Util.isDeprecated(classDoc)) {
-            Content strong = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
-            Content div = HtmlTree.DIV(HtmlStyle.block, strong);
+            Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+            Content div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
             if (deprs.length > 0) {
                 Tag[] commentTags = deprs[0].inlineTags();
                 if (commentTags.length > 0) {
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -284,7 +284,7 @@
         setTopFile(root);
 
         if (root instanceof RootDocImpl) {
-            ((RootDocImpl) root).initDocLint(doclintOpts);
+            ((RootDocImpl) root).initDocLint(doclintOpts, tagletManager.getCustomTagNames());
         }
     }
 
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -107,7 +107,8 @@
         //add link to summary
         Content link;
         if (packageName.length() == 0) {
-            link = getHyperLink(DocLink.fragment(DocletConstants.UNNAMED_PACKAGE_ANCHOR),
+            link = getHyperLink(getDocLink(
+                    SectionName.UNNAMED_PACKAGE_ANCHOR),
                     defaultPackageLabel, "", "");
         } else {
             Content packageNameContent = getPackageLabel(parsedPackageName);
@@ -153,7 +154,7 @@
         Content pkgNameContent;
         if (parsedPackageName.length() == 0) {
             summariesTree.addContent(getMarkerAnchor(
-                    DocletConstants.UNNAMED_PACKAGE_ANCHOR));
+                    SectionName.UNNAMED_PACKAGE_ANCHOR));
             pkgNameContent = defaultPackageLabel;
         } else {
             summariesTree.addContent(getMarkerAnchor(
@@ -207,7 +208,7 @@
      * @return the table caption and header
      */
     protected Content getClassName(Content classStr) {
-        Content table = HtmlTree.TABLE(0, 3, 0, constantsTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.constantsSummary, 0, 3, 0, constantsTableSummary,
                 getTableCaption(classStr));
         table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
         return table;
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -97,7 +97,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS);
         Content constructorDetailsTree = writer.getMemberTreeHeader();
-        constructorDetailsTree.addContent(writer.getMarkerAnchor("constructor_detail"));
+        constructorDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.CONSTRUCTOR_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.constructorDetailsLabel);
         constructorDetailsTree.addContent(heading);
@@ -256,7 +257,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("constructor_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.CONSTRUCTOR_SUMMARY));
     }
 
     /**
@@ -280,7 +282,7 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink("constructor_summary",
+            return writer.getHyperLink(SectionName.CONSTRUCTOR_SUMMARY,
                     writer.getResource("doclet.navConstructor"));
         } else {
             return writer.getResource("doclet.navConstructor");
@@ -292,7 +294,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("constructor_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.CONSTRUCTOR_DETAIL,
                     writer.getResource("doclet.navConstructor")));
         } else {
             liNav.addContent(writer.getResource("doclet.navConstructor"));
--- a/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,8 +48,8 @@
 
     private static final String[] ANCHORS = new String[] {
         "package", "interface", "class", "enum", "exception", "error",
-        "annotation_type", "field", "method", "constructor", "enum_constant",
-        "annotation_type_member"
+        "annotation.type", "field", "method", "constructor", "enum.constant",
+        "annotation.type.member"
     };
 
     private static final String[] HEADING_KEYS = new String[] {
--- a/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -73,7 +73,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_DETAILS);
         Content enumConstantsDetailsTree = writer.getMemberTreeHeader();
-        enumConstantsDetailsTree.addContent(writer.getMarkerAnchor("enum_constant_detail"));
+        enumConstantsDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.ENUM_CONSTANT_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.enumConstantsDetailsLabel);
         enumConstantsDetailsTree.addContent(heading);
@@ -202,7 +203,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("enum_constant_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.ENUM_CONSTANT_SUMMARY));
     }
 
     /**
@@ -222,9 +224,9 @@
      */
     protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
             Content tdSummary) {
-        Content strong = HtmlTree.SPAN(HtmlStyle.strong,
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
                 writer.getDocLink(context, (MemberDoc) member, member.name(), false));
-        Content code = HtmlTree.CODE(strong);
+        Content code = HtmlTree.CODE(memberLink);
         tdSummary.addContent(code);
     }
 
@@ -263,11 +265,14 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null)?
-                "enum_constant_summary":
-                "enum_constants_inherited_from_class_" +
-                configuration.getClassName(cd),
-                writer.getResource("doclet.navEnum"));
+            if (cd == null) {
+                return writer.getHyperLink(SectionName.ENUM_CONSTANT_SUMMARY,
+                        writer.getResource("doclet.navEnum"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.ENUM_CONSTANTS_INHERITANCE,
+                        configuration.getClassName(cd), writer.getResource("doclet.navEnum"));
+            }
         } else {
             return writer.getResource("doclet.navEnum");
         }
@@ -278,7 +283,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("enum_constant_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.ENUM_CONSTANT_DETAIL,
                     writer.getResource("doclet.navEnum")));
         } else {
             liNav.addContent(writer.getResource("doclet.navEnum"));
--- a/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -74,7 +74,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_FIELD_DETAILS);
         Content fieldDetailsTree = writer.getMemberTreeHeader();
-        fieldDetailsTree.addContent(writer.getMarkerAnchor("field_detail"));
+        fieldDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.FIELD_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.fieldDetailsLabel);
         fieldDetailsTree.addContent(heading);
@@ -139,11 +140,11 @@
                             holder.typeName() : holder.qualifiedTypeName(),
                             false);
                 Content codeLink = HtmlTree.CODE(link);
-                Content strong = HtmlTree.SPAN(HtmlStyle.strong, holder.isClass()?
+                Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel, holder.isClass()?
                    writer.descfrmClassLabel : writer.descfrmInterfaceLabel);
-                strong.addContent(writer.getSpace());
-                strong.addContent(codeLink);
-                fieldDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, strong));
+                descfrmLabel.addContent(writer.getSpace());
+                descfrmLabel.addContent(codeLink);
+                fieldDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
                 writer.addInlineComment(field, fieldDocTree);
             }
         }
@@ -224,7 +225,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("field_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.FIELD_SUMMARY));
     }
 
     /**
@@ -232,7 +234,7 @@
      */
     public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
         inheritedTree.addContent(writer.getMarkerAnchor(
-                "fields_inherited_from_class_" + configuration.getClassName(cd)));
+                SectionName.FIELDS_INHERITANCE, configuration.getClassName(cd)));
     }
 
     /**
@@ -256,9 +258,9 @@
      */
     protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
             Content tdSummary) {
-        Content strong = HtmlTree.SPAN(HtmlStyle.strong,
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
                 writer.getDocLink(context, cd , (MemberDoc) member, member.name(), false));
-        Content code = HtmlTree.CODE(strong);
+        Content code = HtmlTree.CODE(memberLink);
         tdSummary.addContent(code);
     }
 
@@ -293,11 +295,15 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null)?
-                "field_summary":
-                "fields_inherited_from_class_" +
-                configuration.getClassName(cd),
-                writer.getResource("doclet.navField"));
+            if (cd == null) {
+                return writer.getHyperLink(
+                        SectionName.FIELD_SUMMARY,
+                        writer.getResource("doclet.navField"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.FIELDS_INHERITANCE,
+                        configuration.getClassName(cd), writer.getResource("doclet.navField"));
+            }
         } else {
             return writer.getResource("doclet.navField");
         }
@@ -308,7 +314,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("field_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.FIELD_DETAIL,
                     writer.getResource("doclet.navField")));
         } else {
             liNav.addContent(writer.getResource("doclet.navField"));
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -316,7 +316,7 @@
         liConst.addContent(constPara);
         ul.addContent(liConst);
         Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
-        Content line30 = HtmlTree.SPAN(HtmlStyle.italic, getResource("doclet.Help_line_30"));
+        Content line30 = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase, getResource("doclet.Help_line_30"));
         divContent.addContent(line30);
         contentTree.addContent(divContent);
     }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Mon Oct 28 18:30:14 2013 -0400
@@ -194,6 +194,10 @@
                             .getClassBuilder(curr, prev, next, classtree);
                     classBuilder.build();
                 }
+            } catch (IOException e) {
+                throw new DocletAbortException(e);
+            } catch (DocletAbortException de) {
+                throw de;
             } catch (Exception e) {
                 e.printStackTrace();
                 throw new DocletAbortException(e);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -356,7 +356,7 @@
         if(classes.length > 0) {
             Arrays.sort(classes);
             Content caption = getTableCaption(new RawHtml(label));
-            Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0,
+            Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
                     tableSummary, caption);
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
@@ -391,8 +391,7 @@
                 tbody.addContent(tr);
             }
             table.addContent(tbody);
-            Content li = HtmlTree.LI(HtmlStyle.blockList, table);
-            summaryContentTree.addContent(li);
+            summaryContentTree.addContent(table);
         }
     }
 
@@ -509,28 +508,28 @@
                 body.addContent(HtmlConstants.START_OF_TOP_NAVBAR);
                 navDiv.addStyle(HtmlStyle.topNav);
                 allClassesId += "navbar_top";
-                Content a = getMarkerAnchor("navbar_top");
+                Content a = getMarkerAnchor(SectionName.NAVBAR_TOP);
                 //WCAG - Hyperlinks should contain text or an image with alt text - for AT tools
                 navDiv.addContent(a);
                 Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav, getHyperLink(
-                    DocLink.fragment("skip-navbar_top"), skipNavLinks,
+                    getDocLink(SectionName.SKIP_NAVBAR_TOP), skipNavLinks,
                     skipNavLinks.toString(), ""));
                 navDiv.addContent(skipLinkContent);
             } else {
                 body.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR);
                 navDiv.addStyle(HtmlStyle.bottomNav);
                 allClassesId += "navbar_bottom";
-                Content a = getMarkerAnchor("navbar_bottom");
+                Content a = getMarkerAnchor(SectionName.NAVBAR_BOTTOM);
                 navDiv.addContent(a);
                 Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav, getHyperLink(
-                    DocLink.fragment("skip-navbar_bottom"), skipNavLinks,
+                    getDocLink(SectionName.SKIP_NAVBAR_BOTTOM), skipNavLinks,
                     skipNavLinks.toString(), ""));
                 navDiv.addContent(skipLinkContent);
             }
             if (header) {
-                navDiv.addContent(getMarkerAnchor("navbar_top_firstrow"));
+                navDiv.addContent(getMarkerAnchor(SectionName.NAVBAR_TOP_FIRSTROW));
             } else {
-                navDiv.addContent(getMarkerAnchor("navbar_bottom_firstrow"));
+                navDiv.addContent(getMarkerAnchor(SectionName.NAVBAR_BOTTOM_FIRSTROW));
             }
             HtmlTree navList = new HtmlTree(HtmlTag.UL);
             navList.addStyle(HtmlStyle.navList);
@@ -577,11 +576,11 @@
             subDiv.addContent(getAllClassesLinkScript(allClassesId.toString()));
             addSummaryDetailLinks(subDiv);
             if (header) {
-                subDiv.addContent(getMarkerAnchor("skip-navbar_top"));
+                subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_TOP));
                 body.addContent(subDiv);
                 body.addContent(HtmlConstants.END_OF_TOP_NAVBAR);
             } else {
-                subDiv.addContent(getMarkerAnchor("skip-navbar_bottom"));
+                subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_BOTTOM));
                 body.addContent(subDiv);
                 body.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR);
             }
@@ -886,7 +885,28 @@
      * @return a content tree for the marker anchor
      */
     public Content getMarkerAnchor(String anchorName) {
-        return getMarkerAnchor(anchorName, null);
+        return getMarkerAnchor(getName(anchorName), null);
+    }
+
+    /**
+     * Get the marker anchor which will be added to the documentation tree.
+     *
+     * @param sectionName the section name anchor attribute for page
+     * @return a content tree for the marker anchor
+     */
+    public Content getMarkerAnchor(SectionName sectionName) {
+        return getMarkerAnchor(sectionName.getName(), null);
+    }
+
+    /**
+     * Get the marker anchor which will be added to the documentation tree.
+     *
+     * @param sectionName the section name anchor attribute for page
+     * @param anchorName the anchor name combined with section name attribute for the page
+     * @return a content tree for the marker anchor
+     */
+    public Content getMarkerAnchor(SectionName sectionName, String anchorName) {
+        return getMarkerAnchor(sectionName.getName() + getName(anchorName), null);
     }
 
     /**
@@ -937,7 +957,7 @@
     protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
             String tableSummary, String[] tableHeader, Content contentTree) {
         if (deprPkgs.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
                     getTableCaption(configuration.getResource(headingKey)));
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
@@ -1030,7 +1050,7 @@
 
     public Content italicsClassName(ClassDoc cd, boolean qual) {
         Content name = new StringContent((qual)? cd.qualifiedName(): cd.name());
-        return (cd.isInterface())?  HtmlTree.SPAN(HtmlStyle.italic, name): name;
+        return (cd.isInterface())?  HtmlTree.SPAN(HtmlStyle.interfaceName, name): name;
     }
 
     /**
@@ -1291,10 +1311,10 @@
         } else if (doc instanceof ExecutableMemberDoc) {
             ExecutableMemberDoc emd = (ExecutableMemberDoc)doc;
             return getLink(new LinkInfoImpl(configuration, context, classDoc)
-                .label(label).where(getAnchor(emd, isProperty)).strong(strong));
+                .label(label).where(getName(getAnchor(emd, isProperty))).strong(strong));
         } else if (doc instanceof MemberDoc) {
             return getLink(new LinkInfoImpl(configuration, context, classDoc)
-                .label(label).where(doc.name()).strong(strong));
+                .label(label).where(getName(doc.name())).strong(strong));
         } else {
             return label;
         }
@@ -1319,10 +1339,10 @@
         } else if (doc instanceof ExecutableMemberDoc) {
             ExecutableMemberDoc emd = (ExecutableMemberDoc) doc;
             return getLink(new LinkInfoImpl(configuration, context, classDoc)
-                .label(label).where(getAnchor(emd)));
+                .label(label).where(getName(getAnchor(emd))));
         } else if (doc instanceof MemberDoc) {
             return getLink(new LinkInfoImpl(configuration, context, classDoc)
-                .label(label).where(doc.name()));
+                .label(label).where(getName(doc.name())));
         } else {
             return label;
         }
@@ -1546,7 +1566,7 @@
         Content div;
         Content result = commentTagsToContent(null, doc, tags, first);
         if (depr) {
-            Content italic = HtmlTree.SPAN(HtmlStyle.italic, result);
+            Content italic = HtmlTree.SPAN(HtmlStyle.deprecationComment, result);
             div = HtmlTree.DIV(HtmlStyle.block, italic);
             htmltree.addContent(div);
         }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -49,8 +49,6 @@
         implements SerializedFormWriter.SerialFieldWriter {
     ProgramElementDoc[] members = null;
 
-    private boolean printedOverallAnchor = false;
-
     public HtmlSerialFieldWriter(SubWriterHolderWriter writer,
                                     ClassDoc classdoc) {
         super(writer, classdoc);
@@ -98,10 +96,6 @@
         HtmlTree li = new HtmlTree(HtmlTag.LI);
         li.addStyle(HtmlStyle.blockList);
         if (serializableFieldsTree.isValid()) {
-            if (!printedOverallAnchor) {
-                li.addContent(writer.getMarkerAnchor("serializedForm"));
-                printedOverallAnchor = true;
-            }
             Content headingContent = new StringContent(heading);
             Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
                     headingContent);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -85,12 +85,10 @@
      * @return a content tree for the serializable methods content
      */
     public Content getSerializableMethods(String heading, Content serializableMethodContent) {
-        Content li = HtmlTree.LI(HtmlStyle.blockList, writer.getMarkerAnchor(
-                "serialized_methods"));
         Content headingContent = new StringContent(heading);
         Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
                 headingContent);
-        li.addContent(serialHeading);
+        Content li = HtmlTree.LI(HtmlStyle.blockList, serialHeading);
         li.addContent(serializableMethodContent);
         return li;
     }
@@ -113,8 +111,6 @@
      * @param methodsContentTree the content tree to which the member header will be added
      */
     public void addMemberHeader(MethodDoc member, Content methodsContentTree) {
-        methodsContentTree.addContent(writer.getMarkerAnchor(
-                writer.getAnchor(member)));
         methodsContentTree.addContent(getHead(member));
         methodsContentTree.addContent(getSignature(member));
     }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -85,7 +85,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_METHOD_DETAILS);
         Content methodDetailsTree = writer.getMemberTreeHeader();
-        methodDetailsTree.addContent(writer.getMarkerAnchor("method_detail"));
+        methodDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.METHOD_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.methodDetailsLabel);
         methodDetailsTree.addContent(heading);
@@ -159,11 +160,11 @@
                             holder.typeName() : holder.qualifiedTypeName(),
                             false);
                 Content codelLink = HtmlTree.CODE(link);
-                Content strong = HtmlTree.SPAN(HtmlStyle.strong, holder.asClassDoc().isClass()?
+                Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel, holder.asClassDoc().isClass()?
                     writer.descfrmClassLabel : writer.descfrmInterfaceLabel);
-                strong.addContent(writer.getSpace());
-                strong.addContent(codelLink);
-                methodDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, strong));
+                descfrmLabel.addContent(writer.getSpace());
+                descfrmLabel.addContent(codelLink);
+                methodDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
                 writer.addInlineComment(method, methodDocTree);
             }
         }
@@ -244,7 +245,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("method_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.METHOD_SUMMARY));
     }
 
     /**
@@ -252,8 +254,7 @@
      */
     public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
         inheritedTree.addContent(writer.getMarkerAnchor(
-                "methods_inherited_from_class_" +
-                configuration.getClassName(cd)));
+                SectionName.METHODS_INHERITANCE, configuration.getClassName(cd)));
     }
 
     /**
@@ -309,7 +310,7 @@
                 label = writer.specifiedByLabel;
                 context = LinkInfoImpl.Kind.METHOD_SPECIFIED_BY;
             }
-            Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, label));
+            Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.overrideSpecifyLabel, label));
             dl.addContent(dt);
             Content overriddenTypeLink =
                     writer.getLink(new LinkInfoImpl(writer.configuration, context, overriddenType));
@@ -318,7 +319,7 @@
             Content methlink = writer.getLink(
                     new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER,
                     overriddenType.asClassDoc())
-                    .where(writer.getAnchor(method)).label(name));
+                    .where(writer.getName(writer.getAnchor(method))).label(name));
             Content codeMethLink = HtmlTree.CODE(methlink);
             Content dd = HtmlTree.DD(codeMethLink);
             dd.addContent(writer.getSpace());
@@ -364,7 +365,7 @@
             Content intfaclink = writer.getLink(new LinkInfoImpl(
                     writer.configuration, LinkInfoImpl.Kind.METHOD_SPECIFIED_BY, intfac));
             Content codeIntfacLink = HtmlTree.CODE(intfaclink);
-            Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, writer.specifiedByLabel));
+            Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.overrideSpecifyLabel, writer.specifiedByLabel));
             dl.addContent(dt);
             Content methlink = writer.getDocLink(
                     LinkInfoImpl.Kind.MEMBER, implementedMeth,
@@ -400,11 +401,15 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null)?
-                "method_summary":
-                "methods_inherited_from_class_" +
-                configuration.getClassName(cd),
-                writer.getResource("doclet.navMethod"));
+            if (cd == null) {
+                return writer.getHyperLink(
+                        SectionName.METHOD_SUMMARY,
+                        writer.getResource("doclet.navMethod"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.METHODS_INHERITANCE,
+                        configuration.getClassName(cd), writer.getResource("doclet.navMethod"));
+            }
         } else {
             return writer.getResource("doclet.navMethod");
         }
@@ -415,8 +420,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("method_detail",
-                    writer.getResource("doclet.navMethod")));
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.METHOD_DETAIL, writer.getResource("doclet.navMethod")));
         } else {
             liNav.addContent(writer.getResource("doclet.navMethod"));
         }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -132,7 +132,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("nested_class_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.NESTED_CLASS_SUMMARY));
     }
 
     /**
@@ -140,7 +141,8 @@
      */
     public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
         inheritedTree.addContent(writer.getMarkerAnchor(
-                "nested_classes_inherited_from_class_" + cd.qualifiedName()));
+                SectionName.NESTED_CLASSES_INHERITANCE,
+                cd.qualifiedName()));
     }
 
     /**
@@ -164,9 +166,9 @@
      */
     protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
             Content tdSummary) {
-        Content strong = HtmlTree.SPAN(HtmlStyle.strong,
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
                 writer.getLink(new LinkInfoImpl(configuration, context, (ClassDoc)member)));
-        Content code = HtmlTree.CODE(strong);
+        Content code = HtmlTree.CODE(memberLink);
         tdSummary.addContent(code);
     }
 
@@ -202,9 +204,15 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null) ? "nested_class_summary":
-                "nested_classes_inherited_from_class_" + cd.qualifiedName(),
-                writer.getResource("doclet.navNested"));
+            if (cd == null) {
+                return writer.getHyperLink(
+                        SectionName.NESTED_CLASS_SUMMARY,
+                        writer.getResource("doclet.navNested"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.NESTED_CLASSES_INHERITANCE,
+                        cd.qualifiedName(), writer.getResource("doclet.navNested"));
+            }
         } else {
             return writer.getResource("doclet.navNested");
         }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -183,7 +183,7 @@
                     printedHeader = true;
                 }
                 Content arr_i_name = new StringContent(arr[i].name());
-                if (arr[i].isInterface()) arr_i_name = HtmlTree.SPAN(HtmlStyle.italic, arr_i_name);
+                if (arr[i].isInterface()) arr_i_name = HtmlTree.SPAN(HtmlStyle.interfaceName, arr_i_name);
                 Content link = getLink(new LinkInfoImpl(configuration,
                         LinkInfoImpl.Kind.PACKAGE_FRAME, arr[i]).label(arr_i_name).target("classFrame"));
                 Content li = HtmlTree.LI(link);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -203,8 +203,9 @@
             Content see = seeLabel;
             see.addContent(" ");
             Content descPara = HtmlTree.P(see);
-            Content descLink = getHyperLink(DocLink.fragment("overview_description"),
-                descriptionLabel, "", "");
+            Content descLink = getHyperLink(getDocLink(
+                    SectionName.OVERVIEW_DESCRIPTION),
+                    descriptionLabel, "", "");
             descPara.addContent(descLink);
             div.addContent(descPara);
             body.addContent(div);
@@ -220,7 +221,8 @@
      */
     protected void addOverviewComment(Content htmltree) {
         if (root.inlineTags().length > 0) {
-            htmltree.addContent(getMarkerAnchor("overview_description"));
+            htmltree.addContent(
+                    getMarkerAnchor(SectionName.OVERVIEW_DESCRIPTION));
             addInlineComment(root, htmltree);
         }
     }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -155,7 +155,7 @@
      * @param div the content tree to which the link will be added
      */
     protected void addLinkToMainTree(Content div) {
-        Content span = HtmlTree.SPAN(HtmlStyle.strong,
+        Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
                 getResource("doclet.Package_Hierarchies"));
         div.addContent(span);
         HtmlTree ul = new HtmlTree (HtmlTag.UL);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -151,7 +151,7 @@
      * @param contentTree the content tree to which the package list will be added
      */
     protected void addPackageList(Content contentTree) throws IOException {
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_Packages.that.use.0",
                 getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)))));
@@ -196,7 +196,7 @@
             }
             String tableSummary = configuration.getText("doclet.Use_Table_Summary",
                     configuration.getText("doclet.classes"));
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
                     getTableCaption(configuration.getResource(
                     "doclet.ClassUse_Classes.in.0.used.by.1",
                     getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)),
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -112,7 +112,8 @@
             addSummaryComment(packageDoc, docSummaryDiv);
             div.addContent(docSummaryDiv);
             Content space = getSpace();
-            Content descLink = getHyperLink(DocLink.fragment("package_description"),
+            Content descLink = getHyperLink(getDocLink(
+                    SectionName.PACKAGE_DESCRIPTION),
                     descriptionLabel, "", "");
             Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
             div.addContent(descPara);
@@ -140,7 +141,7 @@
         if (Util.isDeprecated(packageDoc)) {
             HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
             deprDiv.addStyle(HtmlStyle.deprecatedContent);
-            Content deprPhrase = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
+            Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
             deprDiv.addContent(deprPhrase);
             if (deprs.length > 0) {
                 Tag[] commentTags = deprs[0].inlineTags();
@@ -169,7 +170,7 @@
         if(classes.length > 0) {
             Arrays.sort(classes);
             Content caption = getTableCaption(new RawHtml(label));
-            Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0,
+            Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
                     tableSummary, caption);
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
@@ -211,7 +212,8 @@
      */
     public void addPackageDescription(Content packageContentTree) {
         if (packageDoc.inlineTags().length > 0) {
-            packageContentTree.addContent(getMarkerAnchor("package_description"));
+            packageContentTree.addContent(
+                    getMarkerAnchor(SectionName.PACKAGE_DESCRIPTION));
             Content h2Content = new StringContent(
                     configuration.getText("doclet.Package_Description",
                     packageDoc.name()));
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -174,7 +174,7 @@
                     printedHeader = true;
                 }
                 Content arr_i_name = new StringContent(arr[i].name());
-                if (arr[i].isInterface()) arr_i_name = HtmlTree.SPAN(HtmlStyle.italic, arr_i_name);
+                if (arr[i].isInterface()) arr_i_name = HtmlTree.SPAN(HtmlStyle.interfaceName, arr_i_name);
                 Content link = getLink(new LinkInfoImpl(configuration,
                         LinkInfoImpl.Kind.PACKAGE_FRAME, arr[i]).label(arr_i_name).target("classFrame"));
                 Content li = HtmlTree.LI(link);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -129,7 +129,8 @@
             addSummaryComment(packageDoc, docSummaryDiv);
             div.addContent(docSummaryDiv);
             Content space = getSpace();
-            Content descLink = getHyperLink(DocLink.fragment("package_description"),
+            Content descLink = getHyperLink(getDocLink(
+                    SectionName.PACKAGE_DESCRIPTION),
                     descriptionLabel, "", "");
             Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
             div.addContent(descPara);
@@ -157,7 +158,7 @@
         if (Util.isDeprecated(packageDoc)) {
             HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
             deprDiv.addStyle(HtmlStyle.deprecatedContent);
-            Content deprPhrase = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
+            Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
             deprDiv.addContent(deprPhrase);
             if (deprs.length > 0) {
                 Tag[] commentTags = deprs[0].inlineTags();
@@ -174,8 +175,11 @@
      */
     public void addClassesSummary(ClassDoc[] classes, String label,
             String tableSummary, String[] tableHeader, Content packageSummaryContentTree) {
+        HtmlTree li = new HtmlTree(HtmlTag.LI);
+        li.addStyle(HtmlStyle.blockList);
         addClassesSummary(classes, label, tableSummary, tableHeader,
-                packageSummaryContentTree, profileValue);
+                li, profileValue);
+        packageSummaryContentTree.addContent(li);
     }
 
     /**
@@ -192,7 +196,8 @@
      */
     public void addPackageDescription(Content packageContentTree) {
         if (packageDoc.inlineTags().length > 0) {
-            packageContentTree.addContent(getMarkerAnchor("package_description"));
+            packageContentTree.addContent(
+                    getMarkerAnchor(SectionName.PACKAGE_DESCRIPTION));
             Content h2Content = new StringContent(
                     configuration.getText("doclet.Package_Description",
                     packageDoc.name()));
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfileWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfileWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -187,7 +187,7 @@
             deprs = pkg.tags("deprecated");
             HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
             deprDiv.addStyle(HtmlStyle.deprecatedContent);
-            Content deprPhrase = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
+            Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
             deprDiv.addContent(deprPhrase);
             if (deprs.length > 0) {
                 Tag[] commentTags = deprs[0].inlineTags();
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -70,7 +70,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_PROPERTY_DETAILS);
         Content propertyDetailsTree = writer.getMemberTreeHeader();
-        propertyDetailsTree.addContent(writer.getMarkerAnchor("property_detail"));
+        propertyDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.PROPERTY_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.propertyDetailsLabel);
         propertyDetailsTree.addContent(heading);
@@ -135,11 +136,11 @@
                             holder.typeName() : holder.qualifiedTypeName(),
                             false);
                 Content codeLink = HtmlTree.CODE(link);
-                Content strong = HtmlTree.SPAN(HtmlStyle.strong, holder.isClass()?
+                Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel, holder.isClass()?
                    writer.descfrmClassLabel : writer.descfrmInterfaceLabel);
-                strong.addContent(writer.getSpace());
-                strong.addContent(codeLink);
-                propertyDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, strong));
+                descfrmLabel.addContent(writer.getSpace());
+                descfrmLabel.addContent(codeLink);
+                propertyDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
                 writer.addInlineComment(property, propertyDocTree);
             }
         }
@@ -220,7 +221,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("property_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.PROPERTY_SUMMARY));
     }
 
     /**
@@ -228,7 +230,8 @@
      */
     public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
         inheritedTree.addContent(writer.getMarkerAnchor(
-                "properties_inherited_from_class_" + configuration.getClassName(cd)));
+                SectionName.PROPERTIES_INHERITANCE,
+                configuration.getClassName(cd)));
     }
 
     /**
@@ -252,14 +255,14 @@
      */
     protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
             Content tdSummary) {
-        Content strong = HtmlTree.SPAN(HtmlStyle.strong,
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
                 writer.getDocLink(context, cd,
                 (MemberDoc) member,
                 member.name().substring(0, member.name().lastIndexOf("Property")),
                 false,
                 true));
 
-        Content code = HtmlTree.CODE(strong);
+        Content code = HtmlTree.CODE(memberLink);
         tdSummary.addContent(code);
     }
 
@@ -297,11 +300,15 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null)?
-                "property_summary":
-                "properties_inherited_from_class_" +
-                configuration.getClassName(cd),
+            if (cd == null) {
+                return writer.getHyperLink(
+                SectionName.PROPERTY_SUMMARY,
                 writer.getResource("doclet.navProperty"));
+            } else {
+                return writer.getHyperLink(
+                SectionName.PROPERTIES_INHERITANCE,
+                configuration.getClassName(cd), writer.getResource("doclet.navProperty"));
+            }
         } else {
             return writer.getResource("doclet.navProperty");
         }
@@ -312,7 +319,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("property_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.PROPERTY_DETAIL,
                     writer.getResource("doclet.navProperty")));
         } else {
             liNav.addContent(writer.getResource("doclet.navProperty"));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/SectionName.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2013, 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.formats.html;
+
+/**
+ * Enum representing various section names of generated API documentation.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public enum SectionName {
+
+    ANNOTATION_TYPE_ELEMENT_DETAIL("annotation.type.element.detail"),
+    ANNOTATION_TYPE_FIELD_DETAIL("annotation.type.field.detail"),
+    ANNOTATION_TYPE_FIELD_SUMMARY("annotation.type.field.summary"),
+    ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY("annotation.type.optional.element.summary"),
+    ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY("annotation.type.required.element.summary"),
+    CONSTRUCTOR_DETAIL("constructor.detail"),
+    CONSTRUCTOR_SUMMARY("constructor.summary"),
+    ENUM_CONSTANT_DETAIL("enum.constant.detail"),
+    ENUM_CONSTANTS_INHERITANCE("enum.constants.inherited.from.class."),
+    ENUM_CONSTANT_SUMMARY("enum.constant.summary"),
+    FIELD_DETAIL("field.detail"),
+    FIELDS_INHERITANCE("fields.inherited.from.class."),
+    FIELD_SUMMARY("field.summary"),
+    METHOD_DETAIL("method.detail"),
+    METHODS_INHERITANCE("methods.inherited.from.class."),
+    METHOD_SUMMARY("method.summary"),
+    NAVBAR_BOTTOM("navbar.bottom"),
+    NAVBAR_BOTTOM_FIRSTROW("navbar.bottom.firstrow"),
+    NAVBAR_TOP("navbar.top"),
+    NAVBAR_TOP_FIRSTROW("navbar.top.firstrow"),
+    NESTED_CLASSES_INHERITANCE("nested.classes.inherited.from.class."),
+    NESTED_CLASS_SUMMARY("nested.class.summary"),
+    OVERVIEW_DESCRIPTION("overview.description"),
+    PACKAGE_DESCRIPTION("package.description"),
+    PROPERTY_DETAIL("property.detail"),
+    PROPERTIES_INHERITANCE("properties.inherited.from.class."),
+    PROPERTY_SUMMARY("property.summary"),
+    SKIP_NAVBAR_BOTTOM("skip.navbar.bottom"),
+    SKIP_NAVBAR_TOP("skip.navbar.top"),
+    UNNAMED_PACKAGE_ANCHOR("unnamed.package");
+
+    private final String value;
+
+    SectionName(String sName) {
+        this.value = sName;
+    }
+
+    public String getName() {
+        return this.value;
+    }
+}
--- a/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -115,7 +115,8 @@
         for (int i = 0; i < indexbuilder.elements().length; i++) {
             String unicode = (indexbuilder.elements())[i].toString();
             contentTree.addContent(
-                    getHyperLink("_" + unicode + "_", new StringContent(unicode)));
+                    getHyperLink(getNameForIndex(unicode),
+                    new StringContent(unicode)));
             contentTree.addContent(getSpace());
         }
     }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -92,7 +92,7 @@
         else {
             caption = getTableCaption(mw.getCaption());
         }
-        Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0,
+        Content table = HtmlTree.TABLE(HtmlStyle.memberSummary, 0, 3, 0,
                 mw.getTableSummary(), caption);
         table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(cd), "col"));
         for (int i = 0; i < tableContents.size(); i++) {
@@ -175,8 +175,8 @@
         Tag[] deprs = member.tags("deprecated");
         Content div;
         if (Util.isDeprecated((ProgramElementDoc) member)) {
-            Content strong = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
-            div = HtmlTree.DIV(HtmlStyle.block, strong);
+            Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+            div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
             div.addContent(getSpace());
             if (deprs.length > 0) {
                 addInlineDeprecatedComment(member, deprs[0], div);
@@ -186,8 +186,8 @@
         } else {
             ClassDoc cd = ((ProgramElementDoc)member).containingClass();
             if (cd != null && Util.isDeprecated(cd)) {
-                Content strong = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
-                div = HtmlTree.DIV(HtmlStyle.block, strong);
+                Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+                div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
                 div.addContent(getSpace());
                 tdSummary.addContent(div);
             }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -97,7 +97,7 @@
         Tag[] deprs = doc.tags("deprecated");
         if (doc instanceof ClassDoc) {
             if (Util.isDeprecated((ProgramElementDoc) doc)) {
-                result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
+                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                         new StringContent(configuration.getText("doclet.Deprecated"))));
                 result.addContent(RawHtml.nbsp);
                 if (deprs.length > 0) {
@@ -112,17 +112,18 @@
         } else {
             MemberDoc member = (MemberDoc) doc;
             if (Util.isDeprecated((ProgramElementDoc) doc)) {
-                result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
+                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                         new StringContent(configuration.getText("doclet.Deprecated"))));
                 result.addContent(RawHtml.nbsp);
                 if (deprs.length > 0) {
                     Content body = commentTagsToOutput(null, doc,
                         deprs[0].inlineTags(), false);
-                    result.addContent(HtmlTree.SPAN(HtmlStyle.italic, body));
+                    if (!body.isEmpty())
+                        result.addContent(HtmlTree.SPAN(HtmlStyle.deprecationComment, body));
                 }
             } else {
                 if (Util.isDeprecated(member.containingClass())) {
-                    result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
+                    result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                             new StringContent(configuration.getText("doclet.Deprecated"))));
                     result.addContent(RawHtml.nbsp);
                 }
@@ -150,7 +151,7 @@
      * {@inheritDoc}
      */
     public Content getParamHeader(String header) {
-        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
+        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.paramLabel,
                 new StringContent(header)));
         return result;
     }
@@ -185,7 +186,7 @@
      */
     public Content returnTagOutput(Tag returnTag) {
         ContentBuilder result = new ContentBuilder();
-        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.returnLabel,
                 new StringContent(configuration.getText("doclet.Returns")))));
         result.addContent(HtmlTree.DD(htmlWriter.commentTagsToContent(
                 returnTag, null, returnTag.inlineTags(), false)));
@@ -230,7 +231,7 @@
             return body;
 
         ContentBuilder result = new ContentBuilder();
-        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.seeLabel,
                 new StringContent(configuration.getText("doclet.See_Also")))));
         result.addContent(HtmlTree.DD(body));
         return result;
@@ -249,7 +250,7 @@
      */
     public Content simpleTagOutput(Tag[] simpleTags, String header) {
         ContentBuilder result = new ContentBuilder();
-        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header))));
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
         ContentBuilder body = new ContentBuilder();
         for (int i = 0; i < simpleTags.length; i++) {
             if (i > 0) {
@@ -267,7 +268,7 @@
      */
     public Content simpleTagOutput(Tag simpleTag, String header) {
         ContentBuilder result = new ContentBuilder();
-        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header))));
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
         Content body = htmlWriter.commentTagsToContent(
                 simpleTag, null, simpleTag.inlineTags(), false);
         result.addContent(HtmlTree.DD(body));
@@ -278,7 +279,7 @@
      * {@inheritDoc}
      */
     public Content getThrowsHeader() {
-        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
+        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.throwsLabel,
                 new StringContent(configuration.getText("doclet.Throws"))));
         return result;
     }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -131,7 +131,7 @@
             return;
         }
         if (!classesonly) {
-            Content span = HtmlTree.SPAN(HtmlStyle.strong,
+            Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
                     getResource("doclet.Package_Hierarchies"));
             contentTree.addContent(span);
             HtmlTree ul = new HtmlTree(HtmlTag.UL);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java	Mon Oct 28 18:30:14 2013 -0400
@@ -41,8 +41,6 @@
     @Override
     public void addContent(Content content) {
         nullCheck(content);
-        if ((content instanceof ContentBuilder) && content.isEmpty())
-            return;
         ensureMutableContents();
         if (content instanceof ContentBuilder) {
             contents.addAll(((ContentBuilder) content).contents);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -30,6 +30,7 @@
 
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.formats.html.ConfigurationImpl;
+import com.sun.tools.doclets.formats.html.SectionName;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.DocFile;
 import com.sun.tools.doclets.internal.toolkit.util.DocLink;
@@ -78,7 +79,7 @@
     }
 
     /**
-     * Get Html Hyper Link string.
+     * Get Html Hyper Link Content.
      *
      * @param where      Position of the link in the file. Character '#' is not
      *                   needed.
@@ -87,7 +88,125 @@
      */
     public Content getHyperLink(String where,
                                Content label) {
-        return getHyperLink(DocLink.fragment(where), label, "", "");
+        return getHyperLink(getDocLink(where), label, "", "");
+    }
+
+    /**
+     * Get Html Hyper Link Content.
+     *
+     * @param sectionName      The section name to which the link will be created.
+     * @param label            Tag for the link.
+     * @return a content tree for the hyper link
+     */
+    public Content getHyperLink(SectionName sectionName,
+                               Content label) {
+        return getHyperLink(getDocLink(sectionName), label, "", "");
+    }
+
+    /**
+     * Get Html Hyper Link Content.
+     *
+     * @param sectionName      The section name combined with where to which the link
+     *                         will be created.
+     * @param where            The fragment combined with sectionName to which the link
+     *                         will be created.
+     * @param label            Tag for the link.
+     * @return a content tree for the hyper link
+     */
+    public Content getHyperLink(SectionName sectionName, String where,
+                               Content label) {
+        return getHyperLink(getDocLink(sectionName, where), label, "", "");
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param where      Position of the link in the file.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(String where) {
+        return DocLink.fragment(getName(where));
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param sectionName      The section name to which the link will be created.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(SectionName sectionName) {
+        return DocLink.fragment(sectionName.getName());
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param sectionName      The section name combined with where to which the link
+     *                         will be created.
+     * @param where            The fragment combined with sectionName to which the link
+     *                         will be created.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(SectionName sectionName, String where) {
+        return DocLink.fragment(sectionName.getName() + getName(where));
+    }
+
+    /**
+     * Convert the name to a valid HTML name.
+     *
+     * @param name the name that needs to be converted to valid HTML name.
+     * @return a valid HTML name string.
+     */
+    public String getName(String name) {
+        StringBuilder sb = new StringBuilder();
+        char ch;
+        /* The HTML 4 spec at http://www.w3.org/TR/html4/types.html#h-6.2 mentions
+         * that the name/id should begin with a letter followed by other valid characters.
+         * The HTML 5 spec (draft) is more permissive on names/ids where the only restriction
+         * is that it should be at least one character long and should not contain spaces.
+         * The spec draft is @ http://www.w3.org/html/wg/drafts/html/master/dom.html#the-id-attribute.
+         *
+         * For HTML 4, we need to check for non-characters at the beginning of the name and
+         * substitute it accordingly, "_" and "$" can appear at the beginning of a member name.
+         * The method substitutes "$" with "Z:Z:D" and will prefix "_" with "Z:Z".
+         */
+        for (int i = 0; i < name.length(); i++) {
+            ch = name.charAt(i);
+            switch (ch) {
+                case '(':
+                case ')':
+                case '<':
+                case '>':
+                case ',':
+                    sb.append('-');
+                    break;
+                case ' ':
+                case '[':
+                    break;
+                case ']':
+                    sb.append(":A");
+                    break;
+                // Any appearance of $ needs to be substituted with ":D" and not with hyphen
+                // since a field name "P$$ and a method P(), both valid member names, can end
+                // up as "P--". A member name beginning with $ needs to be substituted with
+                // "Z:Z:D".
+                case '$':
+                    if (i == 0)
+                        sb.append("Z:Z");
+                    sb.append(":D");
+                    break;
+                // A member name beginning with _ needs to be prefixed with "Z:Z" since valid anchor
+                // names can only begin with a letter.
+                case '_':
+                    if (i == 0)
+                        sb.append("Z:Z");
+                    sb.append(ch);
+                    break;
+                default:
+                    sb.append(ch);
+            }
+        }
+        return sb.toString();
     }
 
     /**
@@ -117,7 +236,7 @@
                                String stylename, String title, String target) {
         Content body = label;
         if (strong) {
-            body = HtmlTree.SPAN(HtmlStyle.strong, body);
+            body = HtmlTree.SPAN(HtmlStyle.typeNameLink, body);
         }
         if (stylename != null && stylename.length() != 0) {
             HtmlTree t = new HtmlTree(HtmlTag.FONT, body);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,37 +48,55 @@
     colFirst,
     colLast,
     colOne,
+    constantsSummary,
     constantValuesContainer,
     contentContainer,
+    deprecatedContent,
+    deprecatedLabel,
+    deprecatedSummary,
+    deprecationComment,
     description,
+    descfrmTypeLabel,
     details,
     docSummary,
+    emphasizedPhrase,
     header,
     horizontal,
     footer,
     indexContainer,
     indexHeader,
     inheritance,
-    italic,
+    interfaceName,
     legalCopy,
+    memberNameLabel,
+    memberNameLink,
+    memberSummary,
     nameValue,
     navBarCell1Rev,
     navList,
+    overrideSpecifyLabel,
     overviewSummary,
-    packageSummary,
+    packageHierarchyLabel,
+    paramLabel,
+    returnLabel,
     rowColor,
+    seeLabel,
     serializedFormContainer,
+    simpleTagLabel,
     skipNav,
     sourceContainer,
     sourceLineNo,
-    strong,
     subNav,
     subNavList,
     subTitle,
     summary,
-    deprecatedContent,
     tabEnd,
     tableTab,
+    throwsLabel,
     title,
-    topNav;
+    topNav,
+    typeNameLabel,
+    typeNameLink,
+    typeSummary,
+    useSummary;
 }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -102,7 +102,12 @@
      * @param tagContent tag content to be added
      */
     public void addContent(Content tagContent) {
-        if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
+        if (tagContent instanceof ContentBuilder) {
+            for (Content content: ((ContentBuilder)tagContent).contents) {
+                addContent(content);
+            }
+        }
+        else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
             if (content.isEmpty())
                 content = new ArrayList<Content>();
             content.add(tagContent);
@@ -619,25 +624,6 @@
     }
 
     /**
-     * Generates a Table tag with border, width and summary attributes and
-     * some content.
-     *
-     * @param border border for the table
-     * @param width width of the table
-     * @param summary summary for the table
-     * @param body content for the table
-     * @return an HtmlTree object for the TABLE tag
-     */
-    public static HtmlTree TABLE(int border, int width, String summary,
-            Content body) {
-        HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
-        htmltree.addAttr(HtmlAttr.BORDER, Integer.toString(border));
-        htmltree.addAttr(HtmlAttr.WIDTH, Integer.toString(width));
-        htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary));
-        return htmltree;
-    }
-
-    /**
      * Generates a Table tag with style class, border, cell padding,
      * cellspacing and summary attributes and some content.
      *
@@ -662,22 +648,6 @@
     }
 
     /**
-     * Generates a Table tag with border, cell padding,
-     * cellspacing and summary attributes and some content.
-     *
-     * @param border border for the table
-     * @param cellPadding cell padding for the table
-     * @param cellSpacing cell spacing for the table
-     * @param summary summary for the table
-     * @param body content for the table
-     * @return an HtmlTree object for the TABLE tag
-     */
-    public static HtmlTree TABLE(int border, int cellPadding,
-            int cellSpacing, String summary, Content body) {
-        return TABLE(null, border, cellPadding, cellSpacing, summary, body);
-    }
-
-    /**
      * Generates a TD tag with style class attribute and some content.
      *
      * @param styleClass style for the tag
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -310,8 +310,12 @@
         if(winTitle != null && winTitle.length() > 0) {
             script.addAttr(HtmlAttr.TYPE, "text/javascript");
             String scriptCode = "<!--" + DocletConstants.NL +
-                    "    if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
-                    "        parent.document.title=\"" + winTitle + "\";" + DocletConstants.NL +
+                    "    try {" + DocletConstants.NL +
+                    "        if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
+                    "            parent.document.title=\"" + escapeJavaScriptChars(winTitle) + "\";" + DocletConstants.NL +
+                    "        }" + DocletConstants.NL +
+                    "    }" + DocletConstants.NL +
+                    "    catch(err) {" + DocletConstants.NL +
                     "    }" + DocletConstants.NL +
                     "//-->" + DocletConstants.NL;
             RawHtml scriptContent = new RawHtml(scriptCode);
@@ -321,6 +325,53 @@
     }
 
     /**
+     * Returns a String with escaped special JavaScript characters.
+     *
+     * @param s String that needs to be escaped
+     * @return a valid escaped JavaScript string
+     */
+    private static String escapeJavaScriptChars(String s) {
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < s.length(); i++) {
+            char ch = s.charAt(i);
+            switch (ch) {
+                case '\b':
+                    sb.append("\\b");
+                    break;
+                case '\t':
+                    sb.append("\\t");
+                    break;
+                case '\n':
+                    sb.append("\\n");
+                    break;
+                case '\f':
+                    sb.append("\\f");
+                    break;
+                case '\r':
+                    sb.append("\\r");
+                    break;
+                case '"':
+                    sb.append("\\\"");
+                    break;
+                case '\'':
+                    sb.append("\\\'");
+                    break;
+                case '\\':
+                    sb.append("\\\\");
+                    break;
+                default:
+                    if (ch < 32 || ch >= 127) {
+                        sb.append(String.format("\\u%04X", (int)ch));
+                    } else {
+                        sb.append(ch);
+                    }
+                    break;
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
      * Returns a content tree for the SCRIPT tag for the main page(index.html).
      *
      * @return a content for the SCRIPT tag
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2007, 2013, 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.
+ */
+
+/**
+    This package contains classes that write HTML markup tags.
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+ */
+@jdk.Exported(false)
+package com.sun.tools.doclets.formats.html.markup;
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
-<head>
-<title>com.sun.tools.doclets.formats.html.markup package</title>
-<body bgcolor="white">
-        This package contains classes that write HTML markup tags.
-    </body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2003, 2013, 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.
+ */
+
+/**
+    This is the default doclet provided with JDK that produces Javadoc's
+    default HTML-formatted API output.  For more documentation
+    on this doclet, please refer to the link below.
+
+    @see <a href="http://www.java.sun.com/javadoc/standard-doclet.html">
+            http://www.java.sun.com/javadoc/standard-doclet.html </a>
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.doclets.formats.html;
--- a/src/share/classes/com/sun/tools/doclets/formats/html/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
-<head>
-<title>com.sun.tools.doclets.formats.html package</title>
-</head>
-<body bgcolor="white">
-        This is the default doclet provided with JDK that produces Javadoc's 
-        default HTML-formatted API output.  For more documentation
-        on this doclet, please refer to the link below.
-        
-        @see <a href="http://www.java.sun.com/javadoc/standard-doclet.html">
-                http://www.java.sun.com/javadoc/standard-doclet.html </a>
-    </body>
-</html>
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java	Mon Oct 28 18:30:14 2013 -0400
@@ -83,6 +83,16 @@
         } catch (Configuration.Fault f) {
             root.printError(f.getMessage());
             return false;
+        } catch (DocletAbortException e) {
+            Throwable cause = e.getCause();
+            if (cause != null) {
+                if (cause.getLocalizedMessage() != null) {
+                    root.printError(cause.getLocalizedMessage());
+                } else {
+                    root.printError(cause.toString());
+                }
+            }
+            return false;
         } catch (Exception exc) {
             exc.printStackTrace();
             return false;
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java	Mon Oct 28 18:30:14 2013 -0400
@@ -140,7 +140,7 @@
             configuration.root.printError("Unknown element: " + component);
             throw new DocletAbortException(e);
         } catch (InvocationTargetException e) {
-            e.getCause().printStackTrace();
+            throw new DocletAbortException(e.getCause());
         } catch (Exception e) {
             e.printStackTrace();
             configuration.root.printError("Exception " +
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2003, 2013, 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.
+ */
+
+/**
+    This doclet-independent package has a set of classes and
+    interfaces that are the building blocks for doclets. They
+    define the basic structure of doclets and make doclet
+    writing much easier because they provide the content generation
+    code to be shared among different doclets. Builders only provide
+    the structure and content of API documentation.
+    They will not provide any style markup.
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.doclets.internal.toolkit.builders;
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
-<head>
-<title>com.sun.tools.doclets.internal.toolkit.builders package</title>
-</head>
-<body bgcolor="white">
-        This doclet-independent package has a set of classes and 
-        interfaces that are the building blocks for doclets. They 
-        define the basic structure of doclets and make doclet
-        writing much easier because they provide the content generation 
-        code to be shared among different doclets. Builders only provide 
-        the structure and content of API documentation.
-        They will not provide any style markup.
-        <p>
-        This code is not part of an API.
-        It is implementation that is subject to change.
-        Do not use it as an API.
-    </body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2003, 2013, 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.
+ */
+
+/**
+    Contains the base classes that make up a doclet.  Doclets that reuse
+    the functionality provided by the toolkit should have the following
+    characteristics:
+    <ul>
+        <li>
+            The main driver class should extend
+            {@link com.sun.tools.doclets.internal.toolkit.AbstractDoclet}.
+        </li>
+        <li>
+            The doclet configuration class should extend
+            {@link com.sun.tools.doclets.internal.toolkit.Configuration}.
+        </li>
+        <li>
+            The doclet should have a writer factory that implements
+            {@link com.sun.tools.doclets.internal.toolkit.WriterFactory}.
+            This class constructs writers that write doclet specific output.
+        </li>
+        <li>
+            The doclet should have a taglet writer that extends
+            {@link com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter}.
+             This writer determines how to output each given tag.
+        </li>
+    </ul>
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.doclets.internal.toolkit;
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
-<head>
-<title>com.sun.tools.doclets.internal.toolkit package</title>
-</head>
-<body bgcolor="white">
-
-        Contains the base classes that make up a doclet.  Doclets that reuse
-        the functionality provided by the toolkit should have the following
-        characteristics:
-        <ul>
-            <li> 
-                The main driver class should extend 
-                {@link com.sun.tools.doclets.internal.toolkit.AbstractDoclet}.
-            </li>
-            <li> 
-                The doclet configuration class should extend 
-                {@link com.sun.tools.doclets.internal.toolkit.Configuration}.
-            </li>
-            <li> 
-                The doclet should have a writer factory that implements
-                {@link com.sun.tools.doclets.internal.toolkit.WriterFactory}.  
-                This class constructs writers that write doclet specific output.
-            </li>
-            <li> 
-                The doclet should have a taglet writer that extends
-                {@link com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter}. 
-                 This writer determines how to output each given tag.
-            </li>
-    </body>
-</html>
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css	Mon Oct 28 18:30:14 2013 -0400
@@ -348,27 +348,16 @@
 /*
 Table styles
 */
-.contentContainer table, .classUseContainer table, .constantValuesContainer table {
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
     border-bottom:1px solid #9eadc0;
-    width:100%;
-}
-.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
+    margin:0 0 12px 0px;
     width:100%;
 }
-.contentContainer .description table, .contentContainer .details table {
-    border-bottom:none;
-}
-.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{
-    vertical-align:top;
-    padding-right:20px;
+.overviewSummary, .memberSummary  {
+    padding:0px;
 }
-.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast,
-.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast,
-.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne,
-.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne {
-    padding-right:3px;
-}
-.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
+.overviewSummary caption, .memberSummary caption, .typeSummary caption,
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
     position:relative;
     text-align:left;
     background-repeat:no-repeat;
@@ -379,10 +368,18 @@
     padding:0px;
     margin:0px;
 }
-caption a:link, caption a:hover, caption a:active, caption a:visited {
+.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
+.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
+.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
+.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
+.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
     color:#FFFFFF;
 }
-.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
+.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -390,7 +387,7 @@
     float:left;
     background-image:url(resources/titlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.activeTableTab span {
+.memberSummary caption span.activeTableTab span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -398,7 +395,7 @@
     float:left;
     background-image:url(resources/activetitlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.tableTab span {
+.memberSummary caption span.tableTab span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -406,14 +403,15 @@
     float:left;
     background-image:url(resources/titlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.tableTab, .contentContainer ul.blockList li.blockList caption span.activeTableTab {
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
     padding-top:0px;
     padding-left:0px;
     background-image:none;
     float:none;
     display:inline-block;
 }
-.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd {
+.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
     width:10px;
     background-image:url(resources/titlebar_end.gif);
     background-repeat:no-repeat;
@@ -421,7 +419,7 @@
     position:relative;
     float:left;
 }
-.contentContainer ul.blockList li.blockList .activeTableTab .tabEnd {
+.memberSummary .activeTableTab .tabEnd {
     width:10px;
     margin-right:5px;
     background-image:url(resources/activetitlebar_end.gif);
@@ -430,7 +428,7 @@
     position:relative;
     float:left;
 }
-.contentContainer ul.blockList li.blockList .tableTab .tabEnd {
+.memberSummary .tableTab .tabEnd {
     width:10px;
     margin-right:5px;
     background-image:url(resources/titlebar_end.gif);
@@ -439,33 +437,23 @@
     position:relative;
     float:left;
 }
-ul.blockList ul.blockList li.blockList table {
-    margin:0 0 12px 0px;
-    width:100%;
-}
-.tableSubHeadingColor {
-    background-color: #EEEEFF;
-}
-.altColor {
-    background-color:#eeeeef;
-}
-.rowColor {
-    background-color:#ffffff;
-}
-.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td {
+.overviewSummary td, .memberSummary td, .typeSummary td,
+.useSummary td, .constantsSummary td, .deprecatedSummary td {
     text-align:left;
     padding:3px 3px 3px 7px;
 }
-th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
+th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
+td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
+    vertical-align:top;
+    padding-right:3px;
+}
+th.colFirst, th.colLast, th.colOne, .constantsSummary th {
     background:#dee3e9;
     border-top:1px solid #9eadc0;
     border-bottom:1px solid #9eadc0;
     text-align:left;
     padding:3px 3px 3px 7px;
 }
-td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
-    font-weight:bold;
-}
 td.colFirst, th.colFirst {
     border-left:1px solid #9eadc0;
     white-space:nowrap;
@@ -477,18 +465,25 @@
     border-right:1px solid #9eadc0;
     border-left:1px solid #9eadc0;
 }
-table.overviewSummary  {
-    padding:0px;
-    margin-left:0px;
-}
-table.overviewSummary td.colFirst, table.overviewSummary th.colFirst,
-table.overviewSummary td.colOne, table.overviewSummary th.colOne {
+.overviewSummary td.colFirst, .overviewSummary th.colFirst,
+.overviewSummary td.colOne, .overviewSummary th.colOne,
+.memberSummary td.colFirst, .memberSummary th.colFirst,
+.memberSummary td.colOne, .memberSummary th.colOne,
+.typeSummary td.colFirst{
     width:25%;
     vertical-align:middle;
 }
-table.packageSummary td.colFirst, table.overviewSummary th.colFirst {
-    width:25%;
-    vertical-align:middle;
+td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
+    font-weight:bold;
+}
+.tableSubHeadingColor {
+    background-color: #EEEEFF;
+}
+.altColor {
+    background-color:#eeeeef;
+}
+.rowColor {
+    background-color:#ffffff;
 }
 /*
 Content styles
@@ -519,9 +514,11 @@
     display:block;
     margin:3px 0 0 0;
 }
-.strong {
+.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
+.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
+.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
     font-weight:bold;
 }
-.italic {
+.deprecationComment, .emphasizedPhrase, .interfaceName {
     font-style:italic;
 }
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Mon Oct 28 18:30:14 2013 -0400
@@ -205,6 +205,10 @@
         }
     }
 
+    public Set<String> getCustomTagNames() {
+        return customTags.keySet();
+    }
+
     /**
      * Add a new <code>Taglet</code>.  Print a message to indicate whether or not
      * the Taglet was registered properly.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2003, 2013, 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.
+ */
+
+/**
+    This package has classes used to generate Javadoc tag documentation.
+    Doclets no longer have to implement its own version of standard tags
+    such as &#64;param and &#64;throws.  This is the single, doclet
+    implementation of each standard tag that is shared by all
+    doclets.  Each doclet must have a taglet writer that takes a taglet
+    as input and writes doclet-dependent output. The taglet itself will
+    do the tag processing. For example, suppose we are outputing
+    &#64;throws tags. The taglet would:
+    <ul>
+        <li> Retrieve the list of throws tags to be documented.
+        <li> Replace {&#64;inheritDoc} with the appropriate documentation.
+        <li> Add throws documentation for exceptions that are declared in
+             the signature of the method but
+             not documented with the throws tags.
+    </ul>
+    After doing the steps above, the taglet would pass the information to
+    the taglet writer for writing. The taglets are essentially builders for
+    tags.
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.doclets.internal.toolkit.taglets;
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
-<head>
-<title>com.sun.tools.doclets.internal.toolkit.taglets package</title>
-</head>
-<body bgcolor="white">
-        This package has classes used to generate Javadoc tag documentation. 
-        Doclets no longer have to implement its own version of standard tags 
-        such as &#64;param and &#64;throws.  This is the single, doclet 
-        implementation of each standard tag that is shared by all
-        doclets.  Each doclet must have a taglet writer that takes a taglet 
-        as input and writes doclet-dependent output. The taglet itself will 
-        do the tag processing. For example, suppose we are outputing
-        &#64;throws tags. The taglet would:
-        <ul>
-            <li> Retrieve the list of throws tags to be documented.
-            <li> Replace {&#64;inheritDoc} with the appropriate documentation.
-            <li> Add throws documentation for exceptions that are declared in 
-            	 the signature of the method but
-                 not documented with the throws tags.
-        </ul>
-        After doing the steps above, the taglet would pass the information to 
-        the taglet writer for writing. The taglets are essentially builders for 
-        tags.
-        <p>
-        This code is not part of an API.
-        It is implementation that is subject to change.
-        Do not use it as an API.
-    </body>
-</html>
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java	Mon Oct 28 18:30:14 2013 -0400
@@ -58,9 +58,4 @@
      * The default package file name.
      */
     public static final String DEFAULT_PACKAGE_FILE_NAME = "default";
-
-    /**
-     * The anchor for the default package.
-     */
-    public static final String UNNAMED_PACKAGE_ANCHOR = "unnamed_package";
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2003, 2013, 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.
+ */
+
+/**
+    Provides a factory for constructing links.
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.doclets.internal.toolkit.util.links;
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
-<head>
-<title>com.sun.tools.doclets.interal.toolkit.util.links package</title>
-</head>
-<body bgcolor="white">
-        Provides a factory for constructing links.
-    </body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2003, 2013, 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.
+ */
+
+/**
+    This package has utility classes that perform common services required
+    for API documentation generation.
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.doclets.internal.toolkit.util;
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
-<head>
-<title>com.sun.tools.doclets.internal.toolkit.util package</title>
-</head>
-<body bgcolor="white">
-        This package has utility classes that perform common services required 
-        for API documentation generation.
-        <p>
-        This code is not part of an API.
-        It is implementation that is subject to change.
-        Do not use it as an API.
-    </body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/doclets/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2003, 2013, 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.
+ */
+
+/**
+    As of JDK version 1.5, replaced by
+    {@code com.sun.tools.doclets.internal.toolkit.util}.
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.doclets;
--- a/src/share/classes/com/sun/tools/doclets/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
-<head>
-<title>com.sun.tools/doclets package</title>
-</head>
-<body bgcolor="white">
-        As of JDK version 1.5, replaced by 
-        {@code com.sun.tools.doclets.internal.toolkit.util}.
-    </body>
-</html>
--- a/src/share/classes/com/sun/tools/doclint/Checker.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclint/Checker.java	Mon Oct 28 18:30:14 2013 -0400
@@ -71,6 +71,8 @@
 import com.sun.source.doctree.StartElementTree;
 import com.sun.source.doctree.TextTree;
 import com.sun.source.doctree.ThrowsTree;
+import com.sun.source.doctree.UnknownBlockTagTree;
+import com.sun.source.doctree.UnknownInlineTagTree;
 import com.sun.source.doctree.ValueTree;
 import com.sun.source.doctree.VersionTree;
 import com.sun.source.util.DocTreePath;
@@ -213,6 +215,7 @@
     public Void visitDocComment(DocCommentTree tree, Void ignore) {
         super.visitDocComment(tree, ignore);
         for (TagStackItem tsi: tagStack) {
+            warnIfEmpty(tsi, null);
             if (tsi.tree.getKind() == DocTree.Kind.START_ELEMENT
                     && tsi.tag.endKind == HtmlTag.EndKind.REQUIRED) {
                 StartElementTree t = (StartElementTree) tsi.tree;
@@ -270,7 +273,6 @@
 
     @Override
     public Void visitStartElement(StartElementTree tree, Void ignore) {
-        markEnclosingTag(Flag.HAS_ELEMENT);
         final Name treeName = tree.getName();
         final HtmlTag t = HtmlTag.get(treeName);
         if (t == null) {
@@ -279,7 +281,10 @@
             boolean done = false;
             for (TagStackItem tsi: tagStack) {
                 if (tsi.tag.accepts(t)) {
-                    while (tagStack.peek() != tsi) tagStack.pop();
+                    while (tagStack.peek() != tsi) {
+                        warnIfEmpty(tagStack.peek(), null);
+                        tagStack.pop();
+                    }
                     done = true;
                     break;
                 } else if (tsi.tag.endKind != HtmlTag.EndKind.OPTIONAL) {
@@ -288,9 +293,13 @@
                 }
             }
             if (!done && HtmlTag.BODY.accepts(t)) {
-                tagStack.clear();
+                while (!tagStack.isEmpty()) {
+                    warnIfEmpty(tagStack.peek(), null);
+                    tagStack.pop();
+                }
             }
 
+            markEnclosingTag(Flag.HAS_ELEMENT);
             checkStructure(tree, t);
 
             // tag specific checks
@@ -447,12 +456,7 @@
                                         "dc.no.summary.or.caption.for.table");
                             }
                     }
-                    if (t.flags.contains(HtmlTag.Flag.EXPECT_CONTENT)
-                            && !top.flags.contains(Flag.HAS_TEXT)
-                            && !top.flags.contains(Flag.HAS_ELEMENT)
-                            && !top.flags.contains(Flag.HAS_INLINE_TAG)) {
-                        env.messages.warning(HTML, tree, "dc.tag.empty", treeName);
-                    }
+                    warnIfEmpty(top, tree);
                     tagStack.pop();
                     done = true;
                     break;
@@ -485,6 +489,20 @@
 
         return super.visitEndElement(tree, ignore);
     }
+
+    void warnIfEmpty(TagStackItem tsi, DocTree endTree) {
+        if (tsi.tag != null && tsi.tree instanceof StartElementTree) {
+            if (tsi.tag.flags.contains(HtmlTag.Flag.EXPECT_CONTENT)
+                    && !tsi.flags.contains(Flag.HAS_TEXT)
+                    && !tsi.flags.contains(Flag.HAS_ELEMENT)
+                    && !tsi.flags.contains(Flag.HAS_INLINE_TAG)) {
+                DocTree tree = (endTree != null) ? endTree : tsi.tree;
+                Name treeName = ((StartElementTree) tsi.tree).getName();
+                env.messages.warning(HTML, tree, "dc.tag.empty", treeName);
+            }
+        }
+    }
+
     // </editor-fold>
 
     // <editor-fold defaultstate="collapsed" desc="HTML attributes">
@@ -826,6 +844,23 @@
     }
 
     @Override
+    public Void visitUnknownBlockTag(UnknownBlockTagTree tree, Void ignore) {
+        checkUnknownTag(tree, tree.getTagName());
+        return super.visitUnknownBlockTag(tree, ignore);
+    }
+
+    @Override
+    public Void visitUnknownInlineTag(UnknownInlineTagTree tree, Void ignore) {
+        checkUnknownTag(tree, tree.getTagName());
+        return super.visitUnknownInlineTag(tree, ignore);
+    }
+
+    private void checkUnknownTag(DocTree tree, String tagName) {
+        if (env.customTags != null && !env.customTags.contains(tagName))
+            env.messages.error(SYNTAX, tree, "dc.tag.unknown", tagName);
+    }
+
+    @Override
     public Void visitValue(ValueTree tree, Void ignore) {
         ReferenceTree ref = tree.getReference();
         if (ref == null || ref.getSignature().isEmpty()) {
--- a/src/share/classes/com/sun/tools/doclint/DocLint.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclint/DocLint.java	Mon Oct 28 18:30:14 2013 -0400
@@ -78,6 +78,8 @@
     public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:";
     private static final String STATS = "-stats";
     public static final String XIMPLICIT_HEADERS = "-XimplicitHeaders:";
+    public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:";
+    public static final String TAGS_SEPARATOR = ",";
 
     // <editor-fold defaultstate="collapsed" desc="Command-line entry point">
     public static void main(String... args) {
@@ -199,6 +201,8 @@
                 env.messages.setOptions(null);
             } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) {
                 env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
+            } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
+                env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
             } else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help")
                     || arg.equals("-?") || arg.equals("-usage")) {
                 needHelp = true;
@@ -262,6 +266,8 @@
             } else if (arg.matches(XIMPLICIT_HEADERS + "[1-6]")) {
                 char ch = arg.charAt(arg.length() - 1);
                 env.setImplicitHeaders(Character.digit(ch, 10));
+            } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
+                env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
             } else
                 throw new IllegalArgumentException(arg);
         }
--- a/src/share/classes/com/sun/tools/doclint/Env.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclint/Env.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,6 +27,7 @@
 
 
 import java.util.Set;
+import java.util.LinkedHashSet;
 
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
@@ -86,6 +87,8 @@
 
     int implicitHeaderLevel = 0;
 
+    Set<String> customTags;
+
     // Utility classes
     DocTrees trees;
     Elements elements;
@@ -135,6 +138,14 @@
         implicitHeaderLevel = n;
     }
 
+    void setCustomTags(String cTags) {
+        customTags = new LinkedHashSet<String>();
+        for (String s : cTags.split(DocLint.TAGS_SEPARATOR)) {
+            if (!s.isEmpty())
+                customTags.add(s);
+        }
+    }
+
     /** Set the current declaration and its doc comment. */
     void setCurrent(TreePath path, DocCommentTree comment) {
         currPath = path;
--- a/src/share/classes/com/sun/tools/javac/Main.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/Main.java	Mon Oct 28 18:30:14 2013 -0400
@@ -31,7 +31,7 @@
  * The programmatic interface for the Java Programming Language
  * compiler, javac.
  */
-@jdk.Supported
+@jdk.Exported
 public class Main {
 
     /** Main entry point for the launcher.
--- a/src/share/classes/com/sun/tools/javac/api/JavacTool.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/api/JavacTool.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
@@ -120,7 +120,6 @@
         try {
             ClientCodeWrapper ccw = ClientCodeWrapper.instance(context);
 
-            final String kindMsg = "All compilation units must be of SOURCE kind";
             if (options != null)
                 for (String option : options)
                     option.getClass(); // null check
@@ -132,8 +131,11 @@
             if (compilationUnits != null) {
                 compilationUnits = ccw.wrapJavaFileObjects(compilationUnits); // implicit null check
                 for (JavaFileObject cu : compilationUnits) {
-                    if (cu.getKind() != JavaFileObject.Kind.SOURCE)
+                    if (cu.getKind() != JavaFileObject.Kind.SOURCE) {
+                        String kindMsg = "Compilation unit is not of SOURCE kind: "
+                                + "\"" + cu.getName() + "\"";
                         throw new IllegalArgumentException(kindMsg);
+                    }
                 }
             }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/javac/code/AnnoConstruct.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,249 @@
+/*
+ * Copyright (c) 2005, 2013, 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.javac.code;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Inherited;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import javax.lang.model.AnnotatedConstruct;
+
+import com.sun.tools.javac.model.AnnotationProxyMaker;
+import com.sun.tools.javac.util.List;
+import com.sun.tools.javac.util.ListBuffer;
+
+/**
+ * Common super type for annotated constructs such as Types and Symbols.
+ *
+ * This class should *not* contain any fields since it would have a significant
+ * impact on the javac memory footprint.
+ *
+ * <p><b>This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own
+ * risk.  This code and its internal interfaces are subject to change
+ * or deletion without notice.</b></p>
+ */
+public abstract class AnnoConstruct implements AnnotatedConstruct {
+
+
+    // Override to enforce a narrower return type.
+    @Override
+    public abstract List<? extends Attribute.Compound> getAnnotationMirrors();
+
+
+    // This method is part of the javax.lang.model API, do not use this in javac code.
+    protected <A extends Annotation> Attribute.Compound getAttribute(Class<A> annoType) {
+        String name = annoType.getName();
+
+        for (Attribute.Compound anno : getAnnotationMirrors()) {
+            if (name.equals(anno.type.tsym.flatName().toString()))
+                return anno;
+        }
+
+        return null;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    protected <A extends Annotation> A[] getInheritedAnnotations(Class<A> annoType) {
+        return (A[]) java.lang.reflect.Array.newInstance(annoType, 0);  // annoType is the Class for A
+    }
+
+
+    // This method is part of the javax.lang.model API, do not use this in javac code.
+    public <A extends Annotation> A[] getAnnotationsByType(Class<A> annoType) {
+
+        if (!annoType.isAnnotation())
+            throw new IllegalArgumentException("Not an annotation type: "
+                                               + annoType);
+        // If annoType does not declare a container this is equivalent to wrapping
+        // getAnnotation(...) in an array.
+        Class <? extends Annotation> containerType = getContainer(annoType);
+        if (containerType == null) {
+            A res = getAnnotation(annoType);
+            int size = res == null ? 0 : 1;
+
+            @SuppressWarnings("unchecked") // annoType is the Class for A
+            A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
+            if (res != null)
+                arr[0] = res;
+            return arr;
+        }
+
+        // So we have a containing type
+        String annoTypeName = annoType.getName();
+        String containerTypeName = containerType.getName();
+        int directIndex = -1, containerIndex = -1;
+        Attribute.Compound direct = null, container = null;
+        // Find directly (explicit or implicit) present annotations
+        int index = -1;
+        for (Attribute.Compound attribute : getAnnotationMirrors()) {
+            index++;
+            if (attribute.type.tsym.flatName().contentEquals(annoTypeName)) {
+                directIndex = index;
+                direct = attribute;
+            } else if(containerTypeName != null &&
+                      attribute.type.tsym.flatName().contentEquals(containerTypeName)) {
+                containerIndex = index;
+                container = attribute;
+            }
+        }
+
+        // Deal with inherited annotations
+        if (direct == null && container == null &&
+                annoType.isAnnotationPresent(Inherited.class))
+            return getInheritedAnnotations(annoType);
+
+        Attribute.Compound[] contained = unpackContained(container);
+
+        // In case of an empty legacy container we might need to look for
+        // inherited annos as well
+        if (direct == null && contained.length == 0 &&
+                annoType.isAnnotationPresent(Inherited.class))
+            return getInheritedAnnotations(annoType);
+
+        int size = (direct == null ? 0 : 1) + contained.length;
+        @SuppressWarnings("unchecked") // annoType is the Class for A
+        A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
+
+        // if direct && container, which is first?
+        int insert = -1;
+        int length = arr.length;
+        if (directIndex >= 0 && containerIndex >= 0) {
+            if (directIndex < containerIndex) {
+                arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
+                insert = 1;
+            } else {
+                arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
+                insert = 0;
+                length--;
+            }
+        } else if (directIndex >= 0) {
+            arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
+            return arr;
+        } else {
+            // Only container
+            insert = 0;
+        }
+
+        for (int i = 0; i + insert < length; i++)
+            arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType);
+
+        return arr;
+    }
+
+    private Attribute.Compound[] unpackContained(Attribute.Compound container) {
+        // Pack them in an array
+        Attribute[] contained0 = null;
+        if (container != null)
+            contained0 = unpackAttributes(container);
+        ListBuffer<Attribute.Compound> compounds = new ListBuffer<>();
+        if (contained0 != null) {
+            for (Attribute a : contained0)
+                if (a instanceof Attribute.Compound)
+                    compounds = compounds.append((Attribute.Compound)a);
+        }
+        return compounds.toArray(new Attribute.Compound[compounds.size()]);
+    }
+
+    // This method is part of the javax.lang.model API, do not use this in javac code.
+    public <A extends Annotation> A getAnnotation(Class<A> annoType) {
+
+        if (!annoType.isAnnotation())
+            throw new IllegalArgumentException("Not an annotation type: " + annoType);
+
+        Attribute.Compound c = getAttribute(annoType);
+        return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType);
+    }
+
+    // Needed to unpack the runtime view of containing annotations
+    private static final Class<? extends Annotation> REPEATABLE_CLASS = initRepeatable();
+    private static final Method VALUE_ELEMENT_METHOD = initValueElementMethod();
+
+    private static Class<? extends Annotation> initRepeatable() {
+        try {
+            // Repeatable will not be available when bootstrapping on
+            // JDK 7 so use a reflective lookup instead of a class
+            // literal for Repeatable.class.
+            return Class.forName("java.lang.annotation.Repeatable").asSubclass(Annotation.class);
+        } catch (ClassNotFoundException | SecurityException e) {
+            return null;
+        }
+    }
+
+    private static Method initValueElementMethod() {
+        if (REPEATABLE_CLASS == null)
+            return null;
+
+        Method m = null;
+        try {
+            m = REPEATABLE_CLASS.getMethod("value");
+            if (m != null)
+                m.setAccessible(true);
+            return m;
+        } catch (NoSuchMethodException e) {
+            return null;
+        }
+    }
+
+
+    // Helper to getAnnotationsByType
+    private static Class<? extends Annotation> getContainer(Class<? extends Annotation> annoType) {
+        // Since we can not refer to java.lang.annotation.Repeatable until we are
+        // bootstrapping with java 8 we need to get the Repeatable annotation using
+        // reflective invocations instead of just using its type and element method.
+        if (REPEATABLE_CLASS != null &&
+            VALUE_ELEMENT_METHOD != null) {
+            // Get the Repeatable instance on the annotations declaration
+            Annotation repeatable = (Annotation)annoType.getAnnotation(REPEATABLE_CLASS);
+            if (repeatable != null) {
+                try {
+                    // Get the value element, it should be a class
+                    // indicating the containing annotation type
+                    @SuppressWarnings("unchecked")
+                    Class<? extends Annotation> containerType = (Class)VALUE_ELEMENT_METHOD.invoke(repeatable);
+                    if (containerType == null)
+                        return null;
+
+                    return containerType;
+                } catch (ClassCastException | IllegalAccessException | InvocationTargetException e) {
+                    return null;
+                }
+            }
+        }
+        return null;
+    }
+
+
+    // Helper to getAnnotationsByType
+    private static Attribute[] unpackAttributes(Attribute.Compound container) {
+        // We now have an instance of the container,
+        // unpack it returning an instance of the
+        // contained type or null
+        return ((Attribute.Array)container.member(container.type.tsym.name.table.names.value)).values;
+    }
+
+}
--- a/src/share/classes/com/sun/tools/javac/code/Attribute.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Attribute.java	Mon Oct 28 18:30:14 2013 -0400
@@ -64,6 +64,8 @@
         return false;
     }
 
+    public TypeAnnotationPosition getPosition() { return null; };
+
     /** The value for an annotation element of primitive type or String. */
     public static class Constant extends Attribute {
         public final Object value;
@@ -191,8 +193,13 @@
         }
 
         public Attribute member(Name member) {
+            Pair<MethodSymbol,Attribute> res = getElemPair(member);
+            return res == null ? null : res.snd;
+        }
+
+        private Pair<MethodSymbol, Attribute> getElemPair(Name member) {
             for (Pair<MethodSymbol,Attribute> pair : values)
-                if (pair.fst.name == member) return pair.snd;
+                if (pair.fst.name == member) return pair;
             return null;
         }
 
@@ -208,6 +215,16 @@
             return (DeclaredType) type;
         }
 
+        @Override
+        public TypeAnnotationPosition getPosition() {
+            if (values.size() != 0) {
+                Name valueName = values.head.fst.name.table.names.value;
+                Pair<MethodSymbol, Attribute> res = getElemPair(valueName);
+                    return res == null ? null : res.snd.getPosition();
+            }
+            return null;
+        }
+
         public Map<MethodSymbol, Attribute> getElementValues() {
             Map<MethodSymbol, Attribute> valmap =
                 new LinkedHashMap<MethodSymbol, Attribute>();
@@ -219,6 +236,7 @@
 
     public static class TypeCompound extends Compound {
         public TypeAnnotationPosition position;
+
         public TypeCompound(Compound compound,
                 TypeAnnotationPosition position) {
             this(compound.type, compound.values, position);
@@ -230,8 +248,16 @@
             this.position = position;
         }
 
+        @Override
+        public TypeAnnotationPosition getPosition() {
+            if (hasUnknownPosition()) {
+                position = super.getPosition();
+            }
+            return position;
+        }
+
         public boolean hasUnknownPosition() {
-            return position == null || position.type == TargetType.UNKNOWN;
+            return position.type == TargetType.UNKNOWN;
         }
 
         public boolean isContainerTypeCompound() {
@@ -302,6 +328,14 @@
         public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
             return v.visitArray(getValue(), p);
         }
+
+        @Override
+        public TypeAnnotationPosition getPosition() {
+            if (values.length != 0)
+                return values[0].getPosition();
+            else
+                return null;
+        }
     }
 
     /** The value for an annotation element of an enum type.
--- a/src/share/classes/com/sun/tools/javac/code/Flags.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Flags.java	Mon Oct 28 18:30:14 2013 -0400
@@ -270,6 +270,11 @@
      */
     public static final long POTENTIALLY_AMBIGUOUS = 1L<<48;
 
+    /**
+     * Flag that marks a synthetic method body for a lambda expression
+     */
+    public static final long LAMBDA_METHOD = 1L<<49;
+
     /** Modifier masks.
      */
     public static final int
@@ -378,7 +383,8 @@
         NOT_IN_PROFILE(Flags.NOT_IN_PROFILE),
         BAD_OVERRIDE(Flags.BAD_OVERRIDE),
         SIGNATURE_POLYMORPHIC(Flags.SIGNATURE_POLYMORPHIC),
-        THROWS(Flags.THROWS);
+        THROWS(Flags.THROWS),
+        LAMBDA_METHOD(Flags.LAMBDA_METHOD);
 
         Flag(long flag) {
             this.value = flag;
--- a/src/share/classes/com/sun/tools/javac/code/Printer.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Printer.java	Mon Oct 28 18:30:14 2013 -0400
@@ -260,24 +260,23 @@
 
     @Override
     public String visitAnnotatedType(AnnotatedType t, Locale locale) {
-        if (t.typeAnnotations != null &&
-                t.typeAnnotations.nonEmpty()) {
-            if (t.underlyingType.hasTag(TypeTag.ARRAY)) {
+        if (t.getAnnotationMirrors().nonEmpty()) {
+            if (t.unannotatedType().hasTag(TypeTag.ARRAY)) {
                 StringBuilder res = new StringBuilder();
                 printBaseElementType(t, res, locale);
                 printBrackets(t, res, locale);
                 return res.toString();
-            } else if (t.underlyingType.hasTag(TypeTag.CLASS) &&
-                    t.underlyingType.getEnclosingType() != Type.noType) {
-                return visit(t.underlyingType.getEnclosingType(), locale) +
+            } else if (t.unannotatedType().hasTag(TypeTag.CLASS) &&
+                    t.unannotatedType().getEnclosingType() != Type.noType) {
+                return visit(t.unannotatedType().getEnclosingType(), locale) +
                         ". " +
-                        t.typeAnnotations +
-                        " " + className((ClassType)t.underlyingType, false, locale);
+                        t.getAnnotationMirrors() +
+                        " " + className((ClassType)t.unannotatedType(), false, locale);
             } else {
-                return t.typeAnnotations + " " + visit(t.underlyingType, locale);
+                return t.getAnnotationMirrors() + " " + visit(t.unannotatedType(), locale);
             }
         } else {
-            return visit(t.underlyingType, locale);
+            return visit(t.unannotatedType(), locale);
         }
     }
 
--- a/src/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Symbol.java	Mon Oct 28 18:30:14 2013 -0400
@@ -25,6 +25,8 @@
 
 package com.sun.tools.javac.code;
 
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Inherited;
 import java.util.Set;
 import java.util.concurrent.Callable;
 
@@ -37,8 +39,6 @@
 import com.sun.tools.javac.comp.AttrContext;
 import com.sun.tools.javac.comp.Env;
 import com.sun.tools.javac.jvm.*;
-import com.sun.tools.javac.model.*;
-import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.Name;
 import static com.sun.tools.javac.code.Flags.*;
@@ -58,8 +58,7 @@
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
-public abstract class Symbol implements Element {
-    // public Throwable debug = new Throwable();
+public abstract class Symbol extends AnnoConstruct implements Element {
 
     /** The kind of this symbol.
      *  @see Kinds
@@ -101,16 +100,17 @@
     /** The attributes of this symbol are contained in this
      * SymbolMetadata. The SymbolMetadata instance is NOT immutable.
      */
-    protected SymbolMetadata annotations;
+    protected SymbolMetadata metadata;
+
 
     /** An accessor method for the attributes of this symbol.
      *  Attributes of class symbols should be accessed through the accessor
      *  method to make sure that the class symbol is loaded.
      */
     public List<Attribute.Compound> getRawAttributes() {
-        return (annotations == null)
+        return (metadata == null)
                 ? List.<Attribute.Compound>nil()
-                : annotations.getDeclarationAttributes();
+                : metadata.getDeclarationAttributes();
     }
 
     /** An accessor method for the type attributes of this symbol.
@@ -118,9 +118,9 @@
      *  method to make sure that the class symbol is loaded.
      */
     public List<Attribute.TypeCompound> getRawTypeAttributes() {
-        return (annotations == null)
+        return (metadata == null)
                 ? List.<Attribute.TypeCompound>nil()
-                : annotations.getTypeAttributes();
+                : metadata.getTypeAttributes();
     }
 
     /** Fetch a particular annotation from a symbol. */
@@ -132,106 +132,106 @@
     }
 
     public boolean annotationsPendingCompletion() {
-        return annotations == null ? false : annotations.pendingCompletion();
+        return metadata == null ? false : metadata.pendingCompletion();
     }
 
     public void appendAttributes(List<Attribute.Compound> l) {
         if (l.nonEmpty()) {
-            initedAnnos().append(l);
+            initedMetadata().append(l);
         }
     }
 
     public void appendClassInitTypeAttributes(List<Attribute.TypeCompound> l) {
         if (l.nonEmpty()) {
-            initedAnnos().appendClassInitTypeAttributes(l);
+            initedMetadata().appendClassInitTypeAttributes(l);
         }
     }
 
     public void appendInitTypeAttributes(List<Attribute.TypeCompound> l) {
         if (l.nonEmpty()) {
-            initedAnnos().appendInitTypeAttributes(l);
+            initedMetadata().appendInitTypeAttributes(l);
         }
     }
 
     public void appendTypeAttributesWithCompletion(final Annotate.AnnotateRepeatedContext<Attribute.TypeCompound> ctx) {
-        initedAnnos().appendTypeAttributesWithCompletion(ctx);
+        initedMetadata().appendTypeAttributesWithCompletion(ctx);
     }
 
     public void appendUniqueTypeAttributes(List<Attribute.TypeCompound> l) {
         if (l.nonEmpty()) {
-            initedAnnos().appendUniqueTypes(l);
+            initedMetadata().appendUniqueTypes(l);
         }
     }
 
     public List<Attribute.TypeCompound> getClassInitTypeAttributes() {
-        return (annotations == null)
+        return (metadata == null)
                 ? List.<Attribute.TypeCompound>nil()
-                : annotations.getClassInitTypeAttributes();
+                : metadata.getClassInitTypeAttributes();
     }
 
     public List<Attribute.TypeCompound> getInitTypeAttributes() {
-        return (annotations == null)
+        return (metadata == null)
                 ? List.<Attribute.TypeCompound>nil()
-                : annotations.getInitTypeAttributes();
+                : metadata.getInitTypeAttributes();
     }
 
     public List<Attribute.Compound> getDeclarationAttributes() {
-        return (annotations == null)
+        return (metadata == null)
                 ? List.<Attribute.Compound>nil()
-                : annotations.getDeclarationAttributes();
+                : metadata.getDeclarationAttributes();
     }
 
     public boolean hasAnnotations() {
-        return (annotations != null && !annotations.isEmpty());
+        return (metadata != null && !metadata.isEmpty());
     }
 
     public boolean hasTypeAnnotations() {
-        return (annotations != null && !annotations.isTypesEmpty());
+        return (metadata != null && !metadata.isTypesEmpty());
     }
 
     public void prependAttributes(List<Attribute.Compound> l) {
         if (l.nonEmpty()) {
-            initedAnnos().prepend(l);
+            initedMetadata().prepend(l);
         }
     }
 
     public void resetAnnotations() {
-        initedAnnos().reset();
+        initedMetadata().reset();
     }
 
     public void setAttributes(Symbol other) {
-        if (annotations != null || other.annotations != null) {
-            initedAnnos().setAttributes(other.annotations);
+        if (metadata != null || other.metadata != null) {
+            initedMetadata().setAttributes(other.metadata);
         }
     }
 
     public void setDeclarationAttributes(List<Attribute.Compound> a) {
-        if (annotations != null || a.nonEmpty()) {
-            initedAnnos().setDeclarationAttributes(a);
+        if (metadata != null || a.nonEmpty()) {
+            initedMetadata().setDeclarationAttributes(a);
         }
     }
 
     public void setDeclarationAttributesWithCompletion(final Annotate.AnnotateRepeatedContext<Attribute.Compound> ctx) {
-        initedAnnos().setDeclarationAttributesWithCompletion(ctx);
+        initedMetadata().setDeclarationAttributesWithCompletion(ctx);
     }
 
     public void setTypeAttributes(List<Attribute.TypeCompound> a) {
-        if (annotations != null || a.nonEmpty()) {
-            if (annotations == null)
-                annotations = new SymbolMetadata(this);
-            annotations.setTypeAttributes(a);
+        if (metadata != null || a.nonEmpty()) {
+            if (metadata == null)
+                metadata = new SymbolMetadata(this);
+            metadata.setTypeAttributes(a);
         }
     }
 
-    private SymbolMetadata initedAnnos() {
-        if (annotations == null)
-            annotations = new SymbolMetadata(this);
-        return annotations;
+    private SymbolMetadata initedMetadata() {
+        if (metadata == null)
+            metadata = new SymbolMetadata(this);
+        return metadata;
     }
 
     /** This method is intended for debugging only. */
-    public SymbolMetadata getAnnotations() {
-        return annotations;
+    public SymbolMetadata getMetadata() {
+        return metadata;
     }
 
     // </editor-fold>
@@ -327,7 +327,8 @@
     public boolean isStatic() {
         return
             (flags() & STATIC) != 0 ||
-            (owner.flags() & INTERFACE) != 0 && kind != MTH;
+            (owner.flags() & INTERFACE) != 0 && kind != MTH &&
+             name != name.table.names._this;
     }
 
     public boolean isInterface() {
@@ -595,18 +596,6 @@
         return getRawAttributes();
     }
 
-    /**
-     * @deprecated this method should never be used by javac internally.
-     */
-    @Deprecated
-    public <A extends java.lang.annotation.Annotation> A getAnnotation(Class<A> annoType) {
-        return JavacAnnoConstructs.getAnnotation(this, annoType);
-    }
-
-    // This method is part of the javax.lang.model API, do not use this in javac code.
-    public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(Class<A> annoType) {
-        return JavacAnnoConstructs.getAnnotationsByType(this, annoType);
-    }
 
     // TODO: getEnclosedElements should return a javac List, fix in FilteredMemberList
     public java.util.List<Symbol> getEnclosedElements() {
@@ -792,6 +781,28 @@
             return res = res.reverse();
         }
 
+
+
+        // Helper to getAnnotation[s]
+        @Override
+        public <A extends Annotation> Attribute.Compound getAttribute(Class<A> annoType) {
+
+            String name = annoType.getName();
+
+            // Declaration annotations on type variables are stored in type attributes
+            // on the owner of the TypeVariableSymbol
+            List<Attribute.TypeCompound> candidates = owner.getRawTypeAttributes();
+            for (Attribute.TypeCompound anno : candidates)
+                if (anno.position.type == TargetType.CLASS_TYPE_PARAMETER ||
+                        anno.position.type == TargetType.METHOD_TYPE_PARAMETER)
+                    if (name.contentEquals(anno.type.tsym.flatName()))
+                        return anno;
+
+            return null;
+        }
+
+
+
         @Override
         public <R, P> R accept(ElementVisitor<R, P> v, P p) {
             return v.visitTypeParameter(this, p);
@@ -851,10 +862,10 @@
         }
 
         private void mergeAttributes() {
-            if (annotations == null &&
-                package_info.annotations != null) {
-                annotations = new SymbolMetadata(this);
-                annotations.setAttributes(package_info.annotations);
+            if (metadata == null &&
+                package_info.metadata != null) {
+                metadata = new SymbolMetadata(this);
+                metadata.setAttributes(package_info.metadata);
             }
         }
 
@@ -1048,6 +1059,31 @@
             }
         }
 
+        /**
+         * Returns the next class to search for inherited annotations or {@code null}
+         * if the next class can't be found.
+         */
+        private ClassSymbol getSuperClassToSearchForAnnotations() {
+
+            Type sup = getSuperclass();
+
+            if (!sup.hasTag(CLASS) || sup.isErroneous())
+                return null;
+
+            return (ClassSymbol) sup.tsym;
+        }
+
+
+        @Override
+        protected <A extends Annotation> A[] getInheritedAnnotations(Class<A> annoType) {
+
+            ClassSymbol sup = getSuperClassToSearchForAnnotations();
+
+            return sup == null ? super.getInheritedAnnotations(annoType)
+                               : sup.getAnnotationsByType(annoType);
+        }
+
+
         public ElementKind getKind() {
             long flags = flags();
             if ((flags & ANNOTATION) != 0)
@@ -1060,6 +1096,12 @@
                 return ElementKind.CLASS;
         }
 
+        @Override
+        public Set<Modifier> getModifiers() {
+            long flags = flags();
+            return Flags.asModifierSet(flags & ~DEFAULT);
+        }
+
         public NestingKind getNestingKind() {
             complete();
             if (owner.kind == PCK)
@@ -1072,15 +1114,25 @@
                 return NestingKind.MEMBER;
         }
 
-        /**
-         * Since this method works in terms of the runtime representation
-         * of annotations, it should never be used by javac internally.
-         */
+
         @Override
-        public <A extends java.lang.annotation.Annotation> A getAnnotation(Class<A> annoType) {
-            return JavacAnnoConstructs.getAnnotation(this, annoType);
+        protected <A extends Annotation> Attribute.Compound getAttribute(final Class<A> annoType) {
+
+            Attribute.Compound attrib = super.getAttribute(annoType);
+
+            boolean inherited = annoType.isAnnotationPresent(Inherited.class);
+            if (attrib != null || !inherited)
+                return attrib;
+
+            // Search supertypes
+            ClassSymbol superType = getSuperClassToSearchForAnnotations();
+            return superType == null ? null
+                                     : superType.getAttribute(annoType);
         }
 
+
+
+
         public <R, P> R accept(ElementVisitor<R, P> v, P p) {
             return v.visitType(this, p);
         }
--- a/src/share/classes/com/sun/tools/javac/code/SymbolMetadata.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/SymbolMetadata.java	Mon Oct 28 18:30:14 2013 -0400
@@ -205,14 +205,14 @@
 
             // Queue a pass that will replace Attribute.Placeholders
             // with Attribute.Compound (made from synthesized containers).
-            ctx.annotateRepeated(new Annotate.Annotator() {
+            ctx.annotateRepeated(new Annotate.Worker() {
                 @Override
                 public String toString() {
                     return "repeated annotation pass of: " + sym + " in: " + sym.owner;
                 }
 
                 @Override
-                public void enterAnnotation() {
+                public void run() {
                     complete(ctx);
                 }
             });
@@ -429,7 +429,7 @@
             super(on.type, List.<Pair<Symbol.MethodSymbol, Attribute>>nil(),
                     ctx.isTypeCompound ?
                             ((Attribute.TypeCompound)placeholderFor.head).position :
-                                null);
+                                new TypeAnnotationPosition());
             this.ctx = ctx;
             this.placeholderFor = placeholderFor;
             this.on = on;
--- a/src/share/classes/com/sun/tools/javac/code/Type.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Type.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,6 @@
 import javax.lang.model.type.*;
 
 import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.model.JavacAnnoConstructs;
 import com.sun.tools.javac.util.*;
 import static com.sun.tools.javac.code.BoundKind.*;
 import static com.sun.tools.javac.code.Flags.*;
@@ -70,7 +69,7 @@
  *
  *  @see TypeTag
  */
-public abstract class Type implements TypeMirror {
+public abstract class Type extends AnnoConstruct implements TypeMirror {
 
     /** Constant type: no type at all. */
     public static final JCNoType noType = new JCNoType();
@@ -166,6 +165,12 @@
         return lb.toList();
     }
 
+    /**For ErrorType, returns the original type, otherwise returns the type itself.
+     */
+    public Type getOriginalType() {
+        return this;
+    }
+
     public <R,S> R accept(Type.Visitor<R,S> v, S s) { return v.visitType(this, s); }
 
     /** Define a type given its tag and type symbol
@@ -220,6 +225,10 @@
         return this;
     }
 
+    public Type annotatedType(List<Attribute.TypeCompound> annos) {
+        return new AnnotatedType(annos, this);
+    }
+
     public boolean isAnnotated() {
         return false;
     }
@@ -233,15 +242,17 @@
     }
 
     @Override
-    public List<? extends Attribute.TypeCompound> getAnnotationMirrors() {
+    public List<Attribute.TypeCompound> getAnnotationMirrors() {
         return List.nil();
     }
 
+
     @Override
     public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
         return null;
     }
 
+
     @Override
     public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
         @SuppressWarnings("unchecked")
@@ -1651,6 +1662,9 @@
         public <R, P> R accept(TypeVisitor<R, P> v, P p) {
             return v.visitNoType(this, p);
         }
+
+        @Override
+        public boolean isCompound() { return false; }
     }
 
     /** Represents VOID.
@@ -1672,6 +1686,9 @@
         }
 
         @Override
+        public boolean isCompound() { return false; }
+
+        @Override
         public <R, P> R accept(TypeVisitor<R, P> v, P p) {
             return v.visitNoType(this, p);
         }
@@ -1698,6 +1715,9 @@
         }
 
         @Override
+        public boolean isCompound() { return false; }
+
+        @Override
         public <R, P> R accept(TypeVisitor<R, P> v, P p) {
             return v.visitNull(this, p);
         }
@@ -1802,25 +1822,19 @@
                 javax.lang.model.type.WildcardType {
         /** The type annotations on this type.
          */
-        public List<Attribute.TypeCompound> typeAnnotations;
+        private List<Attribute.TypeCompound> typeAnnotations;
 
         /** The underlying type that is annotated.
          */
-        public Type underlyingType;
+        private Type underlyingType;
 
-        public AnnotatedType(Type underlyingType) {
-            super(underlyingType.tsym);
-            this.typeAnnotations = List.nil();
-            this.underlyingType = underlyingType;
-            Assert.check(!underlyingType.isAnnotated(),
-                    "Can't annotate already annotated type: " + underlyingType);
-        }
-
-        public AnnotatedType(List<Attribute.TypeCompound> typeAnnotations,
+        protected AnnotatedType(List<Attribute.TypeCompound> typeAnnotations,
                 Type underlyingType) {
             super(underlyingType.tsym);
             this.typeAnnotations = typeAnnotations;
             this.underlyingType = underlyingType;
+            Assert.check(typeAnnotations != null && typeAnnotations.nonEmpty(),
+                    "Can't create AnnotatedType without annotations: " + underlyingType);
             Assert.check(!underlyingType.isAnnotated(),
                     "Can't annotate already annotated type: " + underlyingType +
                     "; adding: " + typeAnnotations);
@@ -1837,19 +1851,10 @@
         }
 
         @Override
-        public List<? extends Attribute.TypeCompound> getAnnotationMirrors() {
+        public List<Attribute.TypeCompound> getAnnotationMirrors() {
             return typeAnnotations;
         }
 
-        @Override
-        public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
-            return JavacAnnoConstructs.getAnnotation(this, annotationType);
-        }
-
-        @Override
-        public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
-            return JavacAnnoConstructs.getAnnotationsByType(this, annotationType);
-        }
 
         @Override
         public TypeKind getKind() {
@@ -1970,10 +1975,8 @@
         public TypeMirror getComponentType()     { return ((ArrayType)underlyingType).getComponentType(); }
 
         // The result is an ArrayType, but only in the model sense, not the Type sense.
-        public AnnotatedType makeVarargs() {
-            AnnotatedType atype = new AnnotatedType(((ArrayType)underlyingType).makeVarargs());
-            atype.typeAnnotations = this.typeAnnotations;
-            return atype;
+        public Type makeVarargs() {
+            return ((ArrayType) underlyingType).makeVarargs().annotatedType(typeAnnotations);
         }
 
         @Override
--- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Mon Oct 28 18:30:14 2013 -0400
@@ -49,7 +49,8 @@
 import com.sun.tools.javac.code.Symbol.VarSymbol;
 import com.sun.tools.javac.code.Symbol.MethodSymbol;
 import com.sun.tools.javac.comp.Annotate;
-import com.sun.tools.javac.comp.Annotate.Annotator;
+import com.sun.tools.javac.comp.Annotate.Worker;
+import com.sun.tools.javac.comp.Attr;
 import com.sun.tools.javac.comp.AttrContext;
 import com.sun.tools.javac.comp.Env;
 import com.sun.tools.javac.tree.JCTree;
@@ -71,6 +72,7 @@
 import com.sun.tools.javac.util.ListBuffer;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Names;
+import com.sun.tools.javac.util.Options;
 
 /**
  * Contains operations specific to processing type annotations.
@@ -94,6 +96,7 @@
     final Names names;
     final Symtab syms;
     final Annotate annotate;
+    final Attr attr;
 
     protected TypeAnnotations(Context context) {
         context.put(typeAnnosKey, this);
@@ -101,6 +104,8 @@
         log = Log.instance(context);
         syms = Symtab.instance(context);
         annotate = Annotate.instance(context);
+        attr = Attr.instance(context);
+        Options options = Options.instance(context);
     }
 
     /**
@@ -109,13 +114,13 @@
      * This version only visits types in signatures and should be
      * called from MemberEnter.
      * The method takes the Annotate object as parameter and
-     * adds an Annotator to the correct Annotate queue for
+     * adds an Annotate.Worker to the correct Annotate queue for
      * later processing.
      */
     public void organizeTypeAnnotationsSignatures(final Env<AttrContext> env, final JCClassDecl tree) {
-        annotate.afterRepeated( new Annotator() {
+        annotate.afterRepeated( new Worker() {
             @Override
-            public void enterAnnotation() {
+            public void run() {
                 JavaFileObject oldSource = log.useSource(env.toplevel.sourcefile);
 
                 try {
@@ -127,6 +132,21 @@
         } );
     }
 
+    public void validateTypeAnnotationsSignatures(final Env<AttrContext> env, final JCClassDecl tree) {
+        annotate.validate(new Worker() { //validate annotations
+            @Override
+            public void run() {
+                JavaFileObject oldSource = log.useSource(env.toplevel.sourcefile);
+
+                try {
+                    attr.validateTypeAnnotations(tree, true);
+                } finally {
+                    log.useSource(oldSource);
+                }
+            }
+        } );
+    }
+
     /**
      * This version only visits types in bodies, that is, field initializers,
      * top-level blocks, and method bodies, and should be called from Attr.
@@ -265,13 +285,10 @@
          */
         private void separateAnnotationsKinds(JCTree typetree, Type type, Symbol sym,
                 TypeAnnotationPosition pos) {
-            /*
-            System.out.printf("separateAnnotationsKinds(typetree: %s, type: %s, symbol: %s, pos: %s%n",
-                    typetree, type, sym, pos);
-            */
             List<Attribute.Compound> annotations = sym.getRawAttributes();
             ListBuffer<Attribute.Compound> declAnnos = new ListBuffer<Attribute.Compound>();
             ListBuffer<Attribute.TypeCompound> typeAnnos = new ListBuffer<Attribute.TypeCompound>();
+            ListBuffer<Attribute.TypeCompound> onlyTypeAnnos = new ListBuffer<Attribute.TypeCompound>();
 
             for (Attribute.Compound a : annotations) {
                 switch (annotationType(a, sym)) {
@@ -287,6 +304,8 @@
                 case TYPE: {
                     Attribute.TypeCompound ta = toTypeCompound(a, pos);
                     typeAnnos.append(ta);
+                    // Also keep track which annotations are only type annotations
+                    onlyTypeAnnos.append(ta);
                     break;
                 }
                 }
@@ -304,13 +323,22 @@
             if (type == null) {
                 // When type is null, put the type annotations to the symbol.
                 // This is used for constructor return annotations, for which
-                // no appropriate type exists.
+                // we use the type of the enclosing class.
+                type = sym.getEnclosingElement().asType();
+
+                // Declaration annotations are always allowed on constructor returns.
+                // Therefore, use typeAnnotations instead of onlyTypeAnnos.
+                type = typeWithAnnotations(typetree, type, typeAnnotations, typeAnnotations);
+                // Note that we don't use the result, the call to
+                // typeWithAnnotations side-effects the type annotation positions.
+                // This is important for constructors of nested classes.
+
                 sym.appendUniqueTypeAttributes(typeAnnotations);
                 return;
             }
 
             // type is non-null and annotations are added to that type
-            type = typeWithAnnotations(typetree, type, typeAnnotations);
+            type = typeWithAnnotations(typetree, type, typeAnnotations, onlyTypeAnnos.toList());
 
             if (sym.getKind() == ElementKind.METHOD) {
                 sym.type.asMethodType().restype = type;
@@ -342,9 +370,9 @@
             sym.appendUniqueTypeAttributes(typeAnnotations);
 
             if (sym.getKind() == ElementKind.PARAMETER ||
-                    sym.getKind() == ElementKind.LOCAL_VARIABLE ||
-                    sym.getKind() == ElementKind.RESOURCE_VARIABLE ||
-                    sym.getKind() == ElementKind.EXCEPTION_PARAMETER) {
+                sym.getKind() == ElementKind.LOCAL_VARIABLE ||
+                sym.getKind() == ElementKind.RESOURCE_VARIABLE ||
+                sym.getKind() == ElementKind.EXCEPTION_PARAMETER) {
                 // Make sure all type annotations from the symbol are also
                 // on the owner.
                 sym.owner.appendUniqueTypeAttributes(sym.getRawTypeAttributes());
@@ -362,45 +390,34 @@
         // As a side effect the method sets the type annotation position of "annotations".
         // Note that it is assumed that all annotations share the same position.
         private Type typeWithAnnotations(final JCTree typetree, final Type type,
-                final List<Attribute.TypeCompound> annotations) {
-            // System.out.printf("typeWithAnnotations(typetree: %s, type: %s, annotations: %s)%n",
-            //         typetree, type, annotations);
+                final List<Attribute.TypeCompound> annotations,
+                final List<Attribute.TypeCompound> onlyTypeAnnotations) {
+            // System.out.printf("typeWithAnnotations(typetree: %s, type: %s, annotations: %s, onlyTypeAnnotations: %s)%n",
+            //         typetree, type, annotations, onlyTypeAnnotations);
             if (annotations.isEmpty()) {
                 return type;
             }
             if (type.hasTag(TypeTag.ARRAY)) {
+                Type.ArrayType arType = (Type.ArrayType) type.unannotatedType();
+                Type.ArrayType tomodify = new Type.ArrayType(null, arType.tsym);
                 Type toreturn;
-                Type.ArrayType tomodify;
-                Type.ArrayType arType;
-                {
-                    Type touse = type;
-                    if (type.isAnnotated()) {
-                        Type.AnnotatedType atype = (Type.AnnotatedType)type;
-                        toreturn = new Type.AnnotatedType(atype.underlyingType);
-                        ((Type.AnnotatedType)toreturn).typeAnnotations = atype.typeAnnotations;
-                        touse = atype.underlyingType;
-                        arType = (Type.ArrayType) touse;
-                        tomodify = new Type.ArrayType(null, arType.tsym);
-                        ((Type.AnnotatedType)toreturn).underlyingType = tomodify;
-                    } else {
-                        arType = (Type.ArrayType) touse;
-                        tomodify = new Type.ArrayType(null, arType.tsym);
-                        toreturn = tomodify;
-                    }
+                if (type.isAnnotated()) {
+                    toreturn = tomodify.annotatedType(type.getAnnotationMirrors());
+                } else {
+                    toreturn = tomodify;
                 }
+
                 JCArrayTypeTree arTree = arrayTypeTree(typetree);
 
                 ListBuffer<TypePathEntry> depth = new ListBuffer<>();
                 depth = depth.append(TypePathEntry.ARRAY);
                 while (arType.elemtype.hasTag(TypeTag.ARRAY)) {
                     if (arType.elemtype.isAnnotated()) {
-                        Type.AnnotatedType aelemtype = (Type.AnnotatedType) arType.elemtype;
-                        Type.AnnotatedType newAT = new Type.AnnotatedType(aelemtype.underlyingType);
-                        tomodify.elemtype = newAT;
-                        newAT.typeAnnotations = aelemtype.typeAnnotations;
-                        arType = (Type.ArrayType) aelemtype.underlyingType;
+                        Type aelemtype = arType.elemtype;
+                        arType = (Type.ArrayType) aelemtype.unannotatedType();
+                        ArrayType prevToMod = tomodify;
                         tomodify = new Type.ArrayType(null, arType.tsym);
-                        newAT.underlyingType = tomodify;
+                        prevToMod.elemtype = tomodify.annotatedType(arType.elemtype.getAnnotationMirrors());
                     } else {
                         arType = (Type.ArrayType) arType.elemtype;
                         tomodify.elemtype = new Type.ArrayType(null, arType.tsym);
@@ -409,7 +426,7 @@
                     arTree = arrayTypeTree(arTree.elemtype);
                     depth = depth.append(TypePathEntry.ARRAY);
                 }
-                Type arelemType = typeWithAnnotations(arTree.elemtype, arType.elemtype, annotations);
+                Type arelemType = typeWithAnnotations(arTree.elemtype, arType.elemtype, annotations, onlyTypeAnnotations);
                 tomodify.elemtype = arelemType;
                 {
                     // All annotations share the same position; modify the first one.
@@ -426,7 +443,7 @@
                 // There is a TypeKind, but no TypeTag.
                 JCTypeUnion tutree = (JCTypeUnion) typetree;
                 JCExpression fst = tutree.alternatives.get(0);
-                Type res = typeWithAnnotations(fst, fst.type, annotations);
+                Type res = typeWithAnnotations(fst, fst.type, annotations, onlyTypeAnnotations);
                 fst.type = res;
                 // TODO: do we want to set res as first element in uct.alternatives?
                 // UnionClassType uct = (com.sun.tools.javac.code.Type.UnionClassType)type;
@@ -465,14 +482,23 @@
                  * but nothing more exists.
                  */
                 if (enclTy != null &&
-                        enclTy.getKind() == TypeKind.NONE &&
-                        (enclTr.getKind() == JCTree.Kind.IDENTIFIER ||
-                         enclTr.getKind() == JCTree.Kind.MEMBER_SELECT ||
-                         enclTr.getKind() == JCTree.Kind.PARAMETERIZED_TYPE ||
-                         enclTr.getKind() == JCTree.Kind.ANNOTATED_TYPE)) {
-                    // TODO: also if it's "java. @A lang.Object", that is,
-                    // if it's on a package?
-                    log.error(enclTr.pos(), "cant.annotate.nested.type", enclTr.toString());
+                        enclTy.hasTag(TypeTag.NONE)) {
+                    switch (onlyTypeAnnotations.size()) {
+                    case 0:
+                        // Don't issue an error if all type annotations are
+                        // also declaration annotations.
+                        // If the annotations are also declaration annotations, they are
+                        // illegal as type annotations but might be legal as declaration annotations.
+                        // The normal declaration annotation checks make sure that the use is valid.
+                        break;
+                    case 1:
+                        log.error(typetree.pos(), "cant.type.annotate.scoping.1",
+                                onlyTypeAnnotations);
+                        break;
+                    default:
+                        log.error(typetree.pos(), "cant.type.annotate.scoping",
+                                onlyTypeAnnotations);
+                    }
                     return type;
                 }
 
@@ -551,7 +577,7 @@
                     // assert that t.constValue() == null?
                     if (t == stopAt ||
                         t.getEnclosingType() == Type.noType) {
-                        return new AnnotatedType(s, t);
+                        return t.annotatedType(s);
                     } else {
                         ClassType ret = new ClassType(t.getEnclosingType().accept(this, s),
                                 t.typarams_field, t.tsym);
@@ -566,12 +592,12 @@
 
                 @Override
                 public Type visitAnnotatedType(AnnotatedType t, List<TypeCompound> s) {
-                    return new AnnotatedType(t.typeAnnotations, t.underlyingType.accept(this, s));
+                    return t.unannotatedType().accept(this, s).annotatedType(t.getAnnotationMirrors());
                 }
 
                 @Override
                 public Type visitWildcardType(WildcardType t, List<TypeCompound> s) {
-                    return new AnnotatedType(s, t);
+                    return t.annotatedType(s);
                 }
 
                 @Override
@@ -594,12 +620,12 @@
 
                 @Override
                 public Type visitTypeVar(TypeVar t, List<TypeCompound> s) {
-                    return new AnnotatedType(s, t);
+                    return t.annotatedType(s);
                 }
 
                 @Override
                 public Type visitCapturedType(CapturedType t, List<TypeCompound> s) {
-                    return new AnnotatedType(s, t);
+                    return t.annotatedType(s);
                 }
 
                 @Override
@@ -616,12 +642,12 @@
 
                 @Override
                 public Type visitErrorType(ErrorType t, List<TypeCompound> s) {
-                    return new AnnotatedType(s, t);
+                    return t.annotatedType(s);
                 }
 
                 @Override
                 public Type visitType(Type t, List<TypeCompound> s) {
-                    return new AnnotatedType(s, t);
+                    return t.annotatedType(s);
                 }
             };
 
@@ -1023,9 +1049,7 @@
         @Override
         public void visitMethodDef(final JCMethodDecl tree) {
             if (tree.sym == null) {
-                // Something most be wrong, e.g. a class not found.
-                // Quietly ignore. (See test FailOver15.java)
-                return;
+                Assert.error("Visiting tree node before memberEnter");
             }
             if (sigOnly) {
                 if (!tree.mods.annotations.isEmpty()) {
@@ -1129,7 +1153,7 @@
                 // Nothing to do for separateAnnotationsKinds if
                 // there are no annotations of either kind.
             } else if (tree.sym == null) {
-                // Something is wrong already. Quietly ignore.
+                Assert.error("Visiting tree node before memberEnter");
             } else if (tree.sym.getKind() == ElementKind.PARAMETER) {
                 // Parameters are handled in visitMethodDef or visitLambda.
             } else if (tree.sym.getKind() == ElementKind.FIELD) {
@@ -1197,6 +1221,22 @@
             super.visitTypeParameter(tree);
         }
 
+        private void copyNewClassAnnotationsToOwner(JCNewClass tree) {
+            Symbol sym = tree.def.sym;
+            TypeAnnotationPosition pos = new TypeAnnotationPosition();
+            ListBuffer<Attribute.TypeCompound> newattrs =
+                new ListBuffer<Attribute.TypeCompound>();
+
+            for (Attribute.TypeCompound old : sym.getRawTypeAttributes()) {
+                newattrs.append(new Attribute.TypeCompound(old.type, old.values,
+                                                           pos));
+            }
+
+            pos.type = TargetType.NEW;
+            pos.pos = tree.pos;
+            sym.owner.appendUniqueTypeAttributes(newattrs.toList());
+        }
+
         @Override
         public void visitNewClass(JCNewClass tree) {
             if (tree.def != null &&
@@ -1215,7 +1255,7 @@
                 }
                 Type before = classdecl.sym.type;
                 separateAnnotationsKinds(classdecl, tree.clazz.type, classdecl.sym, pos);
-
+                copyNewClassAnnotationsToOwner(tree);
                 // classdecl.sym.type now contains an annotated type, which
                 // is not what we want there.
                 // TODO: should we put this type somewhere in the superclass/interface?
@@ -1282,9 +1322,9 @@
         private void findPosition(JCTree tree, JCTree frame, List<JCAnnotation> annotations) {
             if (!annotations.isEmpty()) {
                 /*
-                System.out.println("Finding pos for: " + annotations);
-                System.out.println("    tree: " + tree + " kind: " + tree.getKind());
-                System.out.println("    frame: " + frame + " kind: " + frame.getKind());
+                System.err.println("Finding pos for: " + annotations);
+                System.err.println("    tree: " + tree + " kind: " + tree.getKind());
+                System.err.println("    frame: " + frame + " kind: " + frame.getKind());
                 */
                 TypeAnnotationPosition p = new TypeAnnotationPosition();
                 p.onLambda = currentLambda;
--- a/src/share/classes/com/sun/tools/javac/code/Types.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Mon Oct 28 18:30:14 2013 -0400
@@ -246,7 +246,7 @@
             public Type visitClassType(ClassType t, Symbol sym) {
                 if (t.tsym == sym)
                     return t;
-                Type base = asSuper(sym.type, t.tsym);
+                Type base = asSuper(sym.type, t);
                 if (base == null)
                     return null;
                 ListBuffer<Type> from = new ListBuffer<Type>();
@@ -689,7 +689,7 @@
                         (t.flags() & SYNTHETIC) == 0;
             }
         };
-        private boolean pendingBridges(ClassSymbol origin, TypeSymbol s) {
+        private boolean pendingBridges(ClassSymbol origin, TypeSymbol sym) {
             //a symbol will be completed from a classfile if (a) symbol has
             //an associated file object with CLASS kind and (b) the symbol has
             //not been entered
@@ -698,11 +698,11 @@
                     enter.getEnv(origin) == null) {
                 return false;
             }
-            if (origin == s) {
+            if (origin == sym) {
                 return true;
             }
             for (Type t : interfaces(origin.type)) {
-                if (pendingBridges((ClassSymbol)t.tsym, s)) {
+                if (pendingBridges((ClassSymbol)t.tsym, sym)) {
                     return true;
                 }
             }
@@ -763,7 +763,7 @@
             } else if (t.hasTag(TYPEVAR)) {
                 return isSubtypeUnchecked(t.getUpperBound(), s, warn);
             } else if (!s.isRaw()) {
-                Type t2 = asSuper(t, s.tsym);
+                Type t2 = asSuper(t, s);
                 if (t2 != null && t2.isRaw()) {
                     if (isReifiable(s)) {
                         warn.silentWarn(LintCategory.UNCHECKED);
@@ -916,7 +916,7 @@
 
             @Override
             public Boolean visitClassType(ClassType t, Type s) {
-                Type sup = asSuper(t, s.tsym);
+                Type sup = asSuper(t, s);
                 return sup != null
                     && sup.tsym == s.tsym
                     // You're not allowed to write
@@ -1275,7 +1275,7 @@
                     return false;
                 if (!s.getAnnotationMirrors().containsAll(t.getAnnotationMirrors()))
                     return false;
-                return visit(t.underlyingType, s);
+                return visit(t.unannotatedType(), s);
             }
         };
     // </editor-fold>
@@ -1937,30 +1937,42 @@
      * @param t a type
      * @param sym a symbol
      */
-    public Type asSuper(Type t, Symbol sym) {
-        return asSuper.visit(t, sym);
+    public Type asSuper(Type t, Symbol s) {
+        return asSuper(t, s.type);
+    }
+
+    public Type asSuper(Type t, Type s) {
+        return asSuper.visit(t, s);
     }
     // where
-        private SimpleVisitor<Type,Symbol> asSuper = new SimpleVisitor<Type,Symbol>() {
-
-            public Type visitType(Type t, Symbol sym) {
+        private SimpleVisitor<Type,Type> asSuper = new SimpleVisitor<Type,Type>() {
+
+            public Type visitType(Type t, Type s) {
                 return null;
             }
 
             @Override
-            public Type visitClassType(ClassType t, Symbol sym) {
-                if (t.tsym == sym)
+            public Type visitClassType(ClassType t, Type s) {
+                if (t.tsym == s.tsym)
                     return t;
 
                 Type st = supertype(t);
-                if (st.hasTag(CLASS) || st.hasTag(TYPEVAR) || st.hasTag(ERROR)) {
-                    Type x = asSuper(st, sym);
+
+                switch(st.getTag()) {
+                default: break;
+                case CLASS:
+                case ARRAY:
+                case TYPEVAR:
+                case ERROR: {
+                    Type x = asSuper(st, s);
                     if (x != null)
                         return x;
+                } break;
                 }
-                if ((sym.flags() & INTERFACE) != 0) {
+
+                if ((s.tsym.flags() & INTERFACE) != 0) {
                     for (List<Type> l = interfaces(t); l.nonEmpty(); l = l.tail) {
-                        Type x = asSuper(l.head, sym);
+                        Type x = asSuper(l.head, s);
                         if (x != null)
                             return x;
                     }
@@ -1969,22 +1981,20 @@
             }
 
             @Override
-            public Type visitArrayType(ArrayType t, Symbol sym) {
-                return isSubtype(t, sym.type) ? sym.type : null;
+            public Type visitArrayType(ArrayType t, Type s) {
+                return isSubtype(t, s) ? s : null;
             }
 
             @Override
-            public Type visitTypeVar(TypeVar t, Symbol sym) {
-                if (t.tsym == sym)
+            public Type visitTypeVar(TypeVar t, Type s) {
+                if (t.tsym == s.tsym)
                     return t;
                 else
-                    return asSuper(t.bound, sym);
+                    return asSuper(t.bound, s);
             }
 
             @Override
-            public Type visitErrorType(ErrorType t, Symbol sym) {
-                return t;
-            }
+            public Type visitErrorType(ErrorType t, Type s) { return t; }
         };
 
     /**
@@ -2209,15 +2219,15 @@
 
             @Override
             public Type visitAnnotatedType(AnnotatedType t, Boolean recurse) {
-                Type erased = erasure(t.underlyingType, recurse);
+                Type erased = erasure(t.unannotatedType(), recurse);
                 if (erased.isAnnotated()) {
                     // This can only happen when the underlying type is a
                     // type variable and the upper bound of it is annotated.
                     // The annotation on the type variable overrides the one
                     // on the bound.
-                    erased = ((AnnotatedType)erased).underlyingType;
+                    erased = ((AnnotatedType)erased).unannotatedType();
                 }
-                return new AnnotatedType(t.typeAnnotations, erased);
+                return erased.annotatedType(t.getAnnotationMirrors());
             }
         };
 
@@ -3565,9 +3575,9 @@
             //step 3 - for each element G in MEC, compute lci(Inv(G))
             List<Type> candidates = List.nil();
             for (Type erasedSupertype : mec) {
-                List<Type> lci = List.of(asSuper(ts.head, erasedSupertype.tsym));
+                List<Type> lci = List.of(asSuper(ts.head, erasedSupertype));
                 for (Type t : ts) {
-                    lci = intersect(lci, List.of(asSuper(t, erasedSupertype.tsym)));
+                    lci = intersect(lci, List.of(asSuper(t, erasedSupertype)));
                 }
                 candidates = candidates.appendList(lci);
             }
@@ -3987,7 +3997,7 @@
         // The arguments to the supers could be unified here to
         // get a more accurate analysis
         while (commonSupers.nonEmpty()) {
-            Type t1 = asSuper(from, commonSupers.head.tsym);
+            Type t1 = asSuper(from, commonSupers.head);
             Type t2 = commonSupers.head; // same as asSuper(to, commonSupers.head.tsym);
             if (disjointTypes(t1.getTypeArguments(), t2.getTypeArguments()))
                 return false;
@@ -4018,7 +4028,7 @@
             from = target;
         }
         Assert.check((from.tsym.flags() & FINAL) != 0);
-        Type t1 = asSuper(from, to.tsym);
+        Type t1 = asSuper(from, to);
         if (t1 == null) return false;
         Type t2 = to;
         if (disjointTypes(t1.getTypeArguments(), t2.getTypeArguments()))
@@ -4411,7 +4421,7 @@
         public R visitUndetVar(UndetVar t, S s)         { return visitType(t, s); }
         public R visitErrorType(ErrorType t, S s)       { return visitType(t, s); }
         // Pretend annotations don't exist
-        public R visitAnnotatedType(AnnotatedType t, S s) { return visit(t.underlyingType, s); }
+        public R visitAnnotatedType(AnnotatedType t, S s) { return visit(t.unannotatedType(), s); }
     }
 
     /**
--- a/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Mon Oct 28 18:30:14 2013 -0400
@@ -37,6 +37,7 @@
 import static com.sun.tools.javac.code.TypeTag.ARRAY;
 import static com.sun.tools.javac.code.TypeTag.CLASS;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
+import javax.lang.model.type.ErrorType;
 
 /** Enter annotations on symbols.  Annotations accumulate in a queue,
  *  which is processed at the top level of any set of recursive calls
@@ -87,31 +88,36 @@
 
     private int enterCount = 0;
 
-    ListBuffer<Annotator> q = new ListBuffer<Annotator>();
-    ListBuffer<Annotator> typesQ = new ListBuffer<Annotator>();
-    ListBuffer<Annotator> repeatedQ = new ListBuffer<Annotator>();
-    ListBuffer<Annotator> afterRepeatedQ = new ListBuffer<Annotator>();
+    ListBuffer<Worker> q = new ListBuffer<Worker>();
+    ListBuffer<Worker> typesQ = new ListBuffer<Worker>();
+    ListBuffer<Worker> repeatedQ = new ListBuffer<Worker>();
+    ListBuffer<Worker> afterRepeatedQ = new ListBuffer<Worker>();
+    ListBuffer<Worker> validateQ = new ListBuffer<Worker>();
 
-    public void earlier(Annotator a) {
+    public void earlier(Worker a) {
         q.prepend(a);
     }
 
-    public void normal(Annotator a) {
+    public void normal(Worker a) {
         q.append(a);
     }
 
-    public void typeAnnotation(Annotator a) {
+    public void typeAnnotation(Worker a) {
         typesQ.append(a);
     }
 
-    public void repeated(Annotator a) {
+    public void repeated(Worker a) {
         repeatedQ.append(a);
     }
 
-    public void afterRepeated(Annotator a) {
+    public void afterRepeated(Worker a) {
         afterRepeatedQ.append(a);
     }
 
+    public void validate(Worker a) {
+        validateQ.append(a);
+    }
+
     /** Called when the Enter phase starts. */
     public void enterStart() {
         enterCount++;
@@ -123,34 +129,45 @@
         flush();
     }
 
+    /** Variant which allows for a delayed flush of annotations.
+     * Needed by ClassReader */
+    public void enterDoneWithoutFlush() {
+        enterCount--;
+    }
+
     public void flush() {
         if (enterCount != 0) return;
         enterCount++;
         try {
             while (q.nonEmpty()) {
-                q.next().enterAnnotation();
+                q.next().run();
             }
             while (typesQ.nonEmpty()) {
-                typesQ.next().enterAnnotation();
+                typesQ.next().run();
             }
             while (repeatedQ.nonEmpty()) {
-                repeatedQ.next().enterAnnotation();
+                repeatedQ.next().run();
             }
             while (afterRepeatedQ.nonEmpty()) {
-                afterRepeatedQ.next().enterAnnotation();
+                afterRepeatedQ.next().run();
+            }
+            while (validateQ.nonEmpty()) {
+                validateQ.next().run();
             }
         } finally {
             enterCount--;
         }
     }
 
-    /** A client that has annotations to add registers an annotator,
-     *  the method it will use to add the annotation.  There are no
-     *  parameters; any needed data should be captured by the
-     *  Annotator.
+    /** A client that needs to run during {@link #flush()} registers an worker
+     *  into one of the queues defined in this class. The queues are: {@link #earlier(Worker)},
+     *  {@link #normal(Worker)}, {@link #typeAnnotation(Worker)}, {@link #repeated(Worker)},
+     *  {@link #afterRepeated(Worker)}, {@link #validate(Worker)}.
+     *  The {@link Worker#run()} method will called inside the {@link #flush()}
+     *  call. Queues are empties in the abovementioned order.
      */
-    public interface Annotator {
-        void enterAnnotation();
+    public interface Worker {
+        void run();
         String toString();
     }
 
@@ -195,12 +212,12 @@
         }
 
         /**
-         * Queue the Annotator a on the repeating annotations queue of the
+         * Queue the Worker a on the repeating annotations queue of the
          * Annotate instance this context belongs to.
          *
-         * @param a the Annotator to enqueue for repeating annotation annotating
+         * @param a the Worker to enqueue for repeating annotation annotating
          */
-        public void annotateRepeated(Annotator a) {
+        public void annotateRepeated(Worker a) {
             Annotate.this.repeated(a);
         }
     }
@@ -239,7 +256,8 @@
         a.type = chk.checkType(a.annotationType.pos(), at, expected);
         if (a.type.isErroneous()) {
             if (typeAnnotation) {
-                return new Attribute.TypeCompound(a.type, List.<Pair<MethodSymbol,Attribute>>nil(), null);
+                return new Attribute.TypeCompound(a.type, List.<Pair<MethodSymbol,Attribute>>nil(),
+                        new TypeAnnotationPosition());
             } else {
                 return new Attribute.Compound(a.type, List.<Pair<MethodSymbol,Attribute>>nil());
             }
@@ -317,50 +335,9 @@
             expected.tsym.complete();
         } catch(CompletionFailure e) {
             log.error(tree.pos(), "cant.resolve", Kinds.kindName(e.sym), e.sym);
-            return new Attribute.Error(expected);
-        }
-        if (expected.isPrimitive() || types.isSameType(expected, syms.stringType)) {
-            Type result = attr.attribExpr(tree, env, expected);
-            if (result.isErroneous())
-                return new Attribute.Error(expected);
-            if (result.constValue() == null) {
-                log.error(tree.pos(), "attribute.value.must.be.constant");
-                return new Attribute.Error(expected);
-            }
-            result = cfolder.coerce(result, expected);
-            return new Attribute.Constant(expected, result.constValue());
+            expected = syms.errType;
         }
-        if (expected.tsym == syms.classType.tsym) {
-            Type result = attr.attribExpr(tree, env, expected);
-            if (result.isErroneous()) {
-                // Does it look like a class literal?
-                if (TreeInfo.name(tree) == names._class) {
-                    Name n = (((JCFieldAccess) tree).selected).type.tsym.flatName();
-                    return new Attribute.UnresolvedClass(expected,
-                            types.createErrorType(n,
-                                    syms.unknownSymbol, syms.classType));
-                } else {
-                    return new Attribute.Error(expected);
-                }
-            }
-
-            // Class literals look like field accesses of a field named class
-            // at the tree level
-            if (TreeInfo.name(tree) != names._class) {
-                log.error(tree.pos(), "annotation.value.must.be.class.literal");
-                return new Attribute.Error(expected);
-            }
-            return new Attribute.Class(types,
-                                       (((JCFieldAccess) tree).selected).type);
-        }
-        if ((expected.tsym.flags() & Flags.ANNOTATION) != 0) {
-            if (!tree.hasTag(ANNOTATION)) {
-                log.error(tree.pos(), "annotation.value.must.be.annotation");
-                expected = syms.errorType;
-            }
-            return enterAnnotation((JCAnnotation)tree, expected, env);
-        }
-        if (expected.hasTag(ARRAY)) { // should really be isArray()
+        if (expected.hasTag(ARRAY)) {
             if (!tree.hasTag(NEWARRAY)) {
                 tree = make.at(tree.pos).
                     NewArray(null, List.<JCExpression>nil(), List.of(tree));
@@ -368,7 +345,6 @@
             JCNewArray na = (JCNewArray)tree;
             if (na.elemtype != null) {
                 log.error(na.elemtype.pos(), "new.not.allowed.in.annotation");
-                return new Attribute.Error(expected);
             }
             ListBuffer<Attribute> buf = new ListBuffer<Attribute>();
             for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
@@ -380,20 +356,84 @@
             return new Attribute.
                 Array(expected, buf.toArray(new Attribute[buf.length()]));
         }
+        if (tree.hasTag(NEWARRAY)) { //error recovery
+            if (!expected.isErroneous())
+                log.error(tree.pos(), "annotation.value.not.allowable.type");
+            JCNewArray na = (JCNewArray)tree;
+            if (na.elemtype != null) {
+                log.error(na.elemtype.pos(), "new.not.allowed.in.annotation");
+            }
+            for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
+                enterAttributeValue(syms.errType,
+                                    l.head,
+                                    env);
+            }
+            return new Attribute.Error(syms.errType);
+        }
+        if ((expected.tsym.flags() & Flags.ANNOTATION) != 0) {
+            if (tree.hasTag(ANNOTATION)) {
+                return enterAnnotation((JCAnnotation)tree, expected, env);
+            } else {
+                log.error(tree.pos(), "annotation.value.must.be.annotation");
+                expected = syms.errType;
+            }
+        }
+        if (tree.hasTag(ANNOTATION)) { //error recovery
+            if (!expected.isErroneous())
+                log.error(tree.pos(), "annotation.not.valid.for.type", expected);
+            enterAnnotation((JCAnnotation)tree, syms.errType, env);
+            return new Attribute.Error(((JCAnnotation)tree).annotationType.type);
+        }
+        if (expected.isPrimitive() || types.isSameType(expected, syms.stringType)) {
+            Type result = attr.attribExpr(tree, env, expected);
+            if (result.isErroneous())
+                return new Attribute.Error(result.getOriginalType());
+            if (result.constValue() == null) {
+                log.error(tree.pos(), "attribute.value.must.be.constant");
+                return new Attribute.Error(expected);
+            }
+            result = cfolder.coerce(result, expected);
+            return new Attribute.Constant(expected, result.constValue());
+        }
+        if (expected.tsym == syms.classType.tsym) {
+            Type result = attr.attribExpr(tree, env, expected);
+            if (result.isErroneous()) {
+                // Does it look like an unresolved class literal?
+                if (TreeInfo.name(tree) == names._class &&
+                    ((JCFieldAccess) tree).selected.type.isErroneous()) {
+                    Name n = (((JCFieldAccess) tree).selected).type.tsym.flatName();
+                    return new Attribute.UnresolvedClass(expected,
+                            types.createErrorType(n,
+                                    syms.unknownSymbol, syms.classType));
+                } else {
+                    return new Attribute.Error(result.getOriginalType());
+                }
+            }
+
+            // Class literals look like field accesses of a field named class
+            // at the tree level
+            if (TreeInfo.name(tree) != names._class) {
+                log.error(tree.pos(), "annotation.value.must.be.class.literal");
+                return new Attribute.Error(syms.errType);
+            }
+            return new Attribute.Class(types,
+                                       (((JCFieldAccess) tree).selected).type);
+        }
         if (expected.hasTag(CLASS) &&
             (expected.tsym.flags() & Flags.ENUM) != 0) {
-            attr.attribExpr(tree, env, expected);
+            Type result = attr.attribExpr(tree, env, expected);
             Symbol sym = TreeInfo.symbol(tree);
             if (sym == null ||
                 TreeInfo.nonstaticSelect(tree) ||
                 sym.kind != Kinds.VAR ||
                 (sym.flags() & Flags.ENUM) == 0) {
                 log.error(tree.pos(), "enum.annotation.must.be.enum.constant");
-                return new Attribute.Error(expected);
+                return new Attribute.Error(result.getOriginalType());
             }
             VarSymbol enumerator = (VarSymbol) sym;
             return new Attribute.Enum(expected, enumerator);
         }
+        //error recovery:
         if (!expected.isErroneous())
             log.error(tree.pos(), "annotation.value.not.allowable.type");
         return new Attribute.Error(attr.attribExpr(tree, env, expected));
--- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Oct 28 18:30:14 2013 -0400
@@ -58,6 +58,7 @@
 import static com.sun.tools.javac.code.Kinds.ERRONEOUS;
 import static com.sun.tools.javac.code.TypeTag.*;
 import static com.sun.tools.javac.code.TypeTag.WILDCARD;
+import static com.sun.tools.javac.code.TypeTag.ARRAY;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
 
 /** This is the main context-dependent analysis phase in GJC. It
@@ -249,6 +250,14 @@
         Type owntype = found;
         if (!owntype.hasTag(ERROR) && !resultInfo.pt.hasTag(METHOD) && !resultInfo.pt.hasTag(FORALL)) {
             if (allowPoly && inferenceContext.free(found)) {
+                if ((ownkind & ~resultInfo.pkind) == 0) {
+                    owntype = resultInfo.check(tree, inferenceContext.asFree(owntype));
+                } else {
+                    log.error(tree.pos(), "unexpected.type",
+                            kindNames(resultInfo.pkind),
+                            kindName(ownkind));
+                    owntype = types.createErrorType(owntype);
+                }
                 inferenceContext.addFreeTypeListener(List.of(found, resultInfo.pt), new FreeTypeListener() {
                     @Override
                     public void typesInferred(InferenceContext inferenceContext) {
@@ -313,9 +322,6 @@
                 case CLASSDEF:
                     //class def is always an owner
                     return ((JCClassDecl)env.tree).sym;
-                case LAMBDA:
-                    //a lambda is an owner - return a fresh synthetic method symbol
-                    return new MethodSymbol(0, names.empty, null, syms.methodClass);
                 case BLOCK:
                     //static/instance init blocks are owner
                     Symbol blockSym = env.info.scope.owner;
@@ -513,6 +519,15 @@
         protected ResultInfo dup(CheckContext newContext) {
             return new ResultInfo(pkind, pt, newContext);
         }
+
+        @Override
+        public String toString() {
+            if (pt != null) {
+                return pt.toString();
+            } else {
+                return "";
+            }
+        }
     }
 
     class RecoveryInfo extends ResultInfo {
@@ -791,34 +806,45 @@
         Type t = tree.type != null ?
             tree.type :
             attribType(tree, env);
-        return checkBase(t, tree, env, classExpected, interfaceExpected, checkExtensible);
+        return checkBase(t, tree, env, classExpected, interfaceExpected, false, checkExtensible);
     }
     Type checkBase(Type t,
                    JCTree tree,
                    Env<AttrContext> env,
                    boolean classExpected,
-                   boolean interfaceExpected,
+                   boolean interfacesOnlyExpected,
+                   boolean interfacesOrArraysExpected,
                    boolean checkExtensible) {
         if (t.isErroneous())
             return t;
-        if (t.hasTag(TYPEVAR) && !classExpected && !interfaceExpected) {
+        if (t.hasTag(TYPEVAR) && !classExpected &&
+            !interfacesOrArraysExpected && !interfacesOnlyExpected) {
             // check that type variable is already visible
             if (t.getUpperBound() == null) {
                 log.error(tree.pos(), "illegal.forward.ref");
                 return types.createErrorType(t);
             }
+        } else if (classExpected) {
+            t = chk.checkClassType(tree.pos(), t, checkExtensible|!allowGenerics);
         } else {
-            t = chk.checkClassType(tree.pos(), t, checkExtensible|!allowGenerics);
+            t = chk.checkClassOrArrayType(tree.pos(), t,
+                                          checkExtensible|!allowGenerics);
         }
-        if (interfaceExpected && (t.tsym.flags() & INTERFACE) == 0) {
+        if (interfacesOnlyExpected && !t.tsym.isInterface()) {
             log.error(tree.pos(), "intf.expected.here");
             // return errType is necessary since otherwise there might
             // be undetected cycles which cause attribution to loop
             return types.createErrorType(t);
+        } else if (interfacesOrArraysExpected &&
+            !(t.tsym.isInterface() || t.getTag() == ARRAY)) {
+            log.error(tree.pos(), "intf.or.array.expected.here");
+            // return errType is necessary since otherwise there might
+            // be undetected cycles which cause attribution to loop
+            return types.createErrorType(t);
         } else if (checkExtensible &&
                    classExpected &&
-                   (t.tsym.flags() & INTERFACE) != 0) {
-                log.error(tree.pos(), "no.intf.expected.here");
+                   t.tsym.isInterface()) {
+            log.error(tree.pos(), "no.intf.expected.here");
             return types.createErrorType(t);
         }
         if (checkExtensible &&
@@ -829,6 +855,12 @@
         chk.checkNonCyclic(tree.pos(), t);
         return t;
     }
+    //where
+        private Object asTypeParam(Type t) {
+            return (t.hasTag(TYPEVAR))
+                                    ? diags.fragment("type.parameter", t)
+                                    : t;
+        }
 
     Type attribIdentAsEnumType(Env<AttrContext> env, JCIdent id) {
         Assert.check((env.enclClass.sym.flags() & ENUM) != 0);
@@ -947,12 +979,6 @@
                 chk.validateAnnotationType(tree.restype);
                 // ensure that annotation method does not clash with members of Object/Annotation
                 chk.validateAnnotationMethod(tree.pos(), m);
-
-                if (tree.defaultValue != null) {
-                    // if default value is an annotation, check it is a well-formed
-                    // annotation value (e.g. no duplicate values, no missing values, etc.)
-                    chk.validateAnnotationTree(tree.defaultValue);
-                }
             }
 
             for (List<JCExpression> l = tree.thrown; l.nonEmpty(); l = l.tail)
@@ -1014,7 +1040,6 @@
 
             localEnv.info.scope.leave();
             result = tree.type = m.type;
-            chk.validateAnnotations(tree.mods.annotations, m);
         }
         finally {
             chk.setLint(prevLint);
@@ -1072,7 +1097,6 @@
                 }
             }
             result = tree.type = v.type;
-            chk.validateAnnotations(tree.mods.annotations, v);
         }
         finally {
             chk.setLint(prevLint);
@@ -2835,7 +2859,7 @@
             boolean isSpeculativeRound =
                     resultInfo.checkContext.deferredAttrContext().mode == DeferredAttr.AttrMode.SPECULATIVE;
             checkReferenceCompatible(that, desc, refType, resultInfo.checkContext, isSpeculativeRound);
-            if (!isSpeculativeRound && target != Type.recoveryType) {
+            if (!isSpeculativeRound) {
                 checkAccessibleTypes(that, localEnv, resultInfo.checkContext.inferenceContext(), desc, target);
             }
             result = check(that, target, VAL, resultInfo);
@@ -3524,15 +3548,6 @@
                         Type normOuter = site;
                         if (normOuter.hasTag(CLASS)) {
                             normOuter = types.asEnclosingSuper(site, ownOuter.tsym);
-                            if (site.isAnnotated()) {
-                                // Propagate any type annotations.
-                                // TODO: should asEnclosingSuper do this?
-                                // Note that the type annotations in site will be updated
-                                // by annotateType. Therefore, modify site instead
-                                // of creating a new AnnotatedType.
-                                ((AnnotatedType)site).underlyingType = normOuter;
-                                normOuter = site;
-                            }
                         }
                         if (normOuter == null) // perhaps from an import
                             normOuter = types.erasure(ownOuter);
@@ -3891,12 +3906,6 @@
                     }
                 }
                 owntype = new ClassType(clazzOuter, actuals, clazztype.tsym);
-                if (clazztype.isAnnotated()) {
-                    // Use the same AnnotatedType, because it will have
-                    // its annotations set later.
-                    ((AnnotatedType)clazztype).underlyingType = owntype;
-                    owntype = clazztype;
-                }
             } else {
                 if (formals.length() != 0) {
                     log.error(tree.pos(), "wrong.number.type.args",
@@ -3962,9 +3971,7 @@
         TypeVar typeVar = (TypeVar) tree.type;
 
         if (tree.annotations != null && tree.annotations.nonEmpty()) {
-            AnnotatedType antype = new AnnotatedType(typeVar);
-            annotateType(antype, tree.annotations);
-            tree.type = antype;
+            annotateType(tree, tree.annotations);
         }
 
         if (!typeVar.bound.isErroneous()) {
@@ -3977,7 +3984,7 @@
         Set<Type> boundSet = new HashSet<Type>();
         if (bounds.nonEmpty()) {
             // accept class or interface or typevar as first bound.
-            bounds.head.type = checkBase(bounds.head.type, bounds.head, env, false, false, false);
+            bounds.head.type = checkBase(bounds.head.type, bounds.head, env, false, false, false, false);
             boundSet.add(types.erasure(bounds.head.type));
             if (bounds.head.type.isErroneous()) {
                 return bounds.head.type;
@@ -3993,7 +4000,7 @@
                 // if first bound was a class or interface, accept only interfaces
                 // as further bounds.
                 for (JCExpression bound : bounds.tail) {
-                    bound.type = checkBase(bound.type, bound, env, false, true, false);
+                    bound.type = checkBase(bound.type, bound, env, false, false, true, false);
                     if (bound.type.isErroneous()) {
                         bounds = List.of(bound);
                     }
@@ -4058,40 +4065,40 @@
     }
 
     public void visitAnnotation(JCAnnotation tree) {
-        log.error(tree.pos(), "annotation.not.valid.for.type", pt());
-        result = tree.type = syms.errType;
+        Assert.error("should be handled in Annotate");
     }
 
     public void visitAnnotatedType(JCAnnotatedType tree) {
         Type underlyingType = attribType(tree.getUnderlyingType(), env);
         this.attribAnnotationTypes(tree.annotations, env);
-        AnnotatedType antype = new AnnotatedType(underlyingType);
-        annotateType(antype, tree.annotations);
-        result = tree.type = antype;
+        annotateType(tree, tree.annotations);
+        result = tree.type = underlyingType;
     }
 
     /**
      * Apply the annotations to the particular type.
      */
-    public void annotateType(final AnnotatedType type, final List<JCAnnotation> annotations) {
-        if (annotations.isEmpty())
-            return;
-        annotate.typeAnnotation(new Annotate.Annotator() {
+    public void annotateType(final JCTree tree, final List<JCAnnotation> annotations) {
+        annotate.typeAnnotation(new Annotate.Worker() {
             @Override
             public String toString() {
-                return "annotate " + annotations + " onto " + type;
+                return "annotate " + annotations + " onto " + tree;
             }
             @Override
-            public void enterAnnotation() {
+            public void run() {
                 List<Attribute.TypeCompound> compounds = fromAnnotations(annotations);
-                type.typeAnnotations = compounds;
+                if (annotations.size() == compounds.size()) {
+                    // All annotations were successfully converted into compounds
+                    tree.type = tree.type.unannotatedType().annotatedType(compounds);
+                }
             }
         });
     }
 
     private static List<Attribute.TypeCompound> fromAnnotations(List<JCAnnotation> annotations) {
-        if (annotations.isEmpty())
+        if (annotations.isEmpty()) {
             return List.nil();
+        }
 
         ListBuffer<Attribute.TypeCompound> buf = new ListBuffer<>();
         for (JCAnnotation anno : annotations) {
@@ -4103,6 +4110,10 @@
                 // Any better solutions?
                 buf.append((Attribute.TypeCompound) anno.attribute);
             }
+            // Eventually we will want to throw an exception here, but
+            // we can't do that just yet, because it gets triggered
+            // when attempting to attach an annotation that isn't
+            // defined.
         }
         return buf.toList();
     }
@@ -4138,7 +4149,6 @@
         JCCompilationUnit toplevel = env.toplevel;
         try {
             annotate.flush();
-            chk.validateAnnotations(toplevel.packageAnnotations, toplevel.packge);
         } catch (CompletionFailure ex) {
             chk.completionError(toplevel.pos(), ex);
         }
@@ -4223,6 +4233,7 @@
 
                 chk.checkDeprecatedAnnotation(env.tree.pos(), c);
                 chk.checkClassOverrideEqualsAndHashIfNeeded(env.tree.pos(), c);
+                chk.checkFunctionalInterface((JCClassDecl) env.tree, c);
             } finally {
                 env.info.returnResult = prevReturnRes;
                 log.useSource(prev);
@@ -4241,9 +4252,6 @@
         JCClassDecl tree = (JCClassDecl)env.tree;
         Assert.check(c == tree.sym);
 
-        // Validate annotations
-        chk.validateAnnotations(tree.mods.annotations, c);
-
         // Validate type parameters, supertype and interfaces.
         attribStats(tree.typarams, env);
         if (!c.isAnonymous()) {
@@ -4344,7 +4352,7 @@
             typeAnnotations.organizeTypeAnnotationsBodies(tree);
 
             // Check type annotations applicability rules
-            validateTypeAnnotations(tree);
+            validateTypeAnnotations(tree, false);
         }
     }
         // where
@@ -4419,19 +4427,25 @@
         return types.capture(type);
     }
 
-    private void validateTypeAnnotations(JCTree tree) {
-        tree.accept(typeAnnotationsValidator);
+    public void validateTypeAnnotations(JCTree tree, boolean sigOnly) {
+        tree.accept(new TypeAnnotationsValidator(sigOnly));
     }
     //where
-    private final JCTree.Visitor typeAnnotationsValidator = new TreeScanner() {
-
-        private boolean checkAllAnnotations = false;
+    private final class TypeAnnotationsValidator extends TreeScanner {
+
+        private final boolean sigOnly;
+        public TypeAnnotationsValidator(boolean sigOnly) {
+            this.sigOnly = sigOnly;
+        }
 
         public void visitAnnotation(JCAnnotation tree) {
-            if (tree.hasTag(TYPE_ANNOTATION) || checkAllAnnotations) {
-                chk.validateTypeAnnotation(tree, false);
+            chk.validateTypeAnnotation(tree, false);
+            super.visitAnnotation(tree);
+        }
+        public void visitAnnotatedType(JCAnnotatedType tree) {
+            if (!tree.underlyingType.type.isErroneous()) {
+                super.visitAnnotatedType(tree);
             }
-            super.visitAnnotation(tree);
         }
         public void visitTypeParameter(JCTypeParameter tree) {
             chk.validateTypeAnnotations(tree.annotations, true);
@@ -4450,12 +4464,26 @@
             if (tree.restype != null && tree.restype.type != null) {
                 validateAnnotatedType(tree.restype, tree.restype.type);
             }
-            super.visitMethodDef(tree);
+            if (sigOnly) {
+                scan(tree.mods);
+                scan(tree.restype);
+                scan(tree.typarams);
+                scan(tree.recvparam);
+                scan(tree.params);
+                scan(tree.thrown);
+            } else {
+                scan(tree.defaultValue);
+                scan(tree.body);
+            }
         }
         public void visitVarDef(final JCVariableDecl tree) {
             if (tree.sym != null && tree.sym.type != null)
-                validateAnnotatedType(tree, tree.sym.type);
-            super.visitVarDef(tree);
+                validateAnnotatedType(tree.vartype, tree.sym.type);
+            scan(tree.mods);
+            scan(tree.vartype);
+            if (!sigOnly) {
+                scan(tree.init);
+            }
         }
         public void visitTypeCast(JCTypeCast tree) {
             if (tree.clazz != null && tree.clazz.type != null)
@@ -4468,28 +4496,37 @@
             super.visitTypeTest(tree);
         }
         public void visitNewClass(JCNewClass tree) {
-            if (tree.clazz.hasTag(ANNOTATED_TYPE)) {
-                boolean prevCheck = this.checkAllAnnotations;
-                try {
-                    this.checkAllAnnotations = true;
-                    scan(((JCAnnotatedType)tree.clazz).annotations);
-                } finally {
-                    this.checkAllAnnotations = prevCheck;
-                }
-            }
+            if (tree.clazz.type != null)
+                validateAnnotatedType(tree.clazz, tree.clazz.type);
             super.visitNewClass(tree);
         }
         public void visitNewArray(JCNewArray tree) {
-            if (tree.elemtype != null && tree.elemtype.hasTag(ANNOTATED_TYPE)) {
-                boolean prevCheck = this.checkAllAnnotations;
-                try {
-                    this.checkAllAnnotations = true;
-                    scan(((JCAnnotatedType)tree.elemtype).annotations);
-                } finally {
-                    this.checkAllAnnotations = prevCheck;
+            if (tree.elemtype != null && tree.elemtype.type != null)
+                validateAnnotatedType(tree.elemtype, tree.elemtype.type);
+            super.visitNewArray(tree);
+        }
+
+        @Override
+        public void visitClassDef(JCClassDecl tree) {
+            if (sigOnly) {
+                scan(tree.mods);
+                scan(tree.typarams);
+                scan(tree.extending);
+                scan(tree.implementing);
+            }
+            for (JCTree member : tree.defs) {
+                if (member.hasTag(Tag.CLASSDEF)) {
+                    continue;
                 }
+                scan(member);
             }
-            super.visitNewArray(tree);
+        }
+
+        @Override
+        public void visitBlock(JCBlock tree) {
+            if (!sigOnly) {
+                scan(tree.stats);
+            }
         }
 
         /* I would want to model this after
@@ -4501,21 +4538,95 @@
          * can occur.
          */
         private void validateAnnotatedType(final JCTree errtree, final Type type) {
-            if (type.getEnclosingType() != null &&
-                    type != type.getEnclosingType()) {
-                validateEnclosingAnnotatedType(errtree, type.getEnclosingType());
-            }
-            for (Type targ : type.getTypeArguments()) {
-                validateAnnotatedType(errtree, targ);
+            // System.out.println("Attr.validateAnnotatedType: " + errtree + " type: " + type);
+
+            if (type.isPrimitiveOrVoid()) {
+                return;
             }
-        }
-        private void validateEnclosingAnnotatedType(final JCTree errtree, final Type type) {
-            validateAnnotatedType(errtree, type);
-            if (type.tsym != null &&
-                    type.tsym.isStatic() &&
-                    type.getAnnotationMirrors().nonEmpty()) {
-                    // Enclosing static classes cannot have type annotations.
-                log.error(errtree.pos(), "cant.annotate.static.class");
+
+            JCTree enclTr = errtree;
+            Type enclTy = type;
+
+            boolean repeat = true;
+            while (repeat) {
+                if (enclTr.hasTag(TYPEAPPLY)) {
+                    List<Type> tyargs = enclTy.getTypeArguments();
+                    List<JCExpression> trargs = ((JCTypeApply)enclTr).getTypeArguments();
+                    if (trargs.length() > 0) {
+                        // Nothing to do for diamonds
+                        if (tyargs.length() == trargs.length()) {
+                            for (int i = 0; i < tyargs.length(); ++i) {
+                                validateAnnotatedType(trargs.get(i), tyargs.get(i));
+                            }
+                        }
+                        // If the lengths don't match, it's either a diamond
+                        // or some nested type that redundantly provides
+                        // type arguments in the tree.
+                    }
+
+                    // Look at the clazz part of a generic type
+                    enclTr = ((JCTree.JCTypeApply)enclTr).clazz;
+                }
+
+                if (enclTr.hasTag(SELECT)) {
+                    enclTr = ((JCTree.JCFieldAccess)enclTr).getExpression();
+                    if (enclTy != null &&
+                            !enclTy.hasTag(NONE)) {
+                        enclTy = enclTy.getEnclosingType();
+                    }
+                } else if (enclTr.hasTag(ANNOTATED_TYPE)) {
+                    JCAnnotatedType at = (JCTree.JCAnnotatedType) enclTr;
+                    if (enclTy == null ||
+                            enclTy.hasTag(NONE)) {
+                        if (at.getAnnotations().size() == 1) {
+                            log.error(at.underlyingType.pos(), "cant.type.annotate.scoping.1", at.getAnnotations().head.attribute);
+                        } else {
+                            ListBuffer<Attribute.Compound> comps = new ListBuffer<Attribute.Compound>();
+                            for (JCAnnotation an : at.getAnnotations()) {
+                                comps.add(an.attribute);
+                            }
+                            log.error(at.underlyingType.pos(), "cant.type.annotate.scoping", comps.toList());
+                        }
+                        repeat = false;
+                    }
+                    enclTr = at.underlyingType;
+                    // enclTy doesn't need to be changed
+                } else if (enclTr.hasTag(IDENT)) {
+                    repeat = false;
+                } else if (enclTr.hasTag(JCTree.Tag.WILDCARD)) {
+                    JCWildcard wc = (JCWildcard) enclTr;
+                    if (wc.getKind() == JCTree.Kind.EXTENDS_WILDCARD) {
+                        validateAnnotatedType(wc.getBound(), ((WildcardType)enclTy.unannotatedType()).getExtendsBound());
+                    } else if (wc.getKind() == JCTree.Kind.SUPER_WILDCARD) {
+                        validateAnnotatedType(wc.getBound(), ((WildcardType)enclTy.unannotatedType()).getSuperBound());
+                    } else {
+                        // Nothing to do for UNBOUND
+                    }
+                    repeat = false;
+                } else if (enclTr.hasTag(TYPEARRAY)) {
+                    JCArrayTypeTree art = (JCArrayTypeTree) enclTr;
+                    validateAnnotatedType(art.getType(), ((ArrayType)enclTy.unannotatedType()).getComponentType());
+                    repeat = false;
+                } else if (enclTr.hasTag(TYPEUNION)) {
+                    JCTypeUnion ut = (JCTypeUnion) enclTr;
+                    for (JCTree t : ut.getTypeAlternatives()) {
+                        validateAnnotatedType(t, t.type);
+                    }
+                    repeat = false;
+                } else if (enclTr.hasTag(TYPEINTERSECTION)) {
+                    JCTypeIntersection it = (JCTypeIntersection) enclTr;
+                    for (JCTree t : it.getBounds()) {
+                        validateAnnotatedType(t, t.type);
+                    }
+                    repeat = false;
+                } else if (enclTr.getKind() == JCTree.Kind.PRIMITIVE_TYPE) {
+                    // This happens in test TargetTypeTest52.java
+                    // Is there anything to do?
+                    repeat = false;
+                } else {
+                    Assert.error("Unexpected tree: " + enclTr + " with kind: " + enclTr.getKind() +
+                            " within: "+ errtree + " with kind: " + errtree.getKind());
+                }
             }
         }
     };
--- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Oct 28 18:30:14 2013 -0400
@@ -30,6 +30,7 @@
 import javax.tools.JavaFileManager;
 
 import com.sun.tools.javac.code.*;
+import com.sun.tools.javac.code.Attribute.Compound;
 import com.sun.tools.javac.jvm.*;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.util.*;
@@ -527,7 +528,7 @@
             inferenceContext.addFreeTypeListener(List.of(req), new FreeTypeListener() {
                 @Override
                 public void typesInferred(InferenceContext inferenceContext) {
-                    checkType(pos, found, inferenceContext.asInstType(req), checkContext);
+                    checkType(pos, inferenceContext.asInstType(found), inferenceContext.asInstType(req), checkContext);
                 }
             });
         }
@@ -706,6 +707,37 @@
         return t;
     }
 
+    // Analog of checkClassType that calls checkClassOrArrayType instead
+    Type checkClassOrArrayType(DiagnosticPosition pos,
+                               Type t, boolean noBounds) {
+        t = checkClassOrArrayType(pos, t);
+        if (noBounds && t.isParameterized()) {
+            List<Type> args = t.getTypeArguments();
+            while (args.nonEmpty()) {
+                if (args.head.hasTag(WILDCARD))
+                    return typeTagError(pos,
+                                        diags.fragment("type.req.exact"),
+                                        args.head);
+                args = args.tail;
+            }
+        }
+        return t;
+    }
+
+    /** Check that type is a reifiable class, interface or array type.
+     *  @param pos           Position to be used for error reporting.
+     *  @param t             The type to be checked.
+     */
+    Type checkReifiableReferenceType(DiagnosticPosition pos, Type t) {
+        t = checkClassOrArrayType(pos, t);
+        if (!t.isErroneous() && !types.isReifiable(t)) {
+            log.error(pos, "illegal.generic.type.for.instof");
+            return types.createErrorType(t);
+        } else {
+            return t;
+        }
+    }
+
     /** Check that type is a reference type, i.e. a class, interface or array type
      *  or a type variable.
      *  @param pos           Position to be used for error reporting.
@@ -1920,7 +1952,7 @@
      *                      for errors.
      *  @param m            The overriding method.
      */
-    void checkOverride(JCTree tree, MethodSymbol m) {
+    void checkOverride(JCMethodDecl tree, MethodSymbol m) {
         ClassSymbol origin = (ClassSymbol)m.owner;
         if ((origin.flags() & ENUM) != 0 && names.finalize.equals(m.name))
             if (m.overrides(syms.enumFinalFinalize, origin, types, false)) {
@@ -1936,6 +1968,17 @@
                 checkOverride(tree, t2, origin, m);
             }
         }
+
+        if (m.attribute(syms.overrideType.tsym) != null && !isOverrider(m)) {
+            DiagnosticPosition pos = tree.pos();
+            for (JCAnnotation a : tree.getModifiers().annotations) {
+                if (a.annotationType.type.tsym == syms.overrideType.tsym) {
+                    pos = a.pos();
+                    break;
+                }
+            }
+            log.error(pos, "method.does.not.override.superclass");
+        }
     }
 
     void checkOverride(JCTree tree, Type site, ClassSymbol origin, MethodSymbol m) {
@@ -2210,6 +2253,9 @@
             seen = seen.prepend(tv);
             for (Type b : types.getBounds(tv))
                 checkNonCyclic1(pos, b, seen);
+        } else if (t.hasTag(ARRAY)) {
+            final ArrayType at = (ArrayType)t.unannotatedType();
+            checkNonCyclic1(pos, at.elemtype, seen);
         }
     }
 
@@ -2353,13 +2399,28 @@
          ClashFilter cf = new ClashFilter(site);
         //for each method m1 that is overridden (directly or indirectly)
         //by method 'sym' in 'site'...
+
+        List<MethodSymbol> potentiallyAmbiguousList = List.nil();
+        boolean overridesAny = false;
         for (Symbol m1 : types.membersClosure(site, false).getElementsByName(sym.name, cf)) {
-             if (!sym.overrides(m1, site.tsym, types, false)) {
-                 checkPotentiallyAmbiguousOverloads(pos, site, sym, (MethodSymbol)m1);
-                 continue;
-             }
-             //...check each method m2 that is a member of 'site'
-             for (Symbol m2 : types.membersClosure(site, false).getElementsByName(sym.name, cf)) {
+            if (!sym.overrides(m1, site.tsym, types, false)) {
+                if (m1 == sym) {
+                    continue;
+                }
+
+                if (!overridesAny) {
+                    potentiallyAmbiguousList = potentiallyAmbiguousList.prepend((MethodSymbol)m1);
+                }
+                continue;
+            }
+
+            if (m1 != sym) {
+                overridesAny = true;
+                potentiallyAmbiguousList = List.nil();
+            }
+
+            //...check each method m2 that is a member of 'site'
+            for (Symbol m2 : types.membersClosure(site, false).getElementsByName(sym.name, cf)) {
                 if (m2 == m1) continue;
                 //if (i) the signature of 'sym' is not a subsignature of m1 (seen as
                 //a member of 'site') and (ii) m1 has the same erasure as m2, issue an error
@@ -2378,10 +2439,14 @@
                 }
             }
         }
+
+        if (!overridesAny) {
+            for (MethodSymbol m: potentiallyAmbiguousList) {
+                checkPotentiallyAmbiguousOverloads(pos, site, sym, m);
+            }
+        }
     }
 
-
-
     /** Check that all static methods accessible from 'site' are
      *  mutually compatible (JLS 8.4.8).
      *
@@ -2691,20 +2756,11 @@
         if (!annotationApplicable(a, s))
             log.error(a.pos(), "annotation.type.not.applicable");
 
-        if (a.annotationType.type.tsym == syms.overrideType.tsym) {
-            if (!isOverrider(s))
-                log.error(a.pos(), "method.does.not.override.superclass");
-        }
-
         if (a.annotationType.type.tsym == syms.functionalInterfaceType.tsym) {
             if (s.kind != TYP) {
                 log.error(a.pos(), "bad.functional.intf.anno");
-            } else {
-                try {
-                    types.findDescriptorSymbol((TypeSymbol)s);
-                } catch (Types.FunctionDescriptorLookupError ex) {
-                    log.error(a.pos(), "bad.functional.intf.anno.1", ex.getDiagnostic());
-                }
+            } else if (!s.isInterface() || (s.flags() & ANNOTATION) != 0) {
+                log.error(a.pos(), "bad.functional.intf.anno.1", diags.fragment("not.a.functional.intf", s));
             }
         }
     }
@@ -2713,8 +2769,11 @@
         Assert.checkNonNull(a.type, "annotation tree hasn't been attributed yet: " + a);
         validateAnnotationTree(a);
 
-        if (!isTypeAnnotation(a, isTypeParameter))
+        if (a.hasTag(TYPE_ANNOTATION) &&
+                !a.annotationType.type.isErroneous() &&
+                !isTypeAnnotation(a, isTypeParameter)) {
             log.error(a.pos(), "annotation.type.not.applicable");
+        }
     }
 
     /**
@@ -2919,7 +2978,7 @@
         return false;
     }
 
-    /** Is the annotation applicable to type annotations? */
+    /** Is the annotation applicable to types? */
     protected boolean isTypeAnnotation(JCAnnotation a, boolean isTypeParameter) {
         Attribute.Compound atTarget =
             a.annotationType.type.tsym.attribute(syms.annotationTargetType.tsym);
@@ -2952,7 +3011,6 @@
     boolean annotationApplicable(JCAnnotation a, Symbol s) {
         Attribute.Array arr = getAttributeTargetAttribute(a.annotationType.type.tsym);
         Name[] targets;
-
         if (arr == null) {
             targets = defaultTargetMetaInfo(a, s);
         } else {
@@ -2969,7 +3027,7 @@
         }
         for (Name target : targets) {
             if (target == names.TYPE)
-                { if (s.kind == TYP) return true; }
+                { if (s.kind == TYP && !s.isAnonymous()) return true; }
             else if (target == names.FIELD)
                 { if (s.kind == VAR && s.owner.kind != MTH) return true; }
             else if (target == names.METHOD)
@@ -3386,15 +3444,14 @@
                 sym.name != names.error &&
                 (!staticImport || !e.isStaticallyImported())) {
                 if (!e.sym.type.isErroneous()) {
-                    String what = e.sym.toString();
                     if (!isClassDecl) {
                         if (staticImport)
-                            log.error(pos, "already.defined.static.single.import", what);
+                            log.error(pos, "already.defined.static.single.import", e.sym);
                         else
-                        log.error(pos, "already.defined.single.import", what);
+                        log.error(pos, "already.defined.single.import", e.sym);
                     }
                     else if (sym != e.sym)
-                        log.error(pos, "already.defined.this.unit", what);
+                        log.error(pos, "already.defined.this.unit", e.sym);
                 }
                 return false;
             }
@@ -3474,4 +3531,23 @@
     public Warner convertWarner(DiagnosticPosition pos, Type found, Type expected) {
         return new ConversionWarner(pos, "unchecked.assign", found, expected);
     }
+
+    public void checkFunctionalInterface(JCClassDecl tree, ClassSymbol cs) {
+        Compound functionalType = cs.attribute(syms.functionalInterfaceType.tsym);
+
+        if (functionalType != null) {
+            try {
+                types.findDescriptorSymbol((TypeSymbol)cs);
+            } catch (Types.FunctionDescriptorLookupError ex) {
+                DiagnosticPosition pos = tree.pos();
+                for (JCAnnotation a : tree.getModifiers().annotations) {
+                    if (a.annotationType.type.tsym == syms.functionalInterfaceType.tsym) {
+                        pos = a.pos();
+                        break;
+                    }
+                }
+                log.error(pos, "bad.functional.intf.anno.1", ex.getDiagnostic());
+            }
+        }
+    }
 }
--- a/src/share/classes/com/sun/tools/javac/comp/Flow.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Flow.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1718,9 +1718,9 @@
             if (tree.body == null) {
                 return;
             }
-            /*  MemberEnter can generate synthetic methods, ignore them
+            /*  Ignore synthetic methods, except for translated lambda methods.
              */
-            if ((tree.sym.flags() & SYNTHETIC) != 0) {
+            if ((tree.sym.flags() & (SYNTHETIC | LAMBDA_METHOD)) == SYNTHETIC) {
                 return;
             }
 
@@ -1795,7 +1795,7 @@
         protected void initParam(JCVariableDecl def) {
             inits.incl(def.sym.adr);
             uninits.excl(def.sym.adr);
-        }
+            }
 
         public void visitVarDef(JCVariableDecl tree) {
             boolean track = trackable(tree.sym);
--- a/src/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1048,6 +1048,41 @@
             };
             return g.nodes.get(0);
         }
+
+        boolean isSubtype(Type s, Type t, Warner warn, Infer infer) {
+            return doIncorporationOp(IncorporationBinaryOpKind.IS_SUBTYPE, s, t, warn, infer);
+        }
+
+        boolean isSameType(Type s, Type t, Infer infer) {
+            return doIncorporationOp(IncorporationBinaryOpKind.IS_SAME_TYPE, s, t, null, infer);
+        }
+
+        void addBound(InferenceBound ib, UndetVar uv, Type b, Infer infer) {
+            doIncorporationOp(opFor(ib), uv, b, null, infer);
+        }
+
+        IncorporationBinaryOpKind opFor(InferenceBound boundKind) {
+            switch (boundKind) {
+                case EQ:
+                    return IncorporationBinaryOpKind.ADD_EQ_BOUND;
+                case LOWER:
+                    return IncorporationBinaryOpKind.ADD_LOWER_BOUND;
+                case UPPER:
+                    return IncorporationBinaryOpKind.ADD_UPPER_BOUND;
+                default:
+                    Assert.error("Can't get here!");
+                    return null;
+            }
+        }
+
+        boolean doIncorporationOp(IncorporationBinaryOpKind opKind, Type op1, Type op2, Warner warn, Infer infer) {
+            IncorporationBinaryOp newOp = infer.new IncorporationBinaryOp(opKind, op1, op2);
+            Boolean res = infer.incorporationCache.get(newOp);
+            if (res == null) {
+                infer.incorporationCache.put(newOp, res = newOp.apply(warn));
+            }
+            return res;
+        }
     }
 
     /**
@@ -1173,7 +1208,7 @@
         THROWS(InferenceBound.UPPER) {
             @Override
             public boolean accepts(UndetVar t, InferenceContext inferenceContext) {
-                if (t.isCaptured() || (t.qtype.tsym.flags() & Flags.THROWS) == 0) {
+                if ((t.qtype.tsym.flags() & Flags.THROWS) == 0) {
                     //not a throws undet var
                     return false;
                 }
@@ -1733,9 +1768,11 @@
                 public Type apply(Type t) {
                     if (t.hasTag(TYPEVAR)) {
                         TypeVar tv = (TypeVar)t;
-                        return tv.isCaptured() ?
-                                new CapturedUndetVar((CapturedType)tv, types) :
-                                new UndetVar(tv, types);
+                        if (tv.isCaptured()) {
+                            return new CapturedUndetVar((CapturedType)tv, types);
+                        } else {
+                            return new UndetVar(tv, types);
+                        }
                     } else {
                         return t.map(this);
                     }
--- a/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,6 +48,7 @@
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 import com.sun.source.tree.MemberReferenceTree.ReferenceMode;
 
+import java.util.EnumMap;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -68,6 +69,7 @@
  */
 public class LambdaToMethod extends TreeTranslator {
 
+    private Attr attr;
     private JCDiagnostic.Factory diags;
     private Log log;
     private Lower lower;
@@ -91,10 +93,7 @@
     /** info about the current class being processed */
     private KlassInfo kInfo;
 
-    /** for testing purposes force all lambdas to take a serializable form */
-    private boolean forceSerializableRepresentation;
-
-	/** dump statistics about lambda code generation */
+    /** dump statistics about lambda code generation */
     private boolean dumpLambdaToMethodStats;
 
     /** Flag for alternate metafactories indicating the lambda object is intended to be serializable */
@@ -106,6 +105,35 @@
     /** Flag for alternate metafactories indicating the lambda object requires multiple bridges */
     public static final int FLAG_BRIDGES = 1 << 2;
 
+    // <editor-fold defaultstate="collapsed" desc="Instantiating">
+    protected static final Context.Key<LambdaToMethod> unlambdaKey =
+            new Context.Key<LambdaToMethod>();
+
+    public static LambdaToMethod instance(Context context) {
+        LambdaToMethod instance = context.get(unlambdaKey);
+        if (instance == null) {
+            instance = new LambdaToMethod(context);
+        }
+        return instance;
+    }
+    private LambdaToMethod(Context context) {
+        context.put(unlambdaKey, this);
+        diags = JCDiagnostic.Factory.instance(context);
+        log = Log.instance(context);
+        lower = Lower.instance(context);
+        names = Names.instance(context);
+        syms = Symtab.instance(context);
+        rs = Resolve.instance(context);
+        make = TreeMaker.instance(context);
+        types = Types.instance(context);
+        transTypes = TransTypes.instance(context);
+        analyzer = new LambdaAnalyzerPreprocessor();
+        Options options = Options.instance(context);
+        dumpLambdaToMethodStats = options.isSet("dumpLambdaToMethodStats");
+        attr = Attr.instance(context);
+    }
+    // </editor-fold>
+
     private class KlassInfo {
 
         /**
@@ -128,13 +156,15 @@
          */
         private final VarSymbol deserParamSym;
 
-        private KlassInfo(Symbol kSym) {
+        private final JCClassDecl clazz;
+
+        private KlassInfo(JCClassDecl clazz) {
+            this.clazz = clazz;
             appendedMethodList = new ListBuffer<>();
             deserializeCases = new HashMap<String, ListBuffer<JCStatement>>();
-            long flags = PRIVATE | STATIC | SYNTHETIC;
             MethodType type = new MethodType(List.of(syms.serializedLambdaType), syms.objectType,
                     List.<Type>nil(), syms.methodClass);
-            deserMethodSym = makeSyntheticMethod(flags, names.deserializeLambda, type, kSym);
+            deserMethodSym = makePrivateSyntheticMethod(STATIC, names.deserializeLambda, type, clazz.sym);
             deserParamSym = new VarSymbol(FINAL, names.fromString("lambda"),
                     syms.serializedLambdaType, deserMethodSym);
         }
@@ -144,38 +174,6 @@
         }
     }
 
-    // <editor-fold defaultstate="collapsed" desc="Instantiating">
-    private static final Context.Key<LambdaToMethod> unlambdaKey =
-            new Context.Key<LambdaToMethod>();
-
-    public static LambdaToMethod instance(Context context) {
-        LambdaToMethod instance = context.get(unlambdaKey);
-        if (instance == null) {
-            instance = new LambdaToMethod(context);
-        }
-        return instance;
-    }
-
-    private Attr attr;
-
-    private LambdaToMethod(Context context) {
-        diags = JCDiagnostic.Factory.instance(context);
-        log = Log.instance(context);
-        lower = Lower.instance(context);
-        names = Names.instance(context);
-        syms = Symtab.instance(context);
-        rs = Resolve.instance(context);
-        make = TreeMaker.instance(context);
-        types = Types.instance(context);
-        transTypes = TransTypes.instance(context);
-        // forceSerializableRepresentation = true;
-        analyzer = new LambdaAnalyzerPreprocessor();
-        Options options = Options.instance(context);
-        dumpLambdaToMethodStats = options.isSet("dumpLambdaToMethodStats");
-        attr = Attr.instance(context);
-    }
-    // </editor-fold>
-
     // <editor-fold defaultstate="collapsed" desc="translate methods">
     @Override
     public <T extends JCTree> T translate(T tree) {
@@ -226,10 +224,16 @@
         }
         KlassInfo prevKlassInfo = kInfo;
         try {
-            kInfo = new KlassInfo(tree.sym);
+            kInfo = new KlassInfo(tree);
             super.visitClassDef(tree);
             if (!kInfo.deserializeCases.isEmpty()) {
-                kInfo.addMethod(makeDeserializeMethod(tree.sym));
+                int prevPos = make.pos;
+                try {
+                    make.at(tree);
+                    kInfo.addMethod(makeDeserializeMethod(tree.sym));
+                } finally {
+                    make.at(prevPos);
+                }
             }
             //add all translated instance methods here
             List<JCTree> newMethods = kInfo.appendedMethodList.toList();
@@ -405,26 +409,21 @@
         if (context == null || !analyzer.lambdaIdentSymbolFilter(tree.sym)) {
             super.visitIdent(tree);
         } else {
-            LambdaTranslationContext lambdaContext = (LambdaTranslationContext) context;
-            if (lambdaContext.getSymbolMap(PARAM).containsKey(tree.sym)) {
-                Symbol translatedSym = lambdaContext.getSymbolMap(PARAM).get(tree.sym);
-                result = make.Ident(translatedSym).setType(tree.type);
-                translatedSym.setTypeAttributes(tree.sym.getRawTypeAttributes());
-            } else if (lambdaContext.getSymbolMap(LOCAL_VAR).containsKey(tree.sym)) {
-                Symbol translatedSym = lambdaContext.getSymbolMap(LOCAL_VAR).get(tree.sym);
-                result = make.Ident(translatedSym).setType(tree.type);
-                translatedSym.setTypeAttributes(tree.sym.getRawTypeAttributes());
-            } else if (lambdaContext.getSymbolMap(TYPE_VAR).containsKey(tree.sym)) {
-                Symbol translatedSym = lambdaContext.getSymbolMap(TYPE_VAR).get(tree.sym);
-                result = make.Ident(translatedSym).setType(translatedSym.type);
-                translatedSym.setTypeAttributes(tree.sym.getRawTypeAttributes());
-            } else if (lambdaContext.getSymbolMap(CAPTURED_VAR).containsKey(tree.sym)) {
-                Symbol translatedSym = lambdaContext.getSymbolMap(CAPTURED_VAR).get(tree.sym);
-                result = make.Ident(translatedSym).setType(tree.type);
-            } else {
-                //access to untranslated symbols (i.e. compile-time constants,
-                //members defined inside the lambda body, etc.) )
-                super.visitIdent(tree);
+            int prevPos = make.pos;
+            try {
+                make.at(tree);
+
+                LambdaTranslationContext lambdaContext = (LambdaTranslationContext) context;
+                JCTree ltree = lambdaContext.translate(tree);
+                if (ltree != null) {
+                    result = ltree;
+                } else {
+                    //access to untranslated symbols (i.e. compile-time constants,
+                    //members defined inside the lambda body, etc.) )
+                    super.visitIdent(tree);
+                }
+            } finally {
+                make.at(prevPos);
             }
         }
     }
@@ -434,11 +433,21 @@
         LambdaTranslationContext lambdaContext = (LambdaTranslationContext)context;
         if (context != null && lambdaContext.getSymbolMap(LOCAL_VAR).containsKey(tree.sym)) {
             JCExpression init = translate(tree.init);
-            result = make.VarDef((VarSymbol)lambdaContext.getSymbolMap(LOCAL_VAR).get(tree.sym), init);
+            int prevPos = make.pos;
+            try {
+                result = make.at(tree).VarDef((VarSymbol)lambdaContext.getSymbolMap(LOCAL_VAR).get(tree.sym), init);
+            } finally {
+                make.at(prevPos);
+            }
         } else if (context != null && lambdaContext.getSymbolMap(TYPE_VAR).containsKey(tree.sym)) {
             JCExpression init = translate(tree.init);
             VarSymbol xsym = (VarSymbol)lambdaContext.getSymbolMap(TYPE_VAR).get(tree.sym);
-            result = make.VarDef(xsym, init);
+            int prevPos = make.pos;
+            try {
+                result = make.at(tree).VarDef(xsym, init);
+            } finally {
+                make.at(prevPos);
+            }
             // Replace the entered symbol for this variable
             Scope sc = tree.sym.owner.members();
             if (sc != null) {
@@ -465,23 +474,28 @@
         boolean isLambda_void = expr.type.hasTag(VOID);
         boolean isTarget_void = restype.hasTag(VOID);
         boolean isTarget_Void = types.isSameType(restype, types.boxedClass(syms.voidType).type);
-        if (isTarget_void) {
-            //target is void:
-            // BODY;
-            JCStatement stat = make.Exec(expr);
-            return make.Block(0, List.<JCStatement>of(stat));
-        } else if (isLambda_void && isTarget_Void) {
-            //void to Void conversion:
-            // BODY; return null;
-            ListBuffer<JCStatement> stats = new ListBuffer<>();
-            stats.append(make.Exec(expr));
-            stats.append(make.Return(make.Literal(BOT, null).setType(syms.botType)));
-            return make.Block(0, stats.toList());
-        } else {
-            //non-void to non-void conversion:
-            // return (TYPE)BODY;
-            JCExpression retExpr = transTypes.coerce(attrEnv, expr, restype);
-            return make.at(retExpr).Block(0, List.<JCStatement>of(make.Return(retExpr)));
+        int prevPos = make.pos;
+        try {
+            if (isTarget_void) {
+                //target is void:
+                // BODY;
+                JCStatement stat = make.at(expr).Exec(expr);
+                return make.Block(0, List.<JCStatement>of(stat));
+            } else if (isLambda_void && isTarget_Void) {
+                //void to Void conversion:
+                // BODY; return null;
+                ListBuffer<JCStatement> stats = new ListBuffer<>();
+                stats.append(make.at(expr).Exec(expr));
+                stats.append(make.Return(make.Literal(BOT, null).setType(syms.botType)));
+                return make.Block(0, stats.toList());
+            } else {
+                //non-void to non-void conversion:
+                // return (TYPE)BODY;
+                JCExpression retExpr = transTypes.coerce(attrEnv, expr, restype);
+                return make.at(retExpr).Block(0, List.<JCStatement>of(make.Return(retExpr)));
+            }
+        } finally {
+            make.at(prevPos);
         }
     }
 
@@ -675,8 +689,8 @@
     /**
      * Create new synthetic method with given flags, name, type, owner
      */
-    private MethodSymbol makeSyntheticMethod(long flags, Name name, Type type, Symbol owner) {
-        return new MethodSymbol(flags | SYNTHETIC, name, type, owner);
+    private MethodSymbol makePrivateSyntheticMethod(long flags, Name name, Type type, Symbol owner) {
+        return new MethodSymbol(flags | SYNTHETIC | PRIVATE, name, type, owner);
     }
 
     /**
@@ -983,8 +997,14 @@
                 }
             }
             if (context.isSerializable()) {
-                addDeserializationCase(refKind, refSym, tree.type, samSym,
-                        tree, staticArgs, indyType);
+                int prevPos = make.pos;
+                try {
+                    make.at(kInfo.clazz);
+                    addDeserializationCase(refKind, refSym, tree.type, samSym,
+                            tree, staticArgs, indyType);
+                } finally {
+                    make.at(prevPos);
+                }
             }
         }
 
@@ -1071,12 +1091,12 @@
         } else {
             if (refSym.isStatic()) {
                 return ClassFile.REF_invokeStatic;
+            } else if ((refSym.flags() & PRIVATE) != 0) {
+                return ClassFile.REF_invokeSpecial;
             } else if (refSym.enclClass().isInterface()) {
                 return ClassFile.REF_invokeInterface;
             } else {
-                return (refSym.flags() & PRIVATE) != 0 ?
-                        ClassFile.REF_invokeSpecial :
-                        ClassFile.REF_invokeVirtual;
+                return ClassFile.REF_invokeVirtual;
             }
         }
     }
@@ -1104,7 +1124,7 @@
          * generate unambiguous names for serializable lambdas)
          */
         private class SyntheticMethodNameCounter {
-            private Map<String, Integer> map = new HashMap<String, Integer>();
+            private Map<String, Integer> map = new HashMap<>();
             int getIndex(StringBuilder buf) {
                 String temp = buf.toString();
                 Integer count = map.get(temp);
@@ -1333,7 +1353,9 @@
                 ListBuffer<JCVariableDecl> paramBuff = new ListBuffer<JCVariableDecl>();
                 int i = 0;
                 for (List<Type> l = ptypes; l.nonEmpty(); l = l.tail) {
-                    paramBuff.append(make.Param(make.paramName(i++), l.head, owner));
+                    JCVariableDecl param = make.Param(make.paramName(i++), l.head, owner);
+                    param.sym.pos = tree.pos;
+                    paramBuff.append(param);
                 }
                 List<JCVariableDecl> params = paramBuff.toList();
 
@@ -1453,7 +1475,7 @@
                 //static clinits are generated in Gen - so we need to fake them
                 Symbol clinit = clinits.get(csym);
                 if (clinit == null) {
-                    clinit = makeSyntheticMethod(STATIC,
+                    clinit = makePrivateSyntheticMethod(STATIC,
                             names.clinit,
                             new MethodType(List.<Type>nil(), syms.voidType, List.<Type>nil(), syms.methodClass),
                             csym);
@@ -1655,9 +1677,6 @@
 
             /** does this functional expression require serialization support? */
             boolean isSerializable() {
-                if (forceSerializableRepresentation) {
-                    return true;
-                }
                 for (Type target : tree.targets) {
                     if (types.asSuper(target, syms.serializableType.tsym) != null) {
                         return true;
@@ -1665,7 +1684,7 @@
                 }
                 return false;
             }
-            
+
             /**
              * @return Name of the enclosing method to be folded into synthetic
              * method name
@@ -1673,9 +1692,9 @@
             String enclosingMethodName() {
                 return syntheticMethodNameComponent(owner.name);
             }
-            
+
             /**
-             * @return Method name in a form that can be folded into a 
+             * @return Method name in a form that can be folded into a
              * component of a synthetic method name
              */
             String syntheticMethodNameComponent(Name name) {
@@ -1700,29 +1719,16 @@
          */
         private class LambdaTranslationContext extends TranslationContext<JCLambda> {
 
-            /** variable declaration in the enclosing context to which this lambda is assigned */
+            /** variable in the enclosing context to which this lambda is assigned */
             final Symbol self;
 
             /** variable in the enclosing context to which this lambda is assigned */
             final Symbol assignedTo;
 
-            /** map from original to translated lambda parameters */
-            final Map<Symbol, Symbol> lambdaParams = new LinkedHashMap<Symbol, Symbol>();
-
-            /** map from original to translated lambda locals */
-            final Map<Symbol, Symbol> lambdaLocals = new LinkedHashMap<Symbol, Symbol>();
-
-            /** map from variables in enclosing scope to translated synthetic parameters */
-            final Map<Symbol, Symbol> capturedLocals  = new LinkedHashMap<Symbol, Symbol>();
-
-            /** map from class symbols to translated synthetic parameters (for captured member access) */
-            final Map<Symbol, Symbol> capturedThis = new LinkedHashMap<Symbol, Symbol>();
-
-            /** map from original to translated lambda locals */
-            final Map<Symbol, Symbol> typeVars = new LinkedHashMap<Symbol, Symbol>();
+            Map<LambdaSymbolKind, Map<Symbol, Symbol>> translatedSymbols;
 
             /** the synthetic symbol for the method hoisting the translated lambda */
-            final Symbol translatedSym;
+            Symbol translatedSym;
 
             List<JCVariableDecl> syntheticParams;
 
@@ -1740,17 +1746,24 @@
                     default:
                         assignedTo = self = null;
                         break;
-                }
-                
+                 }
+
                 // This symbol will be filled-in in complete
-                this.translatedSym = makeSyntheticMethod(0, null, null, owner.enclClass());
-                
+                this.translatedSym = makePrivateSyntheticMethod(0, null, null, owner.enclClass());
+
                 if (dumpLambdaToMethodStats) {
                     log.note(tree, "lambda.stat", needsAltMetafactory(), translatedSym);
                 }
+                translatedSymbols = new EnumMap<>(LambdaSymbolKind.class);
+
+                translatedSymbols.put(PARAM, new LinkedHashMap<Symbol, Symbol>());
+                translatedSymbols.put(LOCAL_VAR, new LinkedHashMap<Symbol, Symbol>());
+                translatedSymbols.put(CAPTURED_VAR, new LinkedHashMap<Symbol, Symbol>());
+                translatedSymbols.put(CAPTURED_THIS, new LinkedHashMap<Symbol, Symbol>());
+                translatedSymbols.put(TYPE_VAR, new LinkedHashMap<Symbol, Symbol>());
             }
 
-            /**
+             /**
              * For a serializable lambda, generate a disambiguating string
              * which maximizes stability across deserialization.
              *
@@ -1765,23 +1778,22 @@
                 // with this same method, so it will be unique and never be
                 // overloaded.
                 Assert.check(
-                        owner.type != null || 
+                        owner.type != null ||
                         directlyEnclosingLambda() != null);
                 if (owner.type != null) {
                     buf.append(typeSig(owner.type));
                     buf.append(":");
                 }
-                
+
                 // Add target type info
                 buf.append(types.findDescriptorSymbol(tree.type.tsym).owner.flatName());
                 buf.append(" ");
-                
+
                 // Add variable assigned to
                 if (assignedTo != null) {
                     buf.append(assignedTo.flatName());
                     buf.append("=");
                 }
-                
                 //add captured locals info: type, name, order
                 for (Symbol fv : getSymbolMap(CAPTURED_VAR).keySet()) {
                     if (fv != self) {
@@ -1816,7 +1828,7 @@
                 // Append the name of the method enclosing the lambda.
                 buf.append(enclosingMethodName());
                 buf.append('$');
-                // Append a hash of the disambiguating string : enclosing method 
+                // Append a hash of the disambiguating string : enclosing method
                 // signature, etc.
                 String disam = serializedLambdaDisambiguation();
                 buf.append(Integer.toHexString(disam.hashCode()));
@@ -1850,7 +1862,7 @@
                         ((VarSymbol)ret).pos = ((VarSymbol)sym).pos;
                         break;
                     case CAPTURED_VAR:
-                        ret = new VarSymbol(SYNTHETIC | FINAL, name, types.erasure(sym.type), translatedSym) {
+                        ret = new VarSymbol(SYNTHETIC | FINAL | PARAMETER, name, types.erasure(sym.type), translatedSym) {
                             @Override
                             public Symbol baseSymbol() {
                                 //keep mapping with original captured symbol
@@ -1858,8 +1870,17 @@
                             }
                         };
                         break;
+                    case LOCAL_VAR:
+                        ret = new VarSymbol(FINAL, name, types.erasure(sym.type), translatedSym);
+                        ((VarSymbol) ret).pos = ((VarSymbol) sym).pos;
+                        break;
+                    case PARAM:
+                        ret = new VarSymbol(FINAL | PARAMETER, name, types.erasure(sym.type), translatedSym);
+                        ((VarSymbol) ret).pos = ((VarSymbol) sym).pos;
+                        break;
                     default:
                         ret = makeSyntheticVar(FINAL, name, types.erasure(sym.type), translatedSym);
+                        ((VarSymbol) ret).pos = ((VarSymbol) sym).pos;
                 }
                 if (ret != sym) {
                     ret.setDeclarationAttributes(sym.getRawAttributes());
@@ -1869,27 +1890,22 @@
             }
 
             void addSymbol(Symbol sym, LambdaSymbolKind skind) {
-                Map<Symbol, Symbol> transMap = null;
+                Map<Symbol, Symbol> transMap = getSymbolMap(skind);
                 Name preferredName;
                 switch (skind) {
                     case CAPTURED_THIS:
-                        transMap = capturedThis;
-                        preferredName = names.fromString("encl$" + capturedThis.size());
+                        preferredName = names.fromString("encl$" + transMap.size());
                         break;
                     case CAPTURED_VAR:
-                        transMap = capturedLocals;
-                        preferredName = names.fromString("cap$" + capturedLocals.size());
+                        preferredName = names.fromString("cap$" + transMap.size());
                         break;
                     case LOCAL_VAR:
-                        transMap = lambdaLocals;
                         preferredName = sym.name;
                         break;
                     case PARAM:
-                        transMap = lambdaParams;
                         preferredName = sym.name;
                         break;
                     case TYPE_VAR:
-                        transMap = typeVars;
                         preferredName = sym.name;
                         break;
                     default: throw new AssertionError();
@@ -1899,29 +1915,22 @@
                 }
             }
 
-            Map<Symbol, Symbol> getSymbolMap(LambdaSymbolKind... skinds) {
-                LinkedHashMap<Symbol, Symbol> translationMap = new LinkedHashMap<Symbol, Symbol>();
-                for (LambdaSymbolKind skind : skinds) {
-                    switch (skind) {
-                        case CAPTURED_THIS:
-                            translationMap.putAll(capturedThis);
-                            break;
-                        case CAPTURED_VAR:
-                            translationMap.putAll(capturedLocals);
-                            break;
-                        case LOCAL_VAR:
-                            translationMap.putAll(lambdaLocals);
-                            break;
-                        case PARAM:
-                            translationMap.putAll(lambdaParams);
-                            break;
-                        case TYPE_VAR:
-                            translationMap.putAll(typeVars);
-                            break;
-                        default: throw new AssertionError();
+            Map<Symbol, Symbol> getSymbolMap(LambdaSymbolKind skind) {
+                Map<Symbol, Symbol> m = translatedSymbols.get(skind);
+                Assert.checkNonNull(m);
+                return m;
+            }
+
+            JCTree translate(JCIdent lambdaIdent) {
+                for (Map<Symbol, Symbol> m : translatedSymbols.values()) {
+                    if (m.containsKey(lambdaIdent.sym)) {
+                        Symbol tSym = m.get(lambdaIdent.sym);
+                        JCTree t = make.Ident(tSym).setType(lambdaIdent.type);
+                        tSym.setTypeAttributes(lambdaIdent.sym.getRawTypeAttributes());
+                        return t;
                     }
                 }
-                return translationMap;
+                return null;
             }
 
             /**
@@ -1939,9 +1948,9 @@
 
                 // If instance access isn't needed, make it static.
                 // Interface instance methods must be default methods.
-                // Awaiting VM channges, default methods are public
-                translatedSym.flags_field = SYNTHETIC |
-                        ((inInterface && thisReferenced)? PUBLIC : PRIVATE) |
+                // Lambda methods are private synthetic.
+                translatedSym.flags_field = SYNTHETIC | LAMBDA_METHOD |
+                        PRIVATE |
                         (thisReferenced? (inInterface? DEFAULT : 0) : STATIC);
 
                 //compute synthetic params
@@ -1952,17 +1961,19 @@
                 //
                 // 1) reference to enclosing contexts captured by the lambda expression
                 // 2) enclosing locals captured by the lambda expression
-                for (Symbol thisSym : getSymbolMap(CAPTURED_VAR, PARAM).values()) {
+                for (Symbol thisSym : getSymbolMap(CAPTURED_VAR).values()) {
                     params.append(make.VarDef((VarSymbol) thisSym, null));
                 }
-
+                for (Symbol thisSym : getSymbolMap(PARAM).values()) {
+                    params.append(make.VarDef((VarSymbol) thisSym, null));
+                }
                 syntheticParams = params.toList();
 
                 // Compute and set the lambda name
-                translatedSym.name = isSerializable() ? 
-                     serializedLambdaName()
-                   : lambdaName();
-                
+                translatedSym.name = isSerializable()
+                        ? serializedLambdaName()
+                        : lambdaName();
+
                 //prepend synthetic args to translated lambda method signature
                 translatedSym.type = types.createMethodTypeWithParameters(
                         generatedLambdaSig(),
@@ -1989,7 +2000,7 @@
                 super(tree);
                 this.isSuper = tree.hasKind(ReferenceKind.SUPER);
                 this.bridgeSym = needsBridge()
-                        ? makeSyntheticMethod(isSuper ? 0 : STATIC,
+                        ? makePrivateSyntheticMethod(isSuper ? 0 : STATIC,
                                               referenceBridgeName(), null,
                                               owner.enclClass())
                         : null;
@@ -2004,13 +2015,15 @@
              * Get the opcode associated with this method reference
              */
             int referenceKind() {
-                return LambdaToMethod.this.referenceKind(needsBridge() ? bridgeSym : tree.sym);
+                return LambdaToMethod.this.referenceKind(needsBridge()
+                        ? bridgeSym
+                        : tree.sym);
             }
 
             boolean needsVarArgsConversion() {
                 return tree.varargsElement != null;
             }
-            
+
             /**
              * Generate a disambiguating string to increase stability (important
              * if serialized)
@@ -2020,21 +2033,21 @@
             private String referenceBridgeDisambiguation() {
                 StringBuilder buf = new StringBuilder();
                 // Append the enclosing method signature to differentiate
-                // overloaded enclosing methods.  
+                // overloaded enclosing methods.
                 if (owner.type != null) {
                     buf.append(typeSig(owner.type));
                     buf.append(":");
                 }
-                
+
                 // Append qualifier type
                 buf.append(classSig(tree.sym.owner.type));
-                
+
                 // Note static/instance
                 buf.append(tree.sym.isStatic()? " S " : " I ");
-                
+
                 // Append referenced signature
                 buf.append(typeSig(tree.sym.erasure(types)));
-                
+
                 return buf.toString();
             }
 
@@ -2047,7 +2060,7 @@
                 StringBuilder buf = new StringBuilder();
                 // Append lambda ID, this is semantically significant
                 buf.append(names.lambda);
-                // Note that it is a method reference brdieg
+                // Note that it is a method reference bridge
                 buf.append("MR$");
                 // Append the enclosing method name
                 buf.append(enclosingMethodName());
@@ -2055,7 +2068,7 @@
                 // Append the referenced method name
                 buf.append(syntheticMethodNameComponent(tree.sym.name));
                 buf.append('$');
-                // Append a hash of the disambiguating string : enclosing method 
+                // Append a hash of the disambiguating string : enclosing method
                 // signature, etc.
                 String disam = referenceBridgeDisambiguation();
                 buf.append(Integer.toHexString(disam.hashCode()));
@@ -2064,7 +2077,6 @@
                 // a count based on the above name components.
                 buf.append(syntheticMethodNameCounts.getIndex(buf));
                 String result = buf.toString();
-                //System.err.printf("referenceBridgeName: %s -- %s\n", result, disam);
                 return names.fromString(result);
             }
 
@@ -2075,13 +2087,6 @@
                 return tree.sym.owner == syms.arrayClass;
             }
 
-            boolean isPrivateConstructor() {
-                //hack needed to workaround 292 bug (8005122)
-                //when 292 issue is fixed we should simply remove this
-                return tree.sym.name == names.init &&
-                        (tree.sym.flags() & PRIVATE) != 0;
-            }
-
             boolean receiverAccessible() {
                 //hack needed to workaround 292 bug (7087658)
                 //when 292 issue is fixed we should remove this and change the backend
@@ -2090,12 +2095,24 @@
             }
 
             /**
+             * The VM does not support access across nested classes (8010319).
+             * Were that ever to change, this should be removed.
+             */
+            boolean isPrivateInOtherClass() {
+                return  (tree.sym.flags() & PRIVATE) != 0 &&
+                        !types.isSameType(
+                              types.erasure(tree.sym.enclClass().asType()),
+                              types.erasure(owner.enclClass().asType()));
+            }
+
+            /**
              * Does this reference needs a bridge (i.e. var args need to be
              * expanded or "super" is used)
              */
             final boolean needsBridge() {
                 return isSuper || needsVarArgsConversion() || isArrayOp() ||
-                        isPrivateConstructor() || !receiverAccessible();
+                        isPrivateInOtherClass() ||
+                        !receiverAccessible();
             }
 
             Type generatedRefSig() {
@@ -2109,12 +2126,16 @@
     }
     // </editor-fold>
 
+    /*
+     * These keys provide mappings for various translated lambda symbols
+     * and the prevailing order must be maintained.
+     */
     enum LambdaSymbolKind {
-        CAPTURED_VAR,
-        CAPTURED_THIS,
-        LOCAL_VAR,
-        PARAM,
-        TYPE_VAR;
+        PARAM,          // original to translated lambda parameters
+        LOCAL_VAR,      // original to translated lambda locals
+        CAPTURED_VAR,   // variables in enclosing scope to translated synthetic parameters
+        CAPTURED_THIS,  // class symbols to translated synthetic parameters (for captured member access)
+        TYPE_VAR;       // original to translated lambda type variables
     }
 
     /**
--- a/src/share/classes/com/sun/tools/javac/comp/Lower.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java	Mon Oct 28 18:30:14 2013 -0400
@@ -2172,6 +2172,18 @@
  * Code for enabling/disabling assertions.
  *************************************************************************/
 
+    private ClassSymbol assertionsDisabledClassCache;
+
+    /**Used to create an auxiliary class to hold $assertionsDisabled for interfaces.
+     */
+    private ClassSymbol assertionsDisabledClass() {
+        if (assertionsDisabledClassCache != null) return assertionsDisabledClassCache;
+
+        assertionsDisabledClassCache = makeEmptyClass(STATIC | SYNTHETIC, outermostClassDef.sym).sym;
+
+        return assertionsDisabledClassCache;
+    }
+
     // This code is not particularly robust if the user has
     // previously declared a member named '$assertionsDisabled'.
     // The same faulty idiom also appears in the translation of
@@ -2182,8 +2194,9 @@
         // Outermost class may be either true class or an interface.
         ClassSymbol outermostClass = outermostClassDef.sym;
 
-        // note that this is a class, as an interface can't contain a statement.
-        ClassSymbol container = currentClass;
+        //only classes can hold a non-public field, look for a usable one:
+        ClassSymbol container = !currentClass.isInterface() ? currentClass :
+                assertionsDisabledClass();
 
         VarSymbol assertDisabledSym =
             (VarSymbol)lookupSynthetic(dollarAssertionsDisabled,
@@ -2208,6 +2221,16 @@
             JCVariableDecl assertDisabledDef = make.VarDef(assertDisabledSym,
                                                    notStatus);
             containerDef.defs = containerDef.defs.prepend(assertDisabledDef);
+
+            if (currentClass.isInterface()) {
+                //need to load the assertions enabled/disabled state while
+                //initializing the interface:
+                JCClassDecl currentClassDef = classDef(currentClass);
+                make_at(currentClassDef.pos());
+                JCStatement dummy = make.If(make.QualIdent(assertDisabledSym), make.Skip(), null);
+                JCBlock clinit = make.Block(STATIC, List.<JCStatement>of(dummy));
+                currentClassDef.defs = currentClassDef.defs.prepend(clinit);
+            }
         }
         make_at(pos);
         return makeUnary(NOT, make.Ident(assertDisabledSym));
@@ -2811,20 +2834,9 @@
         tree.underlyingType = translate(tree.underlyingType);
         // but maintain type annotations in the type.
         if (tree.type.isAnnotated()) {
-            if (tree.underlyingType.type.isAnnotated()) {
-                // The erasure of a type variable might be annotated.
-                // Merge all annotations.
-                AnnotatedType newat = (AnnotatedType) tree.underlyingType.type;
-                AnnotatedType at = (AnnotatedType) tree.type;
-                at.underlyingType = newat.underlyingType;
-                newat.typeAnnotations = at.typeAnnotations.appendList(newat.typeAnnotations);
-                tree.type = newat;
-            } else {
-                // Create a new AnnotatedType to have the correct tag.
-                AnnotatedType oldat = (AnnotatedType) tree.type;
-                tree.type = new AnnotatedType(tree.underlyingType.type);
-                ((AnnotatedType) tree.type).typeAnnotations = oldat.typeAnnotations;
-            }
+            tree.type = tree.underlyingType.type.unannotatedType().annotatedType(tree.type.getAnnotationMirrors());
+        } else if (tree.underlyingType.type.isAnnotated()) {
+            tree.type = tree.underlyingType.type;
         }
         result = tree;
     }
@@ -3929,6 +3941,7 @@
             accessConstrTags = null;
             accessed = null;
             enumSwitchMap.clear();
+            assertionsDisabledClassCache = null;
         }
         return translated.toList();
     }
--- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -114,12 +114,15 @@
         deferredLintHandler = DeferredLintHandler.instance(context);
         lint = Lint.instance(context);
         allowTypeAnnos = source.allowTypeAnnotations();
+        allowRepeatedAnnos = source.allowRepeatedAnnotations();
     }
 
     /** Switch: support type annotations.
      */
     boolean allowTypeAnnos;
 
+    boolean allowRepeatedAnnos;
+
     /** A queue for classes whose members still need to be entered into the
      *  symbol table.
      */
@@ -199,7 +202,7 @@
         }.importFrom(tsym);
 
         // enter non-types before annotations that might use them
-        annotate.earlier(new Annotate.Annotator() {
+        annotate.earlier(new Annotate.Worker() {
             Set<Symbol> processed = new HashSet<Symbol>();
 
             public String toString() {
@@ -225,7 +228,7 @@
                     }
                 }
             }
-            public void enterAnnotation() {
+            public void run() {
                 importFrom(tsym);
             }
         });
@@ -293,7 +296,7 @@
         }.importFrom(tsym);
 
         // enter non-types before annotations that might use them
-        annotate.earlier(new Annotate.Annotator() {
+        annotate.earlier(new Annotate.Worker() {
             Set<Symbol> processed = new HashSet<Symbol>();
             boolean found = false;
 
@@ -323,7 +326,7 @@
                     }
                 }
             }
-            public void enterAnnotation() {
+            public void run() {
                 JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
                 try {
                     importFrom(tsym);
@@ -570,45 +573,51 @@
 
         Env<AttrContext> localEnv = methodEnv(tree, env);
 
-        DiagnosticPosition prevLintPos = deferredLintHandler.setPos(tree.pos());
+        annotate.enterStart();
         try {
-            // Compute the method type
-            m.type = signature(m, tree.typarams, tree.params,
-                               tree.restype, tree.recvparam,
-                               tree.thrown,
-                               localEnv);
-        } finally {
-            deferredLintHandler.setPos(prevLintPos);
-        }
+            DiagnosticPosition prevLintPos = deferredLintHandler.setPos(tree.pos());
+            try {
+                // Compute the method type
+                m.type = signature(m, tree.typarams, tree.params,
+                                   tree.restype, tree.recvparam,
+                                   tree.thrown,
+                                   localEnv);
+            } finally {
+                deferredLintHandler.setPos(prevLintPos);
+            }
 
-        if (types.isSignaturePolymorphic(m)) {
-            m.flags_field |= SIGNATURE_POLYMORPHIC;
-        }
+            if (types.isSignaturePolymorphic(m)) {
+                m.flags_field |= SIGNATURE_POLYMORPHIC;
+            }
 
-        // Set m.params
-        ListBuffer<VarSymbol> params = new ListBuffer<VarSymbol>();
-        JCVariableDecl lastParam = null;
-        for (List<JCVariableDecl> l = tree.params; l.nonEmpty(); l = l.tail) {
-            JCVariableDecl param = lastParam = l.head;
-            params.append(Assert.checkNonNull(param.sym));
-        }
-        m.params = params.toList();
+            // Set m.params
+            ListBuffer<VarSymbol> params = new ListBuffer<VarSymbol>();
+            JCVariableDecl lastParam = null;
+            for (List<JCVariableDecl> l = tree.params; l.nonEmpty(); l = l.tail) {
+                JCVariableDecl param = lastParam = l.head;
+                params.append(Assert.checkNonNull(param.sym));
+            }
+            m.params = params.toList();
+
+            // mark the method varargs, if necessary
+            if (lastParam != null && (lastParam.mods.flags & Flags.VARARGS) != 0)
+                m.flags_field |= Flags.VARARGS;
 
-        // mark the method varargs, if necessary
-        if (lastParam != null && (lastParam.mods.flags & Flags.VARARGS) != 0)
-            m.flags_field |= Flags.VARARGS;
+            localEnv.info.scope.leave();
+            if (chk.checkUnique(tree.pos(), m, enclScope)) {
+            enclScope.enter(m);
+            }
 
-        localEnv.info.scope.leave();
-        if (chk.checkUnique(tree.pos(), m, enclScope)) {
-            enclScope.enter(m);
+            annotateLater(tree.mods.annotations, localEnv, m, tree.pos());
+            // Visit the signature of the method. Note that
+            // TypeAnnotate doesn't descend into the body.
+            typeAnnotate(tree, localEnv, m, tree.pos());
+
+            if (tree.defaultValue != null)
+                annotateDefaultValueLater(tree.defaultValue, localEnv, m);
+        } finally {
+            annotate.enterDone();
         }
-        annotateLater(tree.mods.annotations, localEnv, m, tree.pos());
-        // Visit the signature of the method. Note that
-        // TypeAnnotate doesn't descend into the body.
-        typeAnnotate(tree, localEnv, m, tree.pos());
-
-        if (tree.defaultValue != null)
-            annotateDefaultValueLater(tree.defaultValue, localEnv, m);
     }
 
     /** Create a fresh environment for method bodies.
@@ -636,65 +645,68 @@
             localEnv.info.staticLevel++;
         }
         DiagnosticPosition prevLintPos = deferredLintHandler.setPos(tree.pos());
+        annotate.enterStart();
         try {
-            if (TreeInfo.isEnumInit(tree)) {
-                attr.attribIdentAsEnumType(localEnv, (JCIdent)tree.vartype);
-            } else {
-                // Make sure type annotations are processed.
-                // But we don't have a symbol to attach them to yet - use null.
-                typeAnnotate(tree.vartype, env, null, tree.pos());
-                attr.attribType(tree.vartype, localEnv);
-                if (tree.nameexpr != null) {
-                    attr.attribExpr(tree.nameexpr, localEnv);
-                    MethodSymbol m = localEnv.enclMethod.sym;
-                    if (m.isConstructor()) {
-                        Type outertype = m.owner.owner.type;
-                        if (outertype.hasTag(TypeTag.CLASS)) {
-                            checkType(tree.vartype, outertype, "incorrect.constructor.receiver.type");
-                            checkType(tree.nameexpr, outertype, "incorrect.constructor.receiver.name");
+            try {
+                if (TreeInfo.isEnumInit(tree)) {
+                    attr.attribIdentAsEnumType(localEnv, (JCIdent)tree.vartype);
+                } else {
+                    attr.attribType(tree.vartype, localEnv);
+                    if (tree.nameexpr != null) {
+                        attr.attribExpr(tree.nameexpr, localEnv);
+                        MethodSymbol m = localEnv.enclMethod.sym;
+                        if (m.isConstructor()) {
+                            Type outertype = m.owner.owner.type;
+                            if (outertype.hasTag(TypeTag.CLASS)) {
+                                checkType(tree.vartype, outertype, "incorrect.constructor.receiver.type");
+                                checkType(tree.nameexpr, outertype, "incorrect.constructor.receiver.name");
+                            } else {
+                                log.error(tree, "receiver.parameter.not.applicable.constructor.toplevel.class");
+                            }
                         } else {
-                            log.error(tree, "receiver.parameter.not.applicable.constructor.toplevel.class");
+                            checkType(tree.vartype, m.owner.type, "incorrect.receiver.type");
+                            checkType(tree.nameexpr, m.owner.type, "incorrect.receiver.name");
                         }
-                    } else {
-                        checkType(tree.vartype, m.owner.type, "incorrect.receiver.type");
-                        checkType(tree.nameexpr, m.owner.type, "incorrect.receiver.name");
                     }
                 }
+            } finally {
+                deferredLintHandler.setPos(prevLintPos);
+            }
+
+            if ((tree.mods.flags & VARARGS) != 0) {
+                //if we are entering a varargs parameter, we need to
+                //replace its type (a plain array type) with the more
+                //precise VarargsType --- we need to do it this way
+                //because varargs is represented in the tree as a
+                //modifier on the parameter declaration, and not as a
+                //distinct type of array node.
+                ArrayType atype = (ArrayType)tree.vartype.type.unannotatedType();
+                tree.vartype.type = atype.makeVarargs();
+            }
+            Scope enclScope = enter.enterScope(env);
+            VarSymbol v =
+                new VarSymbol(0, tree.name, tree.vartype.type, enclScope.owner);
+            v.flags_field = chk.checkFlags(tree.pos(), tree.mods.flags, v, tree);
+            tree.sym = v;
+            if (tree.init != null) {
+                v.flags_field |= HASINIT;
+                if ((v.flags_field & FINAL) != 0 &&
+                    needsLazyConstValue(tree.init)) {
+                    Env<AttrContext> initEnv = getInitEnv(tree, env);
+                    initEnv.info.enclVar = v;
+                    v.setLazyConstValue(initEnv(tree, initEnv), attr, tree);
+                }
             }
+            if (chk.checkUnique(tree.pos(), v, enclScope)) {
+                chk.checkTransparentVar(tree.pos(), v, enclScope);
+                enclScope.enter(v);
+            }
+            annotateLater(tree.mods.annotations, localEnv, v, tree.pos());
+            typeAnnotate(tree.vartype, env, v, tree.pos());
+            v.pos = tree.pos;
         } finally {
-            deferredLintHandler.setPos(prevLintPos);
-        }
-
-        if ((tree.mods.flags & VARARGS) != 0) {
-            //if we are entering a varargs parameter, we need to replace its type
-            //(a plain array type) with the more precise VarargsType --- we need
-            //to do it this way because varargs is represented in the tree as a modifier
-            //on the parameter declaration, and not as a distinct type of array node.
-            ArrayType atype = (ArrayType)tree.vartype.type.unannotatedType();
-            tree.vartype.type = atype.makeVarargs();
+            annotate.enterDone();
         }
-        Scope enclScope = enter.enterScope(env);
-        VarSymbol v =
-            new VarSymbol(0, tree.name, tree.vartype.type, enclScope.owner);
-        v.flags_field = chk.checkFlags(tree.pos(), tree.mods.flags, v, tree);
-        tree.sym = v;
-        if (tree.init != null) {
-            v.flags_field |= HASINIT;
-            if ((v.flags_field & FINAL) != 0 &&
-                needsLazyConstValue(tree.init)) {
-                Env<AttrContext> initEnv = getInitEnv(tree, env);
-                initEnv.info.enclVar = v;
-                v.setLazyConstValue(initEnv(tree, initEnv), attr, tree);
-            }
-        }
-        if (chk.checkUnique(tree.pos(), v, enclScope)) {
-            chk.checkTransparentVar(tree.pos(), v, enclScope);
-            enclScope.enter(v);
-        }
-        annotateLater(tree.mods.annotations, localEnv, v, tree.pos());
-        typeAnnotate(tree.vartype, env, v, tree.pos());
-        annotate.flush();
-        v.pos = tree.pos;
     }
     // where
     void checkType(JCTree tree, Type type, String diag) {
@@ -842,14 +854,14 @@
         if (s.kind != PCK) {
             s.resetAnnotations(); // mark Annotations as incomplete for now
         }
-        annotate.normal(new Annotate.Annotator() {
+        annotate.normal(new Annotate.Worker() {
                 @Override
                 public String toString() {
                     return "annotate " + annotations + " onto " + s + " in " + s.owner;
                 }
 
                 @Override
-                public void enterAnnotation() {
+                public void run() {
                     Assert.check(s.kind == PCK || s.annotationsPendingCompletion());
                     JavaFileObject prev = log.useSource(localEnv.toplevel.sourcefile);
                     DiagnosticPosition prevLintPos =
@@ -872,6 +884,18 @@
                     }
                 }
             });
+
+        annotate.validate(new Annotate.Worker() { //validate annotations
+            @Override
+            public void run() {
+                JavaFileObject prev = log.useSource(localEnv.toplevel.sourcefile);
+                try {
+                    chk.validateAnnotations(annotations, s);
+                } finally {
+                    log.useSource(prev);
+                }
+            }
+        });
     }
 
     /**
@@ -906,14 +930,14 @@
             }
 
             if (annotated.containsKey(a.type.tsym)) {
-                if (source.allowRepeatedAnnotations()) {
-                    ListBuffer<Attribute.Compound> l = annotated.get(a.type.tsym);
-                    l = l.append(c);
-                    annotated.put(a.type.tsym, l);
-                    pos.put(c, a.pos());
-                } else {
-                    log.error(a.pos(), "duplicate.annotation");
+                if (!allowRepeatedAnnos) {
+                    log.error(a.pos(), "repeatable.annotations.not.supported.in.source");
+                    allowRepeatedAnnos = true;
                 }
+                ListBuffer<Attribute.Compound> l = annotated.get(a.type.tsym);
+                l = l.append(c);
+                annotated.put(a.type.tsym, l);
+                pos.put(c, a.pos());
             } else {
                 annotated.put(a.type.tsym, ListBuffer.of(c));
                 pos.put(c, a.pos());
@@ -935,7 +959,7 @@
     void annotateDefaultValueLater(final JCExpression defaultValue,
                                    final Env<AttrContext> localEnv,
                                    final MethodSymbol m) {
-        annotate.normal(new Annotate.Annotator() {
+        annotate.normal(new Annotate.Worker() {
                 @Override
                 public String toString() {
                     return "annotate " + m.owner + "." +
@@ -943,7 +967,7 @@
                 }
 
                 @Override
-                public void enterAnnotation() {
+                public void run() {
                     JavaFileObject prev = log.useSource(localEnv.toplevel.sourcefile);
                     try {
                         enterDefaultValue(defaultValue, localEnv, m);
@@ -952,6 +976,19 @@
                     }
                 }
             });
+        annotate.validate(new Annotate.Worker() { //validate annotations
+            @Override
+            public void run() {
+                JavaFileObject prev = log.useSource(localEnv.toplevel.sourcefile);
+                try {
+                    // if default value is an annotation, check it is a well-formed
+                    // annotation value (e.g. no duplicate values, no missing values, etc.)
+                    chk.validateAnnotationTree(defaultValue);
+                } finally {
+                    log.useSource(prev);
+                }
+            }
+        });
     }
 
     /** Enter a default value for an attribute method. */
@@ -1081,7 +1118,6 @@
             // Do this here, where we have the symbol.
             for (JCTypeParameter tp : tree.typarams)
                 typeAnnotate(tp, baseEnv, sym, tree.pos());
-            annotate.flush();
 
             // Add default constructor if needed.
             if ((c.flags() & INTERFACE) == 0 &&
@@ -1159,15 +1195,17 @@
         if (wasFirst) {
             try {
                 while (halfcompleted.nonEmpty()) {
-                    finish(halfcompleted.next());
+                    Env<AttrContext> toFinish = halfcompleted.next();
+                    finish(toFinish);
+                    if (allowTypeAnnos) {
+                        typeAnnotations.organizeTypeAnnotationsSignatures(toFinish, (JCClassDecl)toFinish.tree);
+                        typeAnnotations.validateTypeAnnotationsSignatures(toFinish, (JCClassDecl)toFinish.tree);
+                    }
                 }
             } finally {
                 isFirst = true;
             }
         }
-        if (allowTypeAnnos) {
-            typeAnnotations.organizeTypeAnnotationsSignatures(env, tree);
-        }
     }
 
     /*
@@ -1197,7 +1235,7 @@
                     annotated.put(a.type.tsym, l);
                     pos.put(tc, a.pos());
                 } else {
-                    log.error(a.pos(), "duplicate.annotation");
+                    log.error(a.pos(), "repeatable.annotations.not.supported.in.source");
                 }
             } else {
                 annotated.put(a.type.tsym, ListBuffer.of(tc));
@@ -1239,13 +1277,13 @@
 
             final DiagnosticPosition deferPos = this.deferPos;
 
-            annotate.normal(new Annotate.Annotator() {
+            annotate.normal(new Annotate.Worker() {
                 @Override
                 public String toString() {
                     return "type annotate " + annotations + " onto " + sym + " in " + sym.owner;
                 }
                 @Override
-                public void enterAnnotation() {
+                public void run() {
                     JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
                     DiagnosticPosition prevLintPos = null;
 
@@ -1381,7 +1419,7 @@
         if (!t.hasTag(ERROR))
             return t;
 
-        return new ErrorType(((ErrorType) t).getOriginalType(), t.tsym) {
+        return new ErrorType(t.getOriginalType(), t.tsym) {
             private Type modelType;
 
             @Override
--- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Oct 28 18:30:14 2013 -0400
@@ -424,13 +424,14 @@
          */
         private
         boolean isProtectedAccessible(Symbol sym, ClassSymbol c, Type site) {
+            Type newSite = site.hasTag(TYPEVAR) ? site.getUpperBound() : site;
             while (c != null &&
                    !(c.isSubClass(sym.owner, types) &&
                      (c.flags() & INTERFACE) == 0 &&
                      // In JLS 2e 6.6.2.1, the subclass restriction applies
                      // only to instance fields and methods -- types are excluded
                      // regardless of whether they are declared 'static' or not.
-                     ((sym.flags() & STATIC) != 0 || sym.kind == TYP || site.tsym.isSubClass(c, types))))
+                     ((sym.flags() & STATIC) != 0 || sym.kind == TYP || newSite.tsym.isSubClass(c, types))))
                 c = c.owner.enclClass();
             return c != null;
         }
@@ -867,12 +868,6 @@
         }
     };
 
-    /** 
-     * This class handles method reference applicability checks; since during
-     * these checks it's sometime possible to have inference variables on
-     * the actual argument types list, the method applicability check must be
-     * extended so that inference variables are 'opened' as needed.
-     */
     class MethodReferenceCheck extends AbstractMethodCheck {
 
         InferenceContext pendingInferenceContext;
@@ -1006,7 +1001,7 @@
     class MostSpecificCheck implements MethodCheck {
 
         boolean strict;
-        List<Type> actuals;        Symbol other;
+        List<Type> actuals;
 
         MostSpecificCheck(boolean strict, List<Type> actuals) {
             this.strict = strict;
@@ -2716,11 +2711,6 @@
                                   InferenceContext inferenceContext) {
         MethodResolutionPhase maxPhase = boxingAllowed ? VARARITY : BASIC;
 
-        if (site.hasTag(TYPEVAR)) {
-            return resolveMemberReference(pos, env, referenceTree, site.getUpperBound(),
-                    name, argtypes, typeargtypes, boxingAllowed, methodCheck, inferenceContext);
-        }
-
         site = types.capture(site);
 
         ReferenceLookupHelper boundLookupHelper;
--- a/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Mon Oct 28 18:30:14 2013 -0400
@@ -29,7 +29,6 @@
 
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.code.Type.ForAll;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.util.*;
@@ -39,7 +38,6 @@
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.*;
 import static com.sun.tools.javac.code.TypeTag.CLASS;
-import static com.sun.tools.javac.code.TypeTag.FORALL;
 import static com.sun.tools.javac.code.TypeTag.TYPEVAR;
 import static com.sun.tools.javac.code.TypeTag.VOID;
 import static com.sun.tools.javac.comp.CompileStates.CompileState;
@@ -482,10 +480,6 @@
     /** Visitor argument: proto-type.
      */
     private Type pt;
-    
-    /** Visitor argument: additional synthetic functional interfaces.
-     */
-    private List<JCTree> bridgedFunctionalInterfaces;
 
     /** Visitor method: perform a type translation on tree.
      */
--- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1877,7 +1877,7 @@
         }
     }
 
-    class AnnotationDefaultCompleter extends AnnotationDeproxy implements Annotate.Annotator {
+    class AnnotationDefaultCompleter extends AnnotationDeproxy implements Annotate.Worker {
         final MethodSymbol sym;
         final Attribute value;
         final JavaFileObject classFile = currentClassFile;
@@ -1889,8 +1889,8 @@
             this.sym = sym;
             this.value = value;
         }
-        // implement Annotate.Annotator.enterAnnotation()
-        public void enterAnnotation() {
+        // implement Annotate.Worker.run()
+        public void run() {
             JavaFileObject previousClassFile = currentClassFile;
             try {
                 // Reset the interim value set earlier in
@@ -1904,7 +1904,7 @@
         }
     }
 
-    class AnnotationCompleter extends AnnotationDeproxy implements Annotate.Annotator {
+    class AnnotationCompleter extends AnnotationDeproxy implements Annotate.Worker {
         final Symbol sym;
         final List<CompoundAnnotationProxy> l;
         final JavaFileObject classFile;
@@ -1917,8 +1917,8 @@
             this.l = l;
             this.classFile = currentClassFile;
         }
-        // implement Annotate.Annotator.enterAnnotation()
-        public void enterAnnotation() {
+        // implement Annotate.Worker.run()
+        public void run() {
             JavaFileObject previousClassFile = currentClassFile;
             try {
                 currentClassFile = classFile;
@@ -1955,7 +1955,7 @@
         }
 
         @Override
-        public void enterAnnotation() {
+        public void run() {
             JavaFileObject previousClassFile = currentClassFile;
             try {
                 currentClassFile = classFile;
@@ -1993,11 +1993,15 @@
                 (flags & ABSTRACT) == 0 && !name.equals(names.clinit)) {
             if (majorVersion > Target.JDK1_8.majorVersion ||
                     (majorVersion == Target.JDK1_8.majorVersion && minorVersion >= Target.JDK1_8.minorVersion)) {
-                currentOwner.flags_field |= DEFAULT;
-                flags |= DEFAULT | ABSTRACT;
+                if ((flags & STATIC) == 0) {
+                    currentOwner.flags_field |= DEFAULT;
+                    flags |= DEFAULT | ABSTRACT;
+                }
             } else {
                 //protect against ill-formed classfiles
-                throw new CompletionFailure(currentOwner, "default method found in pre JDK 8 classfile");
+                throw badClassFile((flags & STATIC) == 0 ? "invalid.default.interface" : "invalid.static.interface",
+                                   Integer.toString(majorVersion),
+                                   Integer.toString(minorVersion));
             }
         }
         if (name == names.init && currentOwner.hasOuterInstance()) {
@@ -2401,8 +2405,6 @@
             return c;
     }
 
-    private boolean suppressFlush = false;
-
     /** Completion for classes to be loaded. Before a class is loaded
      *  we make sure its enclosing class (if any) is loaded.
      */
@@ -2410,13 +2412,14 @@
         if (sym.kind == TYP) {
             ClassSymbol c = (ClassSymbol)sym;
             c.members_field = new Scope.ErrorScope(c); // make sure it's always defined
-            boolean saveSuppressFlush = suppressFlush;
-            suppressFlush = true;
+            annotate.enterStart();
             try {
                 completeOwners(c.owner);
                 completeEnclosing(c);
             } finally {
-                suppressFlush = saveSuppressFlush;
+                // The flush needs to happen only after annotations
+                // are filled in.
+                annotate.enterDoneWithoutFlush();
             }
             fillIn(c);
         } else if (sym.kind == PCK) {
@@ -2427,7 +2430,7 @@
                 throw new CompletionFailure(sym, ex.getLocalizedMessage()).initCause(ex);
             }
         }
-        if (!filling && !suppressFlush)
+        if (!filling)
             annotate.flush(); // finish attaching annotations
     }
 
--- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Mon Oct 28 18:30:14 2013 -0400
@@ -104,6 +104,8 @@
      */
     private LVTRanges lvtRanges;
 
+    private final boolean typeAnnoAsserts;
+
     protected Gen(Context context) {
         context.put(genKey, this);
 
@@ -140,6 +142,7 @@
         debugCode = options.isSet("debugcode");
         allowInvokedynamic = target.hasInvokedynamic() || options.isSet("invokedynamic");
         pool = new Pool(types);
+        typeAnnoAsserts = options.isSet("TypeAnnotationAsserts");
 
         generateIproxies =
             target.requiresIproxy() ||
@@ -562,9 +565,13 @@
         ListBuffer<Attribute.TypeCompound> fieldTAs = new ListBuffer<Attribute.TypeCompound>();
         ListBuffer<Attribute.TypeCompound> nonfieldTAs = new ListBuffer<Attribute.TypeCompound>();
         for (TypeCompound ta : tas) {
-            if (ta.position.type == TargetType.FIELD) {
+            if (ta.getPosition().type == TargetType.FIELD) {
                 fieldTAs.add(ta);
             } else {
+                if (typeAnnoAsserts) {
+                    Assert.error("Type annotation does not have a valid positior");
+                }
+
                 nonfieldTAs.add(ta);
             }
         }
@@ -1645,9 +1652,10 @@
                                       startpc,  end, code.curCP(),
                                       catchType);
                         if (subCatch.type.isAnnotated()) {
-                            // All compounds share the same position, simply update the
-                            // first one.
-                            subCatch.type.getAnnotationMirrors().head.position.type_index = catchType;
+                            for (Attribute.TypeCompound tc :
+                                     subCatch.type.getAnnotationMirrors()) {
+                                tc.position.type_index = catchType;
+                            }
                         }
                     }
                     gaps = gaps.tail;
@@ -1661,9 +1669,10 @@
                                       startpc, endpc, code.curCP(),
                                       catchType);
                         if (subCatch.type.isAnnotated()) {
-                            // All compounds share the same position, simply update the
-                            // first one.
-                            subCatch.type.getAnnotationMirrors().head.position.type_index = catchType;
+                            for (Attribute.TypeCompound tc :
+                                     subCatch.type.getAnnotationMirrors()) {
+                                tc.position.type_index = catchType;
+                            }
                         }
                     }
                 }
@@ -2885,7 +2894,8 @@
 
         @Override
         public void visitMethodDef(JCMethodDecl tree) {
-            if ((tree.sym.flags() & (SYNTHETIC | GENERATEDCONSTR)) != 0) {
+            if ((tree.sym.flags() & (SYNTHETIC | GENERATEDCONSTR)) != 0
+                    && (tree.sym.flags() & LAMBDA_METHOD) == 0) {
                 return;
             }
             if (tree.name.equals(names.clinit)) {
@@ -2899,6 +2909,7 @@
                 return;
             }
             currentMethod = tree.sym;
+
             super.visitMethodDef(tree);
         }
 
--- a/src/share/classes/com/sun/tools/javac/jvm/Pool.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/Pool.java	Mon Oct 28 18:30:14 2013 -0400
@@ -296,7 +296,10 @@
                     interfaceOwner = true;
                     staticOk = true;
                 case ClassFile.REF_invokeVirtual:
+                    expectedKind = Kinds.MTH;
+                    break;
                 case ClassFile.REF_invokeSpecial:
+                    interfaceOwner = true;
                     expectedKind = Kinds.MTH;
                     break;
             }
--- a/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Mon Oct 28 18:30:14 2013 -0400
@@ -271,10 +271,6 @@
      */
     protected TransTypes transTypes;
 
-    /** The lambda translator.
-     */
-    protected LambdaToMethod lambdaToMethod;
-
     /** The syntactic sugar desweetener.
      */
     protected Lower lower;
@@ -388,8 +384,6 @@
 
         options = Options.instance(context);
 
-        lambdaToMethod = LambdaToMethod.instance(context);
-
         verbose       = options.isSet(VERBOSE);
         sourceOutput  = options.isSet(PRINTSOURCE); // used to be -s
         stubOutput    = options.isSet("-stubs");
@@ -1393,6 +1387,7 @@
          */
         class ScanNested extends TreeScanner {
             Set<Env<AttrContext>> dependencies = new LinkedHashSet<Env<AttrContext>>();
+            protected boolean hasLambdas;
             @Override
             public void visitClassDef(JCClassDecl node) {
                 Type st = types.supertype(node.sym.type);
@@ -1402,7 +1397,18 @@
                     Env<AttrContext> stEnv = enter.getEnv(c);
                     if (stEnv != null && env != stEnv) {
                         if (dependencies.add(stEnv)) {
-                            scan(stEnv.tree);
+                            boolean prevHasLambdas = hasLambdas;
+                            try {
+                                scan(stEnv.tree);
+                            } finally {
+                                /*
+                                 * ignore any updates to hasLambdas made during
+                                 * the nested scan, this ensures an initalized
+                                 * LambdaToMethod is available only to those
+                                 * classes that contain lambdas
+                                 */
+                                hasLambdas = prevHasLambdas;
+                            }
                         }
                         envForSuperTypeFound = true;
                     }
@@ -1410,6 +1416,16 @@
                 }
                 super.visitClassDef(node);
             }
+            @Override
+            public void visitLambda(JCLambda tree) {
+                hasLambdas = true;
+                super.visitLambda(tree);
+            }
+            @Override
+            public void visitReference(JCMemberReference tree) {
+                hasLambdas = true;
+                super.visitReference(tree);
+            }
         }
         ScanNested scanner = new ScanNested();
         scanner.scan(env.tree);
@@ -1468,11 +1484,11 @@
             env.tree = transTypes.translateTopLevelClass(env.tree, localMake);
             compileStates.put(env, CompileState.TRANSTYPES);
 
-            if (source.allowLambda()) {
+            if (source.allowLambda() && scanner.hasLambdas) {
                 if (shouldStop(CompileState.UNLAMBDA))
                     return;
 
-                env.tree = lambdaToMethod.translateTopLevelClass(env, env.tree, localMake);
+                env.tree = LambdaToMethod.instance(context).translateTopLevelClass(env, env.tree, localMake);
                 compileStates.put(env, CompileState.UNLAMBDA);
             }
 
@@ -1743,13 +1759,4 @@
         shouldStopPolicyIfError = prev.shouldStopPolicyIfError;
         shouldStopPolicyIfNoError = prev.shouldStopPolicyIfNoError;
     }
-
-    public static void enableLogging() {
-        Logger logger = Logger.getLogger(com.sun.tools.javac.Main.class.getPackage().getName());
-        logger.setLevel(Level.ALL);
-        for (Handler h : logger.getParent().getHandlers()) {
-            h.setLevel(Level.ALL);
-       }
-
-    }
 }
--- a/src/share/classes/com/sun/tools/javac/model/JavacAnnoConstructs.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,445 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, 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.javac.model;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.Inherited;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import com.sun.tools.javac.code.Attribute;
-import com.sun.tools.javac.code.Kinds;
-import com.sun.tools.javac.code.Symbol;
-import com.sun.tools.javac.code.Symbol.ClassSymbol;
-import com.sun.tools.javac.code.Symbol.TypeVariableSymbol;
-import com.sun.tools.javac.code.TargetType;
-import com.sun.tools.javac.code.Type;
-import com.sun.tools.javac.code.Type.AnnotatedType;
-import com.sun.tools.javac.util.ListBuffer;
-import static com.sun.tools.javac.code.TypeTag.CLASS;
-import com.sun.tools.javac.util.List;
-
-/**
- * Utility methods for operating on annotated constructs.
- *
- * <p><b>This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own
- * risk.  This code and its internal interfaces are subject to change
- * or deletion without notice.</b></p>
- */
-public class JavacAnnoConstructs {
-
-    // <editor-fold defaultstate="collapsed" desc="Symbols">
-
-    /**
-     * An internal-use utility that creates a runtime view of an
-     * annotation. This is the implementation of
-     * Element.getAnnotation(Class).
-     */
-    public static <A extends Annotation> A getAnnotation(Symbol annotated,
-                                                         Class<A> annoType) {
-        if (!annoType.isAnnotation())
-            throw new IllegalArgumentException("Not an annotation type: "
-                                               + annoType);
-        Attribute.Compound c;
-        if (annotated.kind == Kinds.TYP &&
-                annotated instanceof ClassSymbol) {
-            c = getAttributeOnClass((ClassSymbol)annotated, annoType);
-        } else if (annotated.kind == Kinds.TYP &&
-                   annotated instanceof TypeVariableSymbol) {
-            c = getAttributeOnTypeVariable((TypeVariableSymbol)annotated, annoType);
-        } else {
-            c = getAttribute(annotated, annoType);
-        }
-        return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType);
-    }
-
-    // Helper to getAnnotation[s]
-    private static <A extends Annotation> Attribute.Compound getAttribute(Symbol annotated,
-                                                                          Class<A> annoType) {
-        String name = annoType.getName();
-
-        for (Attribute.Compound anno : annotated.getRawAttributes()) {
-            if (name.equals(anno.type.tsym.flatName().toString()))
-                return anno;
-        }
-
-        return null;
-    }
-
-    // Helper to getAnnotation[s]
-    private static <A extends Annotation> Attribute.Compound
-            getAttributeOnTypeVariable(TypeVariableSymbol annotated, Class<A> annoType) {
-        String name = annoType.getName();
-
-        // Declaration annotations on type variables are stored in type attributes
-        // on the owner of the TypeVariableSymbol
-        List<Attribute.Compound> res = List.nil();
-        List<Attribute.TypeCompound> candidates = annotated.owner.getRawTypeAttributes();
-        for (Attribute.TypeCompound anno : candidates)
-            if (anno.position.type == TargetType.CLASS_TYPE_PARAMETER ||
-                    anno.position.type == TargetType.METHOD_TYPE_PARAMETER)
-                if (name.equals(anno.type.tsym.flatName().toString()))
-                    return anno;
-
-        return null;
-    }
-
-    // Helper to getAnnotation[s]
-    private static <A extends Annotation> Attribute.Compound getAttributeOnClass(
-            ClassSymbol annotated,
-            final Class<A> annoType)
-    {
-        boolean inherited = annoType.isAnnotationPresent(Inherited.class);
-        Attribute.Compound result = null;
-
-        result = getAttribute(annotated, annoType);
-        if (result != null || !inherited)
-            return result;
-
-        while ((annotated = nextSupertypeToSearch(annotated)) != null) {
-            result = getAttribute(annotated, annoType);
-            if (result != null)
-                return result;
-        }
-        return null; // no more supertypes to search
-    }
-
-    /**
-     * Returns the next type to search for inherited annotations or {@code null}
-     * if the next type can't be found.
-     */
-    private static ClassSymbol nextSupertypeToSearch(ClassSymbol annotated) {
-        if (annotated.name == annotated.name.table.names.java_lang_Object)
-            return null;
-
-        Type sup = annotated.getSuperclass();
-        if (!sup.hasTag(CLASS) || sup.isErroneous())
-            return null;
-
-        return (ClassSymbol) sup.tsym;
-    }
-
-    /**
-     * An internal-use utility that creates a runtime view of
-     * annotations. This is the implementation of
-     * Element.getAnnotations(Class).
-     */
-    public static <A extends Annotation> A[] getAnnotationsByType(Symbol annotated,
-            Class<A> annoType)
-    {
-        if (!annoType.isAnnotation())
-            throw new IllegalArgumentException("Not an annotation type: "
-                                               + annoType);
-        // If annoType does not declare a container this is equivalent to wrapping
-        // getAnnotation(...) in an array.
-        Class <? extends Annotation> containerType = getContainer(annoType);
-        if (containerType == null) {
-            A res = getAnnotation(annotated, annoType);
-            int size;
-            if (res == null) {
-                size = 0;
-            } else {
-                size = 1;
-            }
-            @SuppressWarnings("unchecked") // annoType is the Class for A
-            A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
-            if (res != null)
-                arr[0] = res;
-            return arr;
-        }
-
-        // So we have a containing type
-        String annoTypeName = annoType.getName();
-        String containerTypeName = containerType.getName();
-        int directIndex = -1, containerIndex = -1;
-        Attribute.Compound direct = null, container = null;
-        // Find directly (explicit or implicit) present annotations
-        int index = -1;
-        for (List<Attribute.Compound> list = annotated.getAnnotationMirrors();
-                !list.isEmpty();
-                list = list.tail) {
-            Attribute.Compound attribute = list.head;
-            index++;
-            if (attribute.type.tsym.flatName().contentEquals(annoTypeName)) {
-                directIndex = index;
-                direct = attribute;
-            } else if(containerTypeName != null &&
-                      attribute.type.tsym.flatName().contentEquals(containerTypeName)) {
-                containerIndex = index;
-                container = attribute;
-            }
-        }
-
-        // Deal with inherited annotations
-        if (direct == null && container == null) {
-            if (annotated.kind == Kinds.TYP &&
-                    (annotated instanceof ClassSymbol)) {
-                ClassSymbol s = nextSupertypeToSearch((ClassSymbol)annotated);
-                if (s != null)
-                    return getAnnotationsByType(s, annoType);
-            }
-        }
-
-        // Pack them in an array
-        Attribute[] contained0 = null;
-        if (container != null)
-            contained0 = unpackAttributes(container);
-        ListBuffer<Attribute.Compound> compounds = new ListBuffer<>();
-        if (contained0 != null) {
-            for (Attribute a : contained0)
-                if (a instanceof Attribute.Compound)
-                    compounds = compounds.append((Attribute.Compound)a);
-        }
-        Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[compounds.size()]);
-
-        int size = (direct == null ? 0 : 1) + contained.length;
-        @SuppressWarnings("unchecked") // annoType is the Class for A
-        A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
-
-        // if direct && container, which is first?
-        int insert = -1;
-        int length = arr.length;
-        if (directIndex >= 0 && containerIndex >= 0) {
-            if (directIndex < containerIndex) {
-                arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
-                insert = 1;
-            } else {
-                arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
-                insert = 0;
-                length--;
-            }
-        } else if (directIndex >= 0) {
-            arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
-            return arr;
-        } else {
-            // Only container
-            insert = 0;
-        }
-
-        for (int i = 0; i + insert < length; i++)
-            arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType);
-
-        return arr;
-    }
-
-    // </editor-fold>
-
-    // <editor-fold defaultstate="collapsed" desc="Types">
-
-    /**
-     * An internal-use utility that creates a runtime view of an
-     * annotation. This is the implementation of
-     * TypeMirror.getAnnotation(Class).
-     */
-    public static <A extends Annotation> A getAnnotation(AnnotatedType annotated, Class<A> annoType) {
-        if (!annoType.isAnnotation())
-            throw new IllegalArgumentException("Not an annotation type: "
-                                               + annoType);
-        Attribute.Compound c = getAttribute(annotated, annoType);
-        return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType);
-    }
-
-    // Helper to getAnnotation[s]
-    private static <A extends Annotation> Attribute.Compound getAttribute(Type annotated,
-                                                                          Class<A> annoType) {
-        String name = annoType.getName();
-
-        for (Attribute.Compound anno : annotated.getAnnotationMirrors()) {
-            if (name.equals(anno.type.tsym.flatName().toString()))
-                return anno;
-        }
-
-        return null;
-    }
-
-    /**
-     * An internal-use utility that creates a runtime view of
-     * annotations. This is the implementation of
-     * TypeMirror.getAnnotationsByType(Class).
-     */
-    public static <A extends Annotation> A[] getAnnotationsByType(AnnotatedType annotated, Class<A> annoType) {
-        if (!annoType.isAnnotation())
-            throw new IllegalArgumentException("Not an annotation type: "
-                                               + annoType);
-        // If annoType does not declare a container this is equivalent to wrapping
-        // getAnnotation(...) in an array.
-        Class <? extends Annotation> containerType = getContainer(annoType);
-        if (containerType == null) {
-            A res = getAnnotation(annotated, annoType);
-            int size;
-            if (res == null) {
-                size = 0;
-            } else {
-                size = 1;
-            }
-            @SuppressWarnings("unchecked") // annoType is the Class for A
-            A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
-            if (res != null)
-                arr[0] = res;
-            return arr;
-        }
-
-        // So we have a containing type
-        String annoTypeName = annoType.getName();
-        String containerTypeName = containerType.getName();
-        int directIndex = -1, containerIndex = -1;
-        Attribute.Compound direct = null, container = null;
-        // Find directly (explicit or implicit) present annotations
-        int index = -1;
-        for (List<? extends Attribute.Compound> list = annotated.getAnnotationMirrors();
-                !list.isEmpty();
-                list = list.tail) {
-            Attribute.Compound attribute = list.head;
-            index++;
-            if (attribute.type.tsym.flatName().contentEquals(annoTypeName)) {
-                directIndex = index;
-                direct = attribute;
-            } else if(containerTypeName != null &&
-                      attribute.type.tsym.flatName().contentEquals(containerTypeName)) {
-                containerIndex = index;
-                container = attribute;
-            }
-        }
-
-        // Pack them in an array
-        Attribute[] contained0 = null;
-        if (container != null)
-            contained0 = unpackAttributes(container);
-        ListBuffer<Attribute.Compound> compounds = new ListBuffer<>();
-        if (contained0 != null) {
-            for (Attribute a : contained0)
-                if (a instanceof Attribute.Compound)
-                    compounds = compounds.append((Attribute.Compound)a);
-        }
-        Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[compounds.size()]);
-
-        int size = (direct == null ? 0 : 1) + contained.length;
-        @SuppressWarnings("unchecked") // annoType is the Class for A
-        A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
-
-        // if direct && container, which is first?
-        int insert = -1;
-        int length = arr.length;
-        if (directIndex >= 0 && containerIndex >= 0) {
-            if (directIndex < containerIndex) {
-                arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
-                insert = 1;
-            } else {
-                arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
-                insert = 0;
-                length--;
-            }
-        } else if (directIndex >= 0) {
-            arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
-            return arr;
-        } else {
-            // Only container
-            insert = 0;
-        }
-
-        for (int i = 0; i + insert < length; i++)
-            arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType);
-
-        return arr;
-    }
-
-    // </editor-fold>
-
-    // <editor-fold defaultstate="collapsed" desc="Container support">
-
-    // Needed to unpack the runtime view of containing annotations
-    private static final Class<? extends Annotation> REPEATABLE_CLASS = initRepeatable();
-    private static final Method VALUE_ELEMENT_METHOD = initValueElementMethod();
-
-    private static Class<? extends Annotation> initRepeatable() {
-        try {
-            // Repeatable will not be available when bootstrapping on
-            // JDK 7 so use a reflective lookup instead of a class
-            // literal for Repeatable.class.
-            return Class.forName("java.lang.annotation.Repeatable").asSubclass(Annotation.class);
-        } catch (ClassNotFoundException e) {
-            return null;
-        } catch (SecurityException e) {
-            return null;
-        }
-    }
-
-    private static Method initValueElementMethod() {
-        if (REPEATABLE_CLASS == null)
-            return null;
-
-        Method m = null;
-        try {
-            m = REPEATABLE_CLASS.getMethod("value");
-            if (m != null)
-                m.setAccessible(true);
-            return m;
-        } catch (NoSuchMethodException e) {
-            return null;
-        }
-    }
-
-    // Helper to getAnnotations
-    private static Class<? extends Annotation> getContainer(Class<? extends Annotation> annoType) {
-        // Since we can not refer to java.lang.annotation.Repeatable until we are
-        // bootstrapping with java 8 we need to get the Repeatable annotation using
-        // reflective invocations instead of just using its type and element method.
-        if (REPEATABLE_CLASS != null &&
-            VALUE_ELEMENT_METHOD != null) {
-            // Get the Repeatable instance on the annotations declaration
-            Annotation repeatable = (Annotation)annoType.getAnnotation(REPEATABLE_CLASS);
-            if (repeatable != null) {
-                try {
-                    // Get the value element, it should be a class
-                    // indicating the containing annotation type
-                    @SuppressWarnings("unchecked")
-                    Class<? extends Annotation> containerType = (Class)VALUE_ELEMENT_METHOD.invoke(repeatable);
-                    if (containerType == null)
-                        return null;
-
-                    return containerType;
-                } catch (ClassCastException e) {
-                    return null;
-                } catch (IllegalAccessException e) {
-                    return null;
-                } catch (InvocationTargetException e ) {
-                    return null;
-                }
-            }
-        }
-        return null;
-    }
-
-    // Helper to getAnnotations
-    private static Attribute[] unpackAttributes(Attribute.Compound container) {
-        // We now have an instance of the container,
-        // unpack it returning an instance of the
-        // contained type or null
-        return ((Attribute.Array)container.member(container.type.tsym.name.table.names.value)).values;
-    }
-
-    // </editor-fold>
-}
--- a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Oct 28 18:30:14 2013 -0400
@@ -3002,8 +3002,9 @@
         int pos = token.pos;
         Name name;
         if (lambdaParameter && token.kind == UNDERSCORE) {
-            syntaxError(pos, "expected", IDENTIFIER);
+            log.error(pos, "underscore.as.identifier.in.lambda");
             name = token.name();
+            nextToken();
         } else {
             if (allowThisIdent) {
                 JCExpression pn = qualident(false);
--- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1034,6 +1034,13 @@
                 } else {
                     discoverAndRunProcs(context, annotationsPresent, topLevelClasses, packageInfoFiles);
                 }
+            } catch (Throwable t) {
+                // we're specifically expecting Abort here, but if any Throwable
+                // comes by, we should flush all deferred diagnostics, rather than
+                // drop them on the ground.
+                deferredDiagnosticHandler.reportDeferredDiagnostics();
+                log.popDiagnosticHandler(deferredDiagnosticHandler);
+                throw t;
             } finally {
                 if (!taskListener.isEmpty())
                     taskListener.finished(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING_ROUND));
--- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Oct 28 18:30:14 2013 -0400
@@ -78,26 +78,26 @@
 
 # 0: string
 compiler.err.already.defined.single.import=\
-    {0} is already defined in a single-type import
+    a type with the same simple name is already defined by the single-type-import of {0}
 
 # 0: string
 compiler.err.already.defined.static.single.import=\
-    {0} is already defined in a static single-type import
+    a type with the same simple name is already defined by the static single-type-import of {0}
 
 compiler.err.already.defined.this.unit=\
     {0} is already defined in this compilation unit
 
 # 0: type, 1: list of name
 compiler.err.annotation.missing.default.value=\
-    annotation {0} is missing value for the attribute {1}
+    annotation @{0} is missing a default value for the element ''{1}''
 
 # 0: type, 1: list of name
 compiler.err.annotation.missing.default.value.1=\
-    annotation {0} is missing values for attributes {1}
+    annotation @{0} is missing default values for elements {1}
 
 # 0: type
 compiler.err.annotation.not.valid.for.type=\
-    annotation not valid for a value of type {0}
+    annotation not valid for an element of type {0}
 
 compiler.err.annotation.type.not.applicable=\
     annotation type not applicable to this kind of declaration
@@ -135,7 +135,7 @@
     array required, but {0} found
 
 compiler.err.attribute.value.must.be.constant=\
-    attribute value must be constant
+    element value must be a constant expression
 
 # 0: statement type
 compiler.err.bad.initializer=\
@@ -298,8 +298,9 @@
 compiler.err.cyclic.inheritance=\
     cyclic inheritance involving {0}
 
+# 0: symbol
 compiler.err.cyclic.annotation.element=\
-    cyclic annotation element type
+    type of element {0} is cyclic
 
 # 0: unused
 compiler.err.call.to.super.not.allowed.in.enum.ctor=\
@@ -307,73 +308,70 @@
 
 # 0: type
 compiler.err.no.superclass=\
-    {0} has no superclass
+    {0} has no superclass.
 
 # 0: symbol, 1: type, 2: symbol, 3: type, 4: unused
 compiler.err.concrete.inheritance.conflict=\
     methods {0} from {1} and {2} from {3} are inherited with the same signature
 
 compiler.err.default.allowed.in.intf.annotation.member=\
-    default value only allowed in an @interface member
+    default value only allowed in an annotation type declaration
 
 # 0: symbol
 compiler.err.doesnt.exist=\
     package {0} does not exist
 
-compiler.err.duplicate.annotation=\
-    duplicate annotation
-
 # 0: type
 compiler.err.duplicate.annotation.invalid.repeated=\
-    annotation {0} cannot be repeated\nIt does not define a valid containing annotation.
+    annotation {0} is not a valid repeatable annotation
 
 # 0: name, 1: type
 compiler.err.duplicate.annotation.member.value=\
-    duplicate annotation member value {0} in {1}
-
-# 0: type, 1: type
+    duplicate element ''{0}'' in annotation @{1}.
+
+# 0: name, 1: unused
 compiler.err.duplicate.annotation.missing.container=\
-    duplicate annotation: the declaration of {0} does not have a valid {1} annotation
-
-# 0: type
+    {0} is not a repeatable annotation type
+
+# 0: type, 1: unused
 compiler.err.invalid.repeatable.annotation=\
-    duplicate annotation: {0} is annotated with an invalid Repeatable annotation
+    duplicate annotation: {0} is annotated with an invalid @Repeatable annotation
 
 # 0: symbol or type
 compiler.err.invalid.repeatable.annotation.no.value=\
-    duplicate annotation: {0} is not a valid Repeatable, no value element method declared
+    {0} is not a valid @Repeatable, no value element method declared
 
 # 0: type, 1: number
 compiler.err.invalid.repeatable.annotation.multiple.values=\
-    duplicate annotation: {0} is not a valid Repeatable, {1} value element methods declared
+    {0} is not a valid @Repeatable, {1} element methods named ''value'' declared
 
 # 0: type
 compiler.err.invalid.repeatable.annotation.invalid.value=\
-    duplicate annotation: {0} is not a valid Repeatable: invalid value element
-
-# 0: symbol type, 1: type, 2: type
+    {0} is not a valid @Repeatable: invalid value element
+
+# 0: symbol type, 1: unused, 2: type
 compiler.err.invalid.repeatable.annotation.value.return=\
-    duplicate annotation: value element of containing annotation {0} should have type {2}, found {1}
+    containing annotation type ({0}) must declare an element named ''value'' of type {2}
 
 # 0: symbol or type, 1: symbol
 compiler.err.invalid.repeatable.annotation.elem.nondefault=\
-    containing annotation {0} does not have a default value for element {1}
-
-# 0: symbol, 1: type, 2: symbol, 3: type
+    containing annotation type ({0}) does not have a default value for element {1}
+
+# 0: symbol, 1: unused, 2: symbol, 3: unused
 compiler.err.invalid.repeatable.annotation.retention=\
-    containing annotation {0} has shorter retention ({1}) than the contained annotation {2} with retention {3}
+    retention of containing annotation type ({0}) is shorter than the retention of repeatable annotation type ({2})
 
 # 0: symbol, 1: symbol
 compiler.err.invalid.repeatable.annotation.not.documented=\
-    containing annotation type, {0}, is not @Documented while repeated annotation type, {1}, is
+    repeatable annotation type ({1}) is @Documented while containing annotation type ({0}) is not
 
 # 0: symbol, 1: symbol
 compiler.err.invalid.repeatable.annotation.not.inherited=\
-    containing annotation type, {0}, is not @Inherited while repeated annotation type, {1}, is
+    repeatable annotation type ({1}) is @Inherited while containing annotation type ({0}) is not
 
 # 0: symbol, 1: symbol
 compiler.err.invalid.repeatable.annotation.incompatible.target=\
-    target of container annotation {0} is not a subset of target of repeated annotation {1}
+    containing annotation type ({0}) is applicable to more targets than repeatable annotation type ({1})
 
 # 0: symbol
 compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\
@@ -561,26 +559,31 @@
     integer number too large: {0}
 
 compiler.err.intf.annotation.members.cant.have.params=\
-    @interface members may not have parameters
-
+    elements in annotation type declarations cannot declare formal parameters
+
+# 0: symbol
 compiler.err.intf.annotation.cant.have.type.params=\
-    @interface may not have type parameters
+    annotation type {0} cannot be generic
 
 compiler.err.intf.annotation.members.cant.have.type.params=\
-    @interface members may not have type parameters
+    elements in annotation type declarations cannot be generic methods
 
 # 0: symbol, 1: type
 compiler.err.intf.annotation.member.clash=\
-    @interface member clashes with method ''{0}'' in {1}
+    annotation type {1} declares an element with the same name as method {0}
 
 compiler.err.intf.expected.here=\
     interface expected here
 
+compiler.err.intf.or.array.expected.here=\
+    interface or array type expected here
+
 compiler.err.intf.meth.cant.have.body=\
     interface abstract methods cannot have body
 
+# 0: symbol
 compiler.err.invalid.annotation.member.type=\
-    invalid type for annotation member
+    invalid type for element {0} of annotation type
 
 compiler.err.invalid.binary.number=\
     binary numbers must contain at least one binary digit
@@ -1699,6 +1702,7 @@
     cannot access {0}\n\
     {1}
 
+# 0: file name, 1: message segment
 compiler.misc.bad.class.file.header=\
     bad class file: {0}\n\
     {1}\n\
@@ -1744,6 +1748,14 @@
 compiler.misc.class.file.not.found=\
     class file for {0} not found
 
+# 0: classfile major version, 1: classfile minor version
+compiler.misc.invalid.default.interface=\
+    default method found in version {0}.{1} classfile
+
+# 0: classfile major version, 1: classfile minor version
+compiler.misc.invalid.static.interface=\
+    static method found in version {0}.{1} classfile
+
 # 0: name
 compiler.misc.file.doesnt.contain.class=\
     file does not contain class {0}
@@ -2224,6 +2236,10 @@
     ''_'' used as an identifier\n\
     (use of ''_'' as an identifier might not be supported in releases after Java SE 8)
 
+compiler.err.underscore.as.identifier.in.lambda=\
+    ''_'' used as an identifier\n\
+    (use of ''_'' as an identifier is forbidden for lambda parameters)
+
 compiler.err.enum.as.identifier=\
     as of release 5, ''enum'' is a keyword, and may not be used as an identifier\n\
     (use -source 1.4 or lower to use ''enum'' as an identifier)
@@ -2241,13 +2257,14 @@
     receiver parameter not applicable for constructor of top-level class
 
 # TODO 308: make a better error message
-compiler.err.cant.annotate.static.class=\
-    enclosing static nested class cannot be annotated
+# 0: symbol
+compiler.err.cant.type.annotate.scoping.1=\
+    scoping construct cannot be annotated with type-use annotation: {0}
 
 # TODO 308: make a better error message
-# 0: unused
-compiler.err.cant.annotate.nested.type=\
-    scoping construct for static nested type cannot be annotated
+# 0: list of symbol
+compiler.err.cant.type.annotate.scoping=\
+    scoping construct cannot be annotated with type-use annotations: {0}
 
 # 0: type, 1: type
 compiler.err.incorrect.receiver.name=\
@@ -2297,8 +2314,13 @@
 (use -source 8 or higher to enable type annotations)
 
 # 0: string
+compiler.err.repeatable.annotations.not.supported.in.source=\
+    repeated annotations are not supported in -source {0}\n\
+(use -source 8 or higher to enable repeated annotations)
+
+# 0: string
 compiler.err.foreach.not.supported.in.source=\
-    for-each loops are not supported in -source {0}\n\
+    enhanced for loops are not supported in -source {0}\n\
     (use -source 5 or higher to enable for-each loops)
 
 # 0: string
--- a/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java	Mon Oct 28 18:30:14 2013 -0400
@@ -107,15 +107,21 @@
             if (renv.processingOver())
                 createSymbols();
         } catch (IOException e) {
+            CharSequence msg = e.getLocalizedMessage();
+            if (msg == null)
+                msg = e.toString();
             processingEnv.getMessager()
-                .printMessage(Diagnostic.Kind.ERROR, e.getLocalizedMessage());
+                .printMessage(Diagnostic.Kind.ERROR, msg);
         } catch (Throwable t) {
             t.printStackTrace();
             Throwable cause = t.getCause();
             if (cause == null)
                 cause = t;
+            CharSequence msg = cause.getLocalizedMessage();
+            if (msg == null)
+                msg = cause.toString();
             processingEnv.getMessager()
-                .printMessage(Diagnostic.Kind.ERROR, cause.getLocalizedMessage());
+                .printMessage(Diagnostic.Kind.ERROR, msg);
         }
         return true;
     }
--- a/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -2359,6 +2359,7 @@
         public JCExpression underlyingType;
 
         protected JCAnnotatedType(List<JCAnnotation> annotations, JCExpression underlyingType) {
+            Assert.check(annotations != null && annotations.nonEmpty());
             this.annotations = annotations;
             this.underlyingType = underlyingType;
         }
--- a/src/share/classes/com/sun/tools/javac/tree/Pretty.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/tree/Pretty.java	Mon Oct 28 18:30:14 2013 -0400
@@ -782,9 +782,9 @@
     public void visitConditional(JCConditional tree) {
         try {
             open(prec, TreeInfo.condPrec);
-            printExpr(tree.cond, TreeInfo.condPrec);
+            printExpr(tree.cond, TreeInfo.condPrec + 1);
             print(" ? ");
-            printExpr(tree.truepart, TreeInfo.condPrec);
+            printExpr(tree.truepart);
             print(" : ");
             printExpr(tree.falsepart, TreeInfo.condPrec);
             close(prec, TreeInfo.condPrec);
--- a/src/share/classes/com/sun/tools/javac/util/JavacMessages.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/util/JavacMessages.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
@@ -184,19 +184,19 @@
                                              String key,
                                              Object... args) {
        String msg = null;
-        for (List<ResourceBundle> l = bundles; l.nonEmpty() && msg == null; l = l.tail) {
-            ResourceBundle rb = l.head;
-            try {
-                msg = rb.getString(key);
-            }
-            catch (MissingResourceException e) {
-                // ignore, try other bundles in list
-            }
-        }
-        if (msg == null) {
-            msg = "compiler message file broken: key=" + key +
-                " arguments={0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}";
-        }
-        return MessageFormat.format(msg, args);
+       for (List<ResourceBundle> l = bundles; l.nonEmpty() && msg == null; l = l.tail) {
+           ResourceBundle rb = l.head;
+           try {
+               msg = rb.getString(key);
+           }
+           catch (MissingResourceException e) {
+               // ignore, try other bundles in list
+           }
+       }
+       if (msg == null) {
+           msg = "compiler message file broken: key=" + key +
+               " arguments={0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}";
+       }
+       return MessageFormat.format(msg, args);
     }
 }
--- a/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -619,8 +619,10 @@
         Names names = tsym.name.table.names;
         List<MethodDocImpl> methods = List.nil();
         for (Scope.Entry e = tsym.members().elems; e != null; e = e.sibling) {
-            if (e.sym != null &&
-                e.sym.kind == Kinds.MTH && e.sym.name != names.init) {
+            if (e.sym != null
+                && e.sym.kind == Kinds.MTH
+                && e.sym.name != names.init
+                && e.sym.name != names.clinit) {
                 MethodSymbol s = (MethodSymbol)e.sym;
                 if (!filter || env.shouldDocument(s)) {
                     methods = methods.prepend(env.getMethodDoc(s));
--- a/src/share/classes/com/sun/tools/javadoc/DocEnv.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javadoc/DocEnv.java	Mon Oct 28 18:30:14 2013 -0400
@@ -800,7 +800,7 @@
         return result;
     }
 
-    void initDoclint(Collection<String> opts) {
+    void initDoclint(Collection<String> opts, Collection<String> customTagNames) {
         ArrayList<String> doclintOpts = new ArrayList<String>();
 
         for (String opt: opts) {
@@ -814,6 +814,15 @@
             return;
         }
 
+        String sep = "";
+        StringBuilder customTags = new StringBuilder();
+        for (String customTag : customTagNames) {
+            customTags.append(sep);
+            customTags.append(customTag);
+            sep = DocLint.TAGS_SEPARATOR;
+        }
+        doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags.toString());
+
         JavacTask t = BasicJavacTask.instance(context);
         doclint = new DocLint();
         // standard doclet normally generates H1, H2
--- a/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java	Mon Oct 28 18:30:14 2013 -0400
@@ -377,8 +377,8 @@
         return env.fileManager;
     }
 
-    public void initDocLint(Collection<String> opts) {
-        env.initDoclint(opts);
+    public void initDocLint(Collection<String> opts, Collection<String> customTagNames) {
+        env.initDoclint(opts, customTagNames);
     }
 
     public boolean showTagMessages() {
--- a/src/share/classes/com/sun/tools/javap/ClassWriter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/javap/ClassWriter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -232,6 +232,12 @@
                 return t.accept(this, new StringBuilder()).toString();
             }
 
+            String printTypeArgs(List<? extends TypeParamType> typeParamTypes) {
+                StringBuilder builder = new StringBuilder();
+                appendIfNotEmpty(builder, "<", typeParamTypes, "> ");
+                return builder.toString();
+            }
+
             public StringBuilder visitSimpleType(SimpleType type, StringBuilder sb) {
                 sb.append(getJavaName(type.name));
                 return sb;
@@ -438,7 +444,7 @@
 
         writeModifiers(flags.getMethodModifiers());
         if (methodType != null) {
-            writeListIfNotEmpty("<", methodType.typeParamTypes, "> ");
+            print(new JavaTypePrinter(false).printTypeArgs(methodType.typeParamTypes));
         }
         if (getName(m).equals("<init>")) {
             print(getJavaName(classFile));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/javap/package-info.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2007, 2013, 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.
+ */
+
+/**
+    Classes to dump class files in text format.
+
+    <p><b>This is NOT part of any supported API.
+    If you write code that depends on this, you do so at your own risk.
+    This code and its internal interfaces are subject to change or
+    deletion without notice.</b>
+*/
+@jdk.Exported(false)
+package com.sun.tools.javap;
--- a/src/share/classes/com/sun/tools/javap/package.html	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <title></title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-  </head>
-  <body>
-  Classes to dump class files in text format.
-  </body>
-</html>
--- a/src/share/classes/com/sun/tools/jdeps/Analyzer.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/jdeps/Analyzer.java	Mon Oct 28 18:30:14 2013 -0400
@@ -25,9 +25,8 @@
 package com.sun.tools.jdeps;
 
 import com.sun.tools.classfile.Dependency.Location;
-import java.util.ArrayList;
+import com.sun.tools.jdeps.PlatformClassPath.JDKArchive;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -52,8 +51,8 @@
     };
 
     private final Type type;
-    private final List<ArchiveDeps> results = new ArrayList<ArchiveDeps>();
-    private final Map<String, Archive> map = new HashMap<String, Archive>();
+    private final Map<Archive, ArchiveDeps> results = new HashMap<>();
+    private final Map<String, Archive> map = new HashMap<>();
     private final Archive NOT_FOUND
         = new Archive(JdepsTask.getMessage("artifact.not.found"));
 
@@ -78,27 +77,27 @@
                 deps = new PackageVisitor(archive);
             }
             archive.visit(deps);
-            results.add(deps);
+            results.put(archive, deps);
         }
 
         // set the required dependencies
-        for (ArchiveDeps result: results) {
+        for (ArchiveDeps result: results.values()) {
             for (Set<String> set : result.deps.values()) {
                 for (String target : set) {
                     Archive source = getArchive(target);
                     if (result.archive != source) {
-                        if (!result.requiredArchives.contains(source)) {
-                            result.requiredArchives.add(source);
+                        String profile = "";
+                        if (source instanceof JDKArchive) {
+                            profile = result.profile != null ? result.profile.toString() : "";
+                            if (result.getTargetProfile(target) == null) {
+                                profile += ", JDK internal API";
+                                // override the value if it accesses any JDK internal
+                                result.requireArchives.put(source, profile);
+                                continue;
+                            }
                         }
-                        // either a profile name or the archive name
-                        String tname = result.getTargetProfile(target);
-                        if (tname.isEmpty()) {
-                            tname = PlatformClassPath.contains(source)
-                                        ? "JDK internal API (" + source.getFileName() + ")"
-                                        : source.toString();
-                        }
-                        if (!result.targetNames.contains(tname)) {
-                            result.targetNames.add(tname);
+                        if (!result.requireArchives.containsKey(source)) {
+                            result.requireArchives.put(source, profile);
                         }
                     }
                 }
@@ -106,42 +105,46 @@
         }
     }
 
+    public boolean hasDependences(Archive archive) {
+        if (results.containsKey(archive)) {
+            return results.get(archive).deps.size() > 0;
+        }
+        return false;
+    }
+
     public interface Visitor {
         /**
+         * Visits the source archive to its destination archive of
+         * a recorded dependency.
+         */
+        void visitArchiveDependence(Archive origin, Archive target, String profile);
+        /**
          * Visits a recorded dependency from origin to target which can be
          * a fully-qualified classname, a package name, a profile or
          * archive name depending on the Analyzer's type.
          */
-        void visit(String origin, String target, String profile);
-        /**
-         * Visits the source archive to its destination archive of
-         * a recorded dependency.
-         */
-        void visit(Archive source, Archive dest);
+        void visitDependence(String origin, Archive source, String target, Archive archive, String profile);
     }
 
-    public void visitSummary(Visitor v) {
-        for (ArchiveDeps r : results) {
-            for (Archive a : r.requiredArchives) {
-                v.visit(r.archive, a);
-            }
-            for (String name : r.targetNames) {
-                v.visit(r.archive.getFileName(), name, name);
-            }
+    public void visitArchiveDependences(Archive source, Visitor v) {
+        ArchiveDeps r = results.get(source);
+        for (Map.Entry<Archive,String> e : r.requireArchives.entrySet()) {
+            v.visitArchiveDependence(r.archive, e.getKey(), e.getValue());
         }
     }
 
-    public void visit(Visitor v) {
-        for (ArchiveDeps r: results) {
-            for (Archive a : r.requiredArchives) {
-                v.visit(r.archive, a);
-            }
-            for (String origin : r.deps.keySet()) {
-                for (String target : r.deps.get(origin)) {
-                    // filter intra-dependency unless in verbose mode
-                    if (type == Type.VERBOSE || getArchive(origin) != getArchive(target)) {
-                        v.visit(origin, target, r.getTargetProfile(target));
-                    }
+    public void visitDependences(Archive source, Visitor v) {
+        ArchiveDeps r = results.get(source);
+        for (String origin : r.deps.keySet()) {
+            for (String target : r.deps.get(origin)) {
+                Archive archive = getArchive(target);
+                assert source == getArchive(origin);
+                Profile profile = r.getTargetProfile(target);
+
+                // filter intra-dependency unless in verbose mode
+                if (type == Type.VERBOSE || archive != source) {
+                    v.visitDependence(origin, source, target, archive,
+                                      profile != null ? profile.toString() : "");
                 }
             }
         }
@@ -151,29 +154,15 @@
         return map.containsKey(name) ? map.get(name) : NOT_FOUND;
     }
 
-    /**
-     * Returns the file name of the archive for non-JRE class or
-     * internal JRE classes.  It returns empty string for SE API.
-     */
-    public String getArchiveName(String target, String profile) {
-        Archive source = getArchive(target);
-        String name = source.getFileName();
-        if (PlatformClassPath.contains(source))
-            return profile.isEmpty() ? "JDK internal API (" + name + ")" : "";
-        return name;
-    }
-
     private abstract class ArchiveDeps implements Archive.Visitor {
         final Archive archive;
-        final Set<Archive> requiredArchives;
-        final SortedSet<String> targetNames;
+        final Map<Archive,String> requireArchives;
         final SortedMap<String, SortedSet<String>> deps;
-
+        Profile profile = null;
         ArchiveDeps(Archive archive) {
             this.archive = archive;
-            this.requiredArchives = new HashSet<Archive>();
-            this.targetNames = new TreeSet<String>();
-            this.deps = new TreeMap<String, SortedSet<String>>();
+            this.requireArchives = new HashMap<>();
+            this.deps = new TreeMap<>();
         }
 
         void add(String loc) {
@@ -188,17 +177,19 @@
         void add(String origin, String target) {
             SortedSet<String> set = deps.get(origin);
             if (set == null) {
-                set = new TreeSet<String>();
-                deps.put(origin, set);
+                deps.put(origin, set = new TreeSet<>());
             }
             if (!set.contains(target)) {
                 set.add(target);
+                // find the corresponding profile
+                Profile p = getTargetProfile(target);
+                if (profile == null || (p != null && profile.profile < p.profile)) {
+                     profile = p;
+                }
             }
         }
-
         public abstract void visit(Location o, Location t);
-        public abstract String getTargetProfile(String target);
-
+        public abstract Profile getTargetProfile(String target);
     }
 
     private class ClassVisitor extends ArchiveDeps {
@@ -211,9 +202,9 @@
         public void visit(Location o, Location t) {
             add(o.getClassName(), t.getClassName());
         }
-        public String getTargetProfile(String target) {
+        public Profile getTargetProfile(String target) {
             int i = target.lastIndexOf('.');
-            return (i > 0) ? Profiles.getProfileName(target.substring(0, i)) : "";
+            return (i > 0) ? Profile.getProfile(target.substring(0, i)) : null;
         }
     }
 
@@ -231,8 +222,8 @@
             String pkg = loc.getPackageName();
             return pkg.isEmpty() ? "<unnamed>" : pkg;
         }
-        public String getTargetProfile(String target) {
-            return Profiles.getProfileName(target);
+        public Profile getTargetProfile(String target) {
+            return Profile.getProfile(target);
         }
     }
 }
--- a/src/share/classes/com/sun/tools/jdeps/Archive.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/jdeps/Archive.java	Mon Oct 28 18:30:14 2013 -0400
@@ -25,7 +25,7 @@
 package com.sun.tools.jdeps;
 
 import com.sun.tools.classfile.Dependency.Location;
-import java.io.File;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -35,21 +35,20 @@
  * Represents the source of the class files.
  */
 public class Archive {
-    private final File file;
+    private final Path path;
     private final String filename;
     private final ClassFileReader reader;
-    private final Map<Location, Set<Location>> deps
-        = new HashMap<Location, Set<Location>>();
+    private final Map<Location, Set<Location>> deps = new HashMap<>();
 
     public Archive(String name) {
-        this.file = null;
+        this.path = null;
         this.filename = name;
         this.reader = null;
     }
 
-    public Archive(File f, ClassFileReader reader) {
-        this.file = f;
-        this.filename = f.getName();
+    public Archive(Path p, ClassFileReader reader) {
+        this.path = p;
+        this.filename = path.getFileName().toString();
         this.reader = reader;
     }
 
@@ -64,14 +63,14 @@
     public void addClass(Location origin) {
         Set<Location> set = deps.get(origin);
         if (set == null) {
-            set = new HashSet<Location>();
+            set = new HashSet<>();
             deps.put(origin, set);
         }
     }
     public void addClass(Location origin, Location target) {
         Set<Location> set = deps.get(origin);
         if (set == null) {
-            set = new HashSet<Location>();
+            set = new HashSet<>();
             deps.put(origin, set);
         }
         set.add(target);
@@ -87,7 +86,7 @@
     }
 
     public String toString() {
-        return file != null ? file.getPath() : filename;
+        return path != null ? path.toString() : filename;
     }
 
     interface Visitor {
--- a/src/share/classes/com/sun/tools/jdeps/ClassFileReader.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/jdeps/ClassFileReader.java	Mon Oct 28 18:30:14 2013 -0400
@@ -45,17 +45,17 @@
     /**
      * Returns a ClassFileReader instance of a given path.
      */
-    public static ClassFileReader newInstance(File path) throws IOException {
-        if (!path.exists()) {
-            throw new FileNotFoundException(path.getAbsolutePath());
+    public static ClassFileReader newInstance(Path path) throws IOException {
+        if (!Files.exists(path)) {
+            throw new FileNotFoundException(path.toString());
         }
 
-        if (path.isDirectory()) {
-            return new DirectoryReader(path.toPath());
-        } else if (path.getName().endsWith(".jar")) {
-            return new JarFileReader(path.toPath());
+        if (Files.isDirectory(path)) {
+            return new DirectoryReader(path);
+        } else if (path.getFileName().toString().endsWith(".jar")) {
+            return new JarFileReader(path);
         } else {
-            return new ClassFileReader(path.toPath());
+            return new ClassFileReader(path);
         }
     }
 
@@ -163,16 +163,16 @@
                 int i = name.lastIndexOf('.');
                 String pathname = name.replace('.', File.separatorChar) + ".class";
                 Path p = path.resolve(pathname);
-                if (!p.toFile().exists()) {
+                if (!Files.exists(p)) {
                     p = path.resolve(pathname.substring(0, i) + "$" +
                                      pathname.substring(i+1, pathname.length()));
                 }
-                if (p.toFile().exists()) {
+                if (Files.exists(p)) {
                     return readClassFile(p);
                 }
             } else {
                 Path p = path.resolve(name + ".class");
-                if (p.toFile().exists()) {
+                if (Files.exists(p)) {
                     return readClassFile(p);
                 }
             }
@@ -193,7 +193,7 @@
             Files.walkFileTree(dir, new SimpleFileVisitor<Path>() {
                 public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
                         throws IOException {
-                    if (file.toFile().getName().endsWith(".class")) {
+                    if (file.getFileName().toString().endsWith(".class")) {
                         files.add(file);
                     }
                     return FileVisitResult.CONTINUE;
--- a/src/share/classes/com/sun/tools/jdeps/JdepsTask.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/jdeps/JdepsTask.java	Mon Oct 28 18:30:14 2013 -0400
@@ -24,12 +24,18 @@
  */
 package com.sun.tools.jdeps;
 
+import com.sun.tools.classfile.AccessFlags;
 import com.sun.tools.classfile.ClassFile;
 import com.sun.tools.classfile.ConstantPoolException;
 import com.sun.tools.classfile.Dependencies;
 import com.sun.tools.classfile.Dependencies.ClassFileError;
 import com.sun.tools.classfile.Dependency;
+import com.sun.tools.jdeps.PlatformClassPath.JDKArchive;
 import java.io.*;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.text.MessageFormat;
 import java.util.*;
 import java.util.regex.Pattern;
@@ -67,11 +73,10 @@
 
         boolean matches(String opt) {
             for (String a : aliases) {
-                if (a.equals(opt)) {
+                if (a.equals(opt))
                     return true;
-                } else if (opt.startsWith("--") && hasArg && opt.startsWith(a + "=")) {
+                if (hasArg && opt.startsWith(a + "="))
                     return true;
-                }
             }
             return false;
         }
@@ -96,62 +101,96 @@
     }
 
     static Option[] recognizedOptions = {
-        new Option(false, "-h", "-?", "--help") {
+        new Option(false, "-h", "-?", "-help") {
             void process(JdepsTask task, String opt, String arg) {
                 task.options.help = true;
             }
         },
-        new Option(false, "-s", "--summary") {
+        new Option(true, "-dotoutput") {
+            void process(JdepsTask task, String opt, String arg) throws BadArgs {
+                Path p = Paths.get(arg);
+                if (Files.exists(p) && (!Files.isDirectory(p) || !Files.isWritable(p))) {
+                    throw new BadArgs("err.dot.output.path", arg);
+                }
+                task.options.dotOutputDir = arg;
+            }
+        },
+        new Option(false, "-s", "-summary") {
             void process(JdepsTask task, String opt, String arg) {
                 task.options.showSummary = true;
                 task.options.verbose = Analyzer.Type.SUMMARY;
             }
         },
-        new Option(false, "-v", "--verbose") {
-            void process(JdepsTask task, String opt, String arg) {
-                task.options.verbose = Analyzer.Type.VERBOSE;
-            }
-        },
-        new Option(true, "-V", "--verbose-level") {
+        new Option(false, "-v", "-verbose",
+                          "-verbose:package",
+                          "-verbose:class")
+        {
             void process(JdepsTask task, String opt, String arg) throws BadArgs {
-                if ("package".equals(arg)) {
-                    task.options.verbose = Analyzer.Type.PACKAGE;
-                } else if ("class".equals(arg)) {
-                    task.options.verbose = Analyzer.Type.CLASS;
-                } else {
-                    throw new BadArgs("err.invalid.arg.for.option", opt);
+                switch (opt) {
+                    case "-v":
+                    case "-verbose":
+                        task.options.verbose = Analyzer.Type.VERBOSE;
+                        break;
+                    case "-verbose:package":
+                            task.options.verbose = Analyzer.Type.PACKAGE;
+                            break;
+                    case "-verbose:class":
+                            task.options.verbose = Analyzer.Type.CLASS;
+                            break;
+                    default:
+                        throw new BadArgs("err.invalid.arg.for.option", opt);
                 }
             }
         },
-        new Option(true, "-c", "--classpath") {
+        new Option(true, "-cp", "-classpath") {
             void process(JdepsTask task, String opt, String arg) {
                 task.options.classpath = arg;
             }
         },
-        new Option(true, "-p", "--package") {
+        new Option(true, "-p", "-package") {
             void process(JdepsTask task, String opt, String arg) {
                 task.options.packageNames.add(arg);
             }
         },
-        new Option(true, "-e", "--regex") {
+        new Option(true, "-e", "-regex") {
             void process(JdepsTask task, String opt, String arg) {
                 task.options.regex = arg;
             }
         },
-        new Option(false, "-P", "--profile") {
+        new Option(true, "-include") {
+            void process(JdepsTask task, String opt, String arg) throws BadArgs {
+                task.options.includePattern = Pattern.compile(arg);
+            }
+        },
+        new Option(false, "-P", "-profile") {
             void process(JdepsTask task, String opt, String arg) throws BadArgs {
                 task.options.showProfile = true;
-                if (Profiles.getProfileCount() == 0) {
+                if (Profile.getProfileCount() == 0) {
                     throw new BadArgs("err.option.unsupported", opt, getMessage("err.profiles.msg"));
                 }
             }
         },
-        new Option(false, "-R", "--recursive") {
+        new Option(false, "-apionly") {
+            void process(JdepsTask task, String opt, String arg) {
+                task.options.apiOnly = true;
+            }
+        },
+        new Option(false, "-R", "-recursive") {
             void process(JdepsTask task, String opt, String arg) {
                 task.options.depth = 0;
             }
         },
-        new HiddenOption(true, "-d", "--depth") {
+        new Option(false, "-version") {
+            void process(JdepsTask task, String opt, String arg) {
+                task.options.version = true;
+            }
+        },
+        new HiddenOption(false, "-fullversion") {
+            void process(JdepsTask task, String opt, String arg) {
+                task.options.fullVersion = true;
+            }
+        },
+        new HiddenOption(true, "-depth") {
             void process(JdepsTask task, String opt, String arg) throws BadArgs {
                 try {
                     task.options.depth = Integer.parseInt(arg);
@@ -160,16 +199,6 @@
                 }
             }
         },
-        new Option(false, "--version") {
-            void process(JdepsTask task, String opt, String arg) {
-                task.options.version = true;
-            }
-        },
-        new HiddenOption(false, "--fullversion") {
-            void process(JdepsTask task, String opt, String arg) {
-                task.options.fullVersion = true;
-            }
-        },
     };
 
     private static final String PROGNAME = "jdeps";
@@ -202,7 +231,7 @@
             if (options.version || options.fullVersion) {
                 showVersion(options.fullVersion);
             }
-            if (classes.isEmpty() && !options.wildcard) {
+            if (classes.isEmpty() && options.includePattern == null) {
                 if (options.help || options.version || options.fullVersion) {
                     return EXIT_OK;
                 } else {
@@ -233,19 +262,51 @@
         }
     }
 
-    private final List<Archive> sourceLocations = new ArrayList<Archive>();
+    private final List<Archive> sourceLocations = new ArrayList<>();
     private boolean run() throws IOException {
         findDependencies();
         Analyzer analyzer = new Analyzer(options.verbose);
         analyzer.run(sourceLocations);
-        if (options.verbose == Analyzer.Type.SUMMARY) {
-            printSummary(log, analyzer);
+        if (options.dotOutputDir != null) {
+            Path dir = Paths.get(options.dotOutputDir);
+            Files.createDirectories(dir);
+            generateDotFiles(dir, analyzer);
         } else {
-            printDependencies(log, analyzer);
+            printRawOutput(log, analyzer);
         }
         return true;
     }
 
+    private void generateDotFiles(Path dir, Analyzer analyzer) throws IOException {
+        Path summary = dir.resolve("summary.dot");
+        try (PrintWriter sw = new PrintWriter(Files.newOutputStream(summary));
+             DotFileFormatter formatter = new DotFileFormatter(sw, "summary")) {
+            for (Archive archive : sourceLocations) {
+                 analyzer.visitArchiveDependences(archive, formatter);
+            }
+        }
+        if (options.verbose != Analyzer.Type.SUMMARY) {
+            for (Archive archive : sourceLocations) {
+                if (analyzer.hasDependences(archive)) {
+                    Path dotfile = dir.resolve(archive.getFileName() + ".dot");
+                    try (PrintWriter pw = new PrintWriter(Files.newOutputStream(dotfile));
+                         DotFileFormatter formatter = new DotFileFormatter(pw, archive)) {
+                        analyzer.visitDependences(archive, formatter);
+                    }
+                }
+            }
+        }
+    }
+
+    private void printRawOutput(PrintWriter writer, Analyzer analyzer) {
+        for (Archive archive : sourceLocations) {
+            RawOutputFormatter formatter = new RawOutputFormatter(writer);
+            analyzer.visitArchiveDependences(archive, formatter);
+            if (options.verbose != Analyzer.Type.SUMMARY) {
+                analyzer.visitDependences(archive, formatter);
+            }
+        }
+    }
     private boolean isValidClassName(String name) {
         if (!Character.isJavaIdentifierStart(name.charAt(0))) {
             return false;
@@ -259,27 +320,43 @@
         return true;
     }
 
-    private void findDependencies() throws IOException {
-        Dependency.Finder finder = Dependencies.getClassDependencyFinder();
-        Dependency.Filter filter;
-        if (options.regex != null) {
-            filter = Dependencies.getRegexFilter(Pattern.compile(options.regex));
+    private Dependency.Filter getDependencyFilter() {
+         if (options.regex != null) {
+            return Dependencies.getRegexFilter(Pattern.compile(options.regex));
         } else if (options.packageNames.size() > 0) {
-            filter = Dependencies.getPackageFilter(options.packageNames, false);
+            return Dependencies.getPackageFilter(options.packageNames, false);
         } else {
-            filter = new Dependency.Filter() {
+            return new Dependency.Filter() {
+                @Override
                 public boolean accepts(Dependency dependency) {
                     return !dependency.getOrigin().equals(dependency.getTarget());
                 }
             };
         }
+    }
 
-        List<Archive> archives = new ArrayList<Archive>();
-        Deque<String> roots = new LinkedList<String>();
+    private boolean matches(String classname, AccessFlags flags) {
+        if (options.apiOnly && !flags.is(AccessFlags.ACC_PUBLIC)) {
+            return false;
+        } else if (options.includePattern != null) {
+            return options.includePattern.matcher(classname.replace('/', '.')).matches();
+        } else {
+            return true;
+        }
+    }
+
+    private void findDependencies() throws IOException {
+        Dependency.Finder finder =
+            options.apiOnly ? Dependencies.getAPIFinder(AccessFlags.ACC_PROTECTED)
+                            : Dependencies.getClassDependencyFinder();
+        Dependency.Filter filter = getDependencyFilter();
+
+        List<Archive> archives = new ArrayList<>();
+        Deque<String> roots = new LinkedList<>();
         for (String s : classes) {
-            File f = new File(s);
-            if (f.exists()) {
-                archives.add(new Archive(f, ClassFileReader.newInstance(f)));
+            Path p = Paths.get(s);
+            if (Files.exists(p)) {
+                archives.add(new Archive(p, ClassFileReader.newInstance(p)));
             } else {
                 if (isValidClassName(s)) {
                     roots.add(s);
@@ -289,9 +366,8 @@
             }
         }
 
-        List<Archive> classpaths = new ArrayList<Archive>(); // for class file lookup
-        if (options.wildcard) {
-            // include all archives from classpath to the initial list
+        List<Archive> classpaths = new ArrayList<>(); // for class file lookup
+        if (options.includePattern != null) {
             archives.addAll(getClassPathArchives(options.classpath));
         } else {
             classpaths.addAll(getClassPathArchives(options.classpath));
@@ -305,8 +381,8 @@
         // Work queue of names of classfiles to be searched.
         // Entries will be unique, and for classes that do not yet have
         // dependencies in the results map.
-        Deque<String> deque = new LinkedList<String>();
-        Set<String> doneClasses = new HashSet<String>();
+        Deque<String> deque = new LinkedList<>();
+        Set<String> doneClasses = new HashSet<>();
 
         // get the immediate dependencies of the input files
         for (Archive a : archives) {
@@ -318,16 +394,18 @@
                     throw new ClassFileError(e);
                 }
 
-                if (!doneClasses.contains(classFileName)) {
-                    doneClasses.add(classFileName);
-                }
-                for (Dependency d : finder.findDependencies(cf)) {
-                    if (filter.accepts(d)) {
-                        String cn = d.getTarget().getName();
-                        if (!doneClasses.contains(cn) && !deque.contains(cn)) {
-                            deque.add(cn);
+                if (matches(classFileName, cf.access_flags)) {
+                    if (!doneClasses.contains(classFileName)) {
+                        doneClasses.add(classFileName);
+                    }
+                    for (Dependency d : finder.findDependencies(cf)) {
+                        if (filter.accepts(d)) {
+                            String cn = d.getTarget().getName();
+                            if (!doneClasses.contains(cn) && !deque.contains(cn)) {
+                                deque.add(cn);
+                            }
+                            a.addClass(d.getOrigin(), d.getTarget());
                         }
-                        a.addClass(d.getOrigin(), d.getTarget());
                     }
                 }
             }
@@ -379,46 +457,10 @@
                 }
             }
             unresolved = deque;
-            deque = new LinkedList<String>();
+            deque = new LinkedList<>();
         } while (!unresolved.isEmpty() && depth-- > 0);
     }
 
-    private void printSummary(final PrintWriter out, final Analyzer analyzer) {
-        Analyzer.Visitor visitor = new Analyzer.Visitor() {
-            public void visit(String origin, String target, String profile) {
-                if (options.showProfile) {
-                    out.format("%-30s -> %s%n", origin, target);
-                }
-            }
-            public void visit(Archive origin, Archive target) {
-                if (!options.showProfile) {
-                    out.format("%-30s -> %s%n", origin, target);
-                }
-            }
-        };
-        analyzer.visitSummary(visitor);
-    }
-
-    private void printDependencies(final PrintWriter out, final Analyzer analyzer) {
-        Analyzer.Visitor visitor = new Analyzer.Visitor() {
-            private String pkg = "";
-            public void visit(String origin, String target, String profile) {
-                if (!origin.equals(pkg)) {
-                    pkg = origin;
-                    out.format("   %s (%s)%n", origin, analyzer.getArchive(origin).getFileName());
-                }
-                out.format("      -> %-50s %s%n", target,
-                           (options.showProfile && !profile.isEmpty())
-                               ? profile
-                               : analyzer.getArchiveName(target, profile));
-            }
-            public void visit(Archive origin, Archive target) {
-                out.format("%s -> %s%n", origin, target);
-            }
-        };
-        analyzer.visit(visitor);
-    }
-
     public void handleOptions(String[] args) throws BadArgs {
         // process options
         for (int i=0; i < args.length; i++) {
@@ -427,7 +469,7 @@
                 Option option = getOption(name);
                 String param = null;
                 if (option.hasArg) {
-                    if (name.startsWith("--") && name.indexOf('=') > 0) {
+                    if (name.startsWith("-") && name.indexOf('=') > 0) {
                         param = name.substring(name.indexOf('=') + 1, name.length());
                     } else if (i + 1 < args.length) {
                         param = args[++i];
@@ -447,11 +489,7 @@
                     if (name.charAt(0) == '-') {
                         throw new BadArgs("err.option.after.class", name).showUsage(true);
                     }
-                    if (name.equals("*") || name.equals("\"*\"")) {
-                        options.wildcard = true;
-                    } else {
-                        classes.add(name);
-                    }
+                    classes.add(name);
                 }
             }
         }
@@ -518,13 +556,15 @@
         boolean showProfile;
         boolean showSummary;
         boolean wildcard;
-        String regex;
+        boolean apiOnly;
+        String dotOutputDir;
         String classpath = "";
         int depth = 1;
         Analyzer.Type verbose = Analyzer.Type.PACKAGE;
-        Set<String> packageNames = new HashSet<String>();
+        Set<String> packageNames = new HashSet<>();
+        String regex;             // apply to the dependences
+        Pattern includePattern;   // apply to classes
     }
-
     private static class ResourceBundleHelper {
         static final ResourceBundle versionRB;
         static final ResourceBundle bundle;
@@ -547,9 +587,9 @@
     private List<Archive> getArchives(List<String> filenames) throws IOException {
         List<Archive> result = new ArrayList<Archive>();
         for (String s : filenames) {
-            File f = new File(s);
-            if (f.exists()) {
-                result.add(new Archive(f, ClassFileReader.newInstance(f)));
+            Path p = Paths.get(s);
+            if (Files.exists(p)) {
+                result.add(new Archive(p, ClassFileReader.newInstance(p)));
             } else {
                 warning("warn.file.not.exist", s);
             }
@@ -558,18 +598,131 @@
     }
 
     private List<Archive> getClassPathArchives(String paths) throws IOException {
-        List<Archive> result = new ArrayList<Archive>();
+        List<Archive> result = new ArrayList<>();
         if (paths.isEmpty()) {
             return result;
         }
         for (String p : paths.split(File.pathSeparator)) {
             if (p.length() > 0) {
-                File f = new File(p);
-                if (f.exists()) {
-                    result.add(new Archive(f, ClassFileReader.newInstance(f)));
+                List<Path> files = new ArrayList<>();
+                // wildcard to parse all JAR files e.g. -classpath dir/*
+                int i = p.lastIndexOf(".*");
+                if (i > 0) {
+                    Path dir = Paths.get(p.substring(0, i));
+                    try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, "*.jar")) {
+                        for (Path entry : stream) {
+                            files.add(entry);
+                        }
+                    }
+                } else {
+                    files.add(Paths.get(p));
+                }
+                for (Path f : files) {
+                    if (Files.exists(f)) {
+                        result.add(new Archive(f, ClassFileReader.newInstance(f)));
+                    }
                 }
             }
         }
         return result;
     }
+
+
+    /**
+     * Returns the file name of the archive for non-JRE class or
+     * internal JRE classes.  It returns empty string for SE API.
+     */
+    private static String getArchiveName(Archive source, String profile) {
+        String name = source.getFileName();
+        if (source instanceof JDKArchive)
+            return profile.isEmpty() ? "JDK internal API (" + name + ")" : "";
+        return name;
+    }
+
+    class RawOutputFormatter implements Analyzer.Visitor {
+        private final PrintWriter writer;
+        RawOutputFormatter(PrintWriter writer) {
+            this.writer = writer;
+        }
+
+        private String pkg = "";
+        @Override
+        public void visitDependence(String origin, Archive source,
+                                    String target, Archive archive, String profile) {
+            if (!origin.equals(pkg)) {
+                pkg = origin;
+                writer.format("   %s (%s)%n", origin, source.getFileName());
+            }
+            String name = (options.showProfile && !profile.isEmpty())
+                                ? profile
+                                : getArchiveName(archive, profile);
+            writer.format("      -> %-50s %s%n", target, name);
+        }
+
+        @Override
+        public void visitArchiveDependence(Archive origin, Archive target, String profile) {
+            writer.format("%s -> %s", origin, target);
+            if (options.showProfile && !profile.isEmpty()) {
+                writer.format(" (%s)%n", profile);
+            } else {
+                writer.format("%n");
+            }
+        }
+    }
+
+    class DotFileFormatter implements Analyzer.Visitor, AutoCloseable {
+        private final PrintWriter writer;
+        private final String name;
+        DotFileFormatter(PrintWriter writer, String name) {
+            this.writer = writer;
+            this.name = name;
+            writer.format("digraph \"%s\" {%n", name);
+        }
+        DotFileFormatter(PrintWriter writer, Archive archive) {
+            this.writer = writer;
+            this.name = archive.getFileName();
+            writer.format("digraph \"%s\" {%n", name);
+            writer.format("    // Path: %s%n", archive.toString());
+        }
+
+        @Override
+        public void close() {
+            writer.println("}");
+        }
+
+        private final Set<String> edges = new HashSet<>();
+        private String node = "";
+        @Override
+        public void visitDependence(String origin, Archive source,
+                                    String target, Archive archive, String profile) {
+            if (!node.equals(origin)) {
+                edges.clear();
+                node = origin;
+            }
+            // if -P option is specified, package name -> profile will
+            // be shown and filter out multiple same edges.
+            if (!edges.contains(target)) {
+                StringBuilder sb = new StringBuilder();
+                String name = options.showProfile && !profile.isEmpty()
+                                  ? profile
+                                  : getArchiveName(archive, profile);
+                writer.format("   %-50s -> %s;%n",
+                                 String.format("\"%s\"", origin),
+                                 name.isEmpty() ? String.format("\"%s\"", target)
+                                                :  String.format("\"%s (%s)\"", target, name));
+                edges.add(target);
+            }
+        }
+
+        @Override
+        public void visitArchiveDependence(Archive origin, Archive target, String profile) {
+             String name = options.showProfile && !profile.isEmpty()
+                                ? profile : "";
+             writer.format("   %-30s -> \"%s\";%n",
+                           String.format("\"%s\"", origin.getFileName()),
+                           name.isEmpty()
+                               ? target.getFileName()
+                               : String.format("%s (%s)", target.getFileName(), name));
+        }
+    }
 }
--- a/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java	Mon Oct 28 18:30:14 2013 -0400
@@ -24,11 +24,11 @@
  */
 package com.sun.tools.jdeps;
 
-import java.io.File;
 import java.io.IOException;
 import java.nio.file.FileVisitResult;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.nio.file.SimpleFileVisitor;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.*;
@@ -38,45 +38,38 @@
  */
 class PlatformClassPath {
     private final static List<Archive> javaHomeArchives = init();
+
     static List<Archive> getArchives() {
         return javaHomeArchives;
     }
 
-    static boolean contains(Archive archive) {
-        return javaHomeArchives.contains(archive);
+    private static List<Archive> init() {
+        List<Archive> result = new ArrayList<>();
+        Path home = Paths.get(System.getProperty("java.home"));
+        try {
+            if (home.endsWith("jre")) {
+                // jar files in <javahome>/jre/lib
+                result.addAll(addJarFiles(home.resolve("lib")));
+            } else if (Files.exists(home.resolve("lib"))) {
+                // either a JRE or a jdk build image
+                Path classes = home.resolve("classes");
+                if (Files.isDirectory(classes)) {
+                    // jdk build outputdir
+                    result.add(new JDKArchive(classes, ClassFileReader.newInstance(classes)));
+                }
+                // add other JAR files
+                result.addAll(addJarFiles(home.resolve("lib")));
+            } else {
+                throw new RuntimeException("\"" + home + "\" not a JDK home");
+            }
+            return result;
+        } catch (IOException e) {
+            throw new Error(e);
+        }
     }
 
-    private static List<Archive> init() {
-        List<Archive> result = new ArrayList<Archive>();
-        String javaHome = System.getProperty("java.home");
-        File jre = new File(javaHome, "jre");
-        File lib = new File(javaHome, "lib");
-
-        try {
-            if (jre.exists() && jre.isDirectory()) {
-                result.addAll(addJarFiles(new File(jre, "lib")));
-                result.addAll(addJarFiles(lib));
-            } else if (lib.exists() && lib.isDirectory()) {
-                // either a JRE or a jdk build image
-                File classes = new File(javaHome, "classes");
-                if (classes.exists() && classes.isDirectory()) {
-                    // jdk build outputdir
-                    result.add(new Archive(classes, ClassFileReader.newInstance(classes)));
-                }
-                // add other JAR files
-                result.addAll(addJarFiles(lib));
-            } else {
-                throw new RuntimeException("\"" + javaHome + "\" not a JDK home");
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-        return result;
-    }
-
-    private static List<Archive> addJarFiles(File f) throws IOException {
-        final List<Archive> result = new ArrayList<Archive>();
-        final Path root = f.toPath();
+    private static List<Archive> addJarFiles(final Path root) throws IOException {
+        final List<Archive> result = new ArrayList<>();
         final Path ext = root.resolve("ext");
         Files.walkFileTree(root, new SimpleFileVisitor<Path>() {
             @Override
@@ -91,17 +84,30 @@
                 }
             }
             @Override
-            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
+            public FileVisitResult visitFile(Path p, BasicFileAttributes attrs)
                 throws IOException
             {
-                File f = file.toFile();
-                String fn = f.getName();
-                if (fn.endsWith(".jar") && !fn.equals("alt-rt.jar")) {
-                    result.add(new Archive(f, ClassFileReader.newInstance(f)));
+                String fn = p.getFileName().toString();
+                if (fn.endsWith(".jar")) {
+                    // JDK may cobundle with JavaFX that doesn't belong to any profile
+                    // Treat jfxrt.jar as regular Archive
+                    result.add(fn.equals("jfxrt.jar")
+                        ? new Archive(p, ClassFileReader.newInstance(p))
+                        : new JDKArchive(p, ClassFileReader.newInstance(p)));
                 }
                 return FileVisitResult.CONTINUE;
             }
         });
         return result;
     }
+
+    /**
+     * A JDK archive is part of the JDK containing the Java SE API
+     * or implementation classes (i.e. JDK internal API)
+     */
+    static class JDKArchive extends Archive {
+        JDKArchive(Path p, ClassFileReader reader) {
+            super(p, reader);
+        }
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/jdeps/Profile.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,227 @@
+/*
+ * Copyright (c) 2013, 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.jdeps;
+
+import com.sun.tools.classfile.Annotation;
+import com.sun.tools.classfile.Annotation.*;
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.ConstantPool.*;
+import com.sun.tools.classfile.ConstantPoolException;
+import com.sun.tools.classfile.RuntimeAnnotations_attribute;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
+import java.util.jar.JarFile;
+
+/**
+ * Build the profile information from ct.sym if exists.
+ */
+enum Profile {
+
+    COMPACT1("compact1", 1),
+    COMPACT2("compact2", 2),
+    COMPACT3("compact3", 3),
+    FULL_JRE("Full JRE", 4);
+
+    final String name;
+    final int profile;
+    final Set<String> packages;
+    final Set<String> proprietaryPkgs;
+
+    Profile(String name, int profile) {
+        this.name = name;
+        this.profile = profile;
+        this.packages = new HashSet<>();
+        this.proprietaryPkgs = new HashSet<>();
+    }
+
+    @Override
+    public String toString() {
+        return name;
+    }
+
+    public static int getProfileCount() {
+        return PackageToProfile.map.values().size();
+    }
+
+    /**
+     * Returns the Profile for the given package name. It returns an empty
+     * string if the given package is not in any profile.
+     */
+    public static Profile getProfile(String pn) {
+        Profile profile = PackageToProfile.map.get(pn);
+        return (profile != null && profile.packages.contains(pn))
+                ? profile : null;
+    }
+
+    static class PackageToProfile {
+        static Map<String, Profile> map = initProfiles();
+
+        private static Map<String, Profile> initProfiles() {
+            try {
+                String profilesProps = System.getProperty("jdeps.profiles");
+                if (profilesProps != null) {
+                    // for testing for JDK development build where ct.sym doesn't exist
+                    initProfilesFromProperties(profilesProps);
+                } else {
+                    Path home = Paths.get(System.getProperty("java.home"));
+                    if (home.endsWith("jre")) {
+                        home = home.getParent();
+                    }
+                    Path ctsym = home.resolve("lib").resolve("ct.sym");
+                    if (Files.exists(ctsym)) {
+                        // parse ct.sym and load information about profiles
+                        try (JarFile jf = new JarFile(ctsym.toFile())) {
+                            ClassFileReader reader = ClassFileReader.newInstance(ctsym, jf);
+                            for (ClassFile cf : reader.getClassFiles()) {
+                                findProfile(cf);
+                            }
+                        }
+                    }
+                }
+            } catch (IOException | ConstantPoolException e) {
+                throw new Error(e);
+            }
+            HashMap<String,Profile> map = new HashMap<>();
+            for (Profile profile : Profile.values()) {
+                for (String pn : profile.packages) {
+                    if (!map.containsKey(pn)) {
+                        // split packages in the JRE: use the smaller compact
+                        map.put(pn, profile);
+                    }
+                }
+                for (String pn : profile.proprietaryPkgs) {
+                    if (!map.containsKey(pn)) {
+                        map.put(pn, profile);
+                    }
+                }
+            }
+            return map;
+        }
+        private static final String PROFILE_ANNOTATION = "Ljdk/Profile+Annotation;";
+        private static final String PROPRIETARY_ANNOTATION = "Lsun/Proprietary+Annotation;";
+        private static Profile findProfile(ClassFile cf) throws ConstantPoolException {
+            RuntimeAnnotations_attribute attr = (RuntimeAnnotations_attribute)
+                cf.attributes.get(Attribute.RuntimeInvisibleAnnotations);
+            int index = 0;
+            boolean proprietary = false;
+            if (attr != null) {
+                for (int i = 0; i < attr.annotations.length; i++) {
+                    Annotation ann = attr.annotations[i];
+                    String annType = cf.constant_pool.getUTF8Value(ann.type_index);
+                    if (PROFILE_ANNOTATION.equals(annType)) {
+                        for (int j = 0; j < ann.num_element_value_pairs; j++) {
+                            Annotation.element_value_pair pair = ann.element_value_pairs[j];
+                            Primitive_element_value ev = (Primitive_element_value) pair.value;
+                            CONSTANT_Integer_info info = (CONSTANT_Integer_info)
+                                cf.constant_pool.get(ev.const_value_index);
+                            index = info.value;
+                            break;
+                        }
+                    } else if (PROPRIETARY_ANNOTATION.equals(annType)) {
+                        proprietary = true;
+                    }
+                }
+            }
+
+            Profile p = null;  // default
+            switch (index) {
+                case 1:
+                    p = Profile.COMPACT1; break;
+                case 2:
+                    p = Profile.COMPACT2; break;
+                case 3:
+                    p = Profile.COMPACT3; break;
+                case 4:
+                    p = Profile.FULL_JRE; break;
+                default:
+                    // skip classes with profile=0
+                    // Inner classes are not annotated with the profile annotation
+                    return null;
+            }
+
+            String name = cf.getName();
+            int i = name.lastIndexOf('/');
+            name = (i > 0) ? name.substring(0, i).replace('/', '.') : "";
+            if (proprietary) {
+                p.proprietaryPkgs.add(name);
+            } else {
+                p.packages.add(name);
+            }
+            return p;
+        }
+
+        private static void initProfilesFromProperties(String path) throws IOException {
+            Properties props = new Properties();
+            try (FileReader reader = new FileReader(path)) {
+                props.load(reader);
+            }
+            for (Profile prof : Profile.values()) {
+                int i = prof.profile;
+                String key = props.getProperty("profile." + i + ".name");
+                if (key == null) {
+                    throw new RuntimeException(key + " missing in " + path);
+                }
+                String n = props.getProperty("profile." + i + ".packages");
+                String[] pkgs = n.split("\\s+");
+                for (String p : pkgs) {
+                    if (p.isEmpty()) continue;
+                    prof.packages.add(p);
+                }
+            }
+        }
+    }
+
+    // for debugging
+    public static void main(String[] args) {
+        if (args.length == 0) {
+            if (Profile.getProfileCount() == 0) {
+                System.err.println("No profile is present in this JDK");
+            }
+            for (Profile p : Profile.values()) {
+                String profileName = p.name;
+                SortedSet<String> set = new TreeSet<>(p.packages);
+                for (String s : set) {
+                    // filter out the inner classes that are not annotated with
+                    // the profile annotation
+                    if (PackageToProfile.map.get(s) == p) {
+                        System.out.format("%2d: %-10s  %s%n", p.profile, profileName, s);
+                        profileName = "";
+                    } else {
+                        System.err.format("Split package: %s in %s and %s %n",
+                            s, PackageToProfile.map.get(s).name, p.name);
+                    }
+                }
+            }
+        }
+        for (String pn : args) {
+            System.out.format("%s in %s%n", pn, getProfile(pn));
+        }
+    }
+}
--- a/src/share/classes/com/sun/tools/jdeps/Profiles.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2013, 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.jdeps;
-
-import com.sun.tools.classfile.Annotation;
-import com.sun.tools.classfile.Annotation.*;
-import com.sun.tools.classfile.Attribute;
-import com.sun.tools.classfile.ClassFile;
-import com.sun.tools.classfile.ConstantPool;
-import com.sun.tools.classfile.ConstantPool.*;
-import com.sun.tools.classfile.ConstantPoolException;
-import com.sun.tools.classfile.RuntimeAnnotations_attribute;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.*;
-import java.util.jar.JarFile;
-
-/**
- * Build the profile information from ct.sym if exists.
- */
-class Profiles {
-    private static final Map<String,Profile> map = initProfiles();
-    /**
-     * Returns the name of the profile for the given package name.
-     * It returns an empty string if the given package is not in any profile.
-     */
-    public static String getProfileName(String pn) {
-        Profile profile = map.get(pn);
-        return (profile != null && profile.packages.contains(pn))
-                    ? profile.name : "";
-    }
-
-    public static int getProfileCount() {
-        return new HashSet<Profile>(map.values()).size();
-    }
-
-    private static Map<String,Profile> initProfiles() {
-        List<Profile> profiles = new ArrayList<Profile>();
-        try {
-            String profilesProps = System.getProperty("jdeps.profiles");
-            if (profilesProps != null) {
-                // for testing for JDK development build where ct.sym doesn't exist
-                initProfilesFromProperties(profiles, profilesProps);
-            } else {
-                Path home = Paths.get(System.getProperty("java.home"));
-                if (home.endsWith("jre")) {
-                    home = home.getParent();
-                }
-                Path ctsym = home.resolve("lib").resolve("ct.sym");
-                if (ctsym.toFile().exists()) {
-                    // add a default Full JRE
-                    profiles.add(0, new Profile("Full JRE", 0));
-                    // parse ct.sym and load information about profiles
-                    try (JarFile jf = new JarFile(ctsym.toFile())) {
-                        ClassFileReader reader = ClassFileReader.newInstance(ctsym, jf);
-                        for (ClassFile cf : reader.getClassFiles()) {
-                            findProfile(profiles, cf);
-                        }
-                    }
-
-                    // merge the last Profile with the "Full JRE"
-                    if (profiles.size() > 1) {
-                        Profile fullJRE = profiles.get(0);
-                        Profile p = profiles.remove(profiles.size() - 1);
-                        for (String pn : fullJRE.packages) {
-                            // The last profile contains the packages determined from ct.sym.
-                            // Move classes annotated profile==0 or no attribute that are
-                            // added in the fullJRE profile to either supported or proprietary
-                            // packages appropriately
-                            if (p.proprietaryPkgs.contains(pn)) {
-                                p.proprietaryPkgs.add(pn);
-                            } else {
-                                p.packages.add(pn);
-                            }
-                        }
-                        fullJRE.packages.clear();
-                        fullJRE.proprietaryPkgs.clear();
-                        fullJRE.packages.addAll(p.packages);
-                        fullJRE.proprietaryPkgs.addAll(p.proprietaryPkgs);
-                    }
-                }
-            }
-        } catch (IOException | ConstantPoolException e) {
-            throw new Error(e);
-        }
-        HashMap<String,Profile> map = new HashMap<String,Profile>();
-        for (Profile profile : profiles) {
-            // Inner classes are not annotated with the profile annotation
-            // packages may be in one profile but also appear in the Full JRE
-            // Full JRE is always the first element in profiles list and
-            // so the map will contain the appropriate Profile
-            for (String pn : profile.packages) {
-                map.put(pn, profile);
-            }
-            for (String pn : profile.proprietaryPkgs) {
-                map.put(pn, profile);
-            }
-        }
-        return map;
-    }
-
-    private static final String PROFILE_ANNOTATION = "Ljdk/Profile+Annotation;";
-    private static final String PROPRIETARY_ANNOTATION = "Lsun/Proprietary+Annotation;";
-    private static Profile findProfile(List<Profile> profiles, ClassFile cf)
-            throws ConstantPoolException
-    {
-        RuntimeAnnotations_attribute attr = (RuntimeAnnotations_attribute)
-            cf.attributes.get(Attribute.RuntimeInvisibleAnnotations);
-        int index = 0;
-        boolean proprietary = false;
-        if (attr != null) {
-            for (int i = 0; i < attr.annotations.length; i++) {
-                Annotation ann = attr.annotations[i];
-                String annType = cf.constant_pool.getUTF8Value(ann.type_index);
-                if (PROFILE_ANNOTATION.equals(annType)) {
-                    for (int j = 0; j < ann.num_element_value_pairs; j++) {
-                        Annotation.element_value_pair pair = ann.element_value_pairs[j];
-                        Primitive_element_value ev = (Primitive_element_value)pair.value;
-                        CONSTANT_Integer_info info = (CONSTANT_Integer_info)
-                             cf.constant_pool.get(ev.const_value_index);
-                        index = info.value;
-                        break;
-                    }
-                } else if (PROPRIETARY_ANNOTATION.equals(annType)) {
-                    proprietary = true;
-                }
-            }
-            if (index >= profiles.size()) {
-                Profile p = null;
-                for (int i = profiles.size(); i <= index; i++) {
-                    p = new Profile(i);
-                    profiles.add(p);
-                }
-            }
-        }
-
-        Profile p = profiles.get(index);
-        String name = cf.getName();
-        int i = name.lastIndexOf('/');
-        name = (i > 0) ? name.substring(0, i).replace('/','.') : "";
-        if (proprietary) {
-            p.proprietaryPkgs.add(name);
-        } else {
-            p.packages.add(name);
-        }
-        return p;
-    }
-
-    private static void initProfilesFromProperties(List<Profile> profiles, String path)
-            throws IOException
-    {
-        Properties props = new Properties();
-        try (FileReader reader = new FileReader(path)) {
-            props.load(reader);
-        }
-        int i=1;
-        String key;
-        while (props.containsKey((key = "profile." + i + ".name"))) {
-            Profile profile = new Profile(props.getProperty(key), i);
-            profiles.add(profile);
-            String n = props.getProperty("profile." + i + ".packages");
-            String[] pkgs = n.split("\\s+");
-            for (String p : pkgs) {
-                if (p.isEmpty()) continue;
-                profile.packages.add(p);
-            }
-            i++;
-        }
-    }
-
-    private static class Profile {
-        final String name;
-        final int profile;
-        final Set<String> packages;
-        final Set<String> proprietaryPkgs;
-        Profile(int profile) {
-            this("compact" + profile, profile);
-        }
-        Profile(String name, int profile) {
-            this.name = name;
-            this.profile = profile;
-            this.packages = new HashSet<String>();
-            this.proprietaryPkgs = new HashSet<String>();
-        }
-        public String toString() {
-            return name;
-        }
-    }
-
-    // for debugging
-    public static void main(String[] args) {
-        if (args.length == 0) {
-            Profile[] profiles = new Profile[getProfileCount()];
-            for (Profile p : map.values()) {
-                // move the zeroth profile to the last
-                int index = p.profile == 0 ? profiles.length-1 : p.profile-1;
-                profiles[index] = p;
-            }
-            for (Profile p : profiles) {
-                String profileName = p.name;
-                SortedSet<String> set = new TreeSet<String>(p.packages);
-                for (String s : set) {
-                    // filter out the inner classes that are not annotated with
-                    // the profile annotation
-                    if (map.get(s) == p) {
-                        System.out.format("%-10s  %s%n", profileName, s);
-                        profileName = "";
-                    }
-                }
-            }
-        }
-        for (String pn : args) {
-            System.out.format("%s in %s%n", pn, getProfileName(pn));
-        }
-    }
-}
--- a/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties	Mon Oct 28 18:30:14 2013 -0400
@@ -5,46 +5,63 @@
 main.usage=\
 Usage: {0} <options> <classes...>\n\
 where <classes> can be a pathname to a .class file, a directory, a JAR file,\n\
-or a fully-qualified classname or wildcard "*".  Possible options include:
+or a fully-qualified class name.  Possible options include:
 
 error.prefix=Error:
 warn.prefix=Warning:
 
 main.opt.h=\
-\  -h -?      --help                    Print this usage message
+\  -h -?        -help                 Print this usage message
 
 main.opt.version=\
-\             --version                 Version information
-
-main.opt.V=\
-\  -V <level> --verbose-level=<level>   Print package-level or class-level dependencies\n\
-\                                       Valid levels are: "package" and "class"
+\  -version                           Version information
 
 main.opt.v=\
-\  -v         --verbose                 Print additional information
+\  -v           -verbose              Print all class level dependencies\n\
+\  -verbose:package                   Print package-level dependencies excluding\n\
+\                                     dependencies within the same archive\n\
+\  -verbose:class                     Print class-level dependencies excluding\n\
+\                                     dependencies within the same archive
 
 main.opt.s=\
-\  -s         --summary                 Print dependency summary only
+\  -s           -summary              Print dependency summary only
 
 main.opt.p=\
-\  -p <pkg name> --package=<pkg name>   Restrict analysis to classes in this package\n\
-\                                       (may be given multiple times)
+\  -p <pkgname> -package <pkgname>    Finds dependences in the given package\n\
+\                                     (may be given multiple times)
 
 main.opt.e=\
-\  -e <regex> --regex=<regex>           Restrict analysis to packages matching pattern\n\
-\                                       (-p and -e are exclusive)
+\  -e <regex>   -regex <regex>        Finds dependences in packages matching pattern\n\
+\                                     (-p and -e are exclusive)
+
+main.opt.include=\
+\  -include <regex>                   Restrict analysis to classes matching pattern\n\
+\                                     This option filters the list of classes to\n\
+\                                     be analyzed.  It can be used together with\n\
+\                                     -p and -e which apply pattern to the dependences
 
 main.opt.P=\
-\  -P         --profile                 Show profile or the file containing a package
+\  -P           -profile              Show profile or the file containing a package
 
-main.opt.c=\
-\  -c <path>  --classpath=<path>        Specify where to find class files
+main.opt.cp=\
+\  -cp <path>   -classpath <path>     Specify where to find class files
 
 main.opt.R=\
-\  -R         --recursive               Recursively traverse all dependencies
+\  -R           -recursive            Recursively traverse all dependencies
 
-main.opt.d=\
-\  -d <depth> --depth=<depth>           Specify the depth of the transitive dependency analysis
+main.opt.apionly=\
+\  -apionly                           Restrict analysis to APIs i.e. dependences\n\
+\                                     from the signature of public and protected\n\
+\                                     members of public classes including field\n\
+\                                     type, method parameter types, returned type,\n\
+\                                     checked exception types etc
+
+main.opt.dotoutput=\
+\  -dotoutput <dir>                   Destination directory for DOT file output
+
+main.opt.depth=\
+\  -depth=<depth>                     Specify the depth of the transitive\n\
+\                                     dependency analysis
 
 err.unknown.option=unknown option: {0}
 err.missing.arg=no value given for {0}
@@ -53,6 +70,7 @@
 err.option.after.class=option must be specified before classes: {0}
 err.option.unsupported={0} not supported: {1}
 err.profiles.msg=No profile information
+err.dot.output.path=invalid path: {0}
 warn.invalid.arg=Invalid classname or pathname not exist: {0}
 warn.split.package=package {0} defined in {1} {2}
 
--- a/src/share/classes/javax/annotation/processing/Processor.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/javax/annotation/processing/Processor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -209,11 +209,11 @@
      * <dl>
      * <dt><i>SupportedOptionString:</i>
      * <dd><i>Identifiers</i>
-     * <p>
+     *
      * <dt><i>Identifiers:</i>
      * <dd> <i>Identifier</i>
      * <dd> <i>Identifier</i> {@code .} <i>Identifiers</i>
-     * <p>
+     *
      * <dt><i>Identifier:</i>
      * <dd>Syntactic identifier, including keywords and literals
      * </dl>
@@ -250,7 +250,7 @@
      * <dt><i>SupportedAnnotationTypeString:</i>
      * <dd><i>TypeName</i> <i>DotStar</i><sub><i>opt</i></sub>
      * <dd><tt>*</tt>
-     * <p>
+     *
      * <dt><i>DotStar:</i>
      * <dd><tt>.</tt> <tt>*</tt>
      * </dl>
--- a/src/share/classes/javax/lang/model/AnnotatedConstruct.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/javax/lang/model/AnnotatedConstruct.java	Mon Oct 28 18:30:14 2013 -0400
@@ -221,8 +221,8 @@
      *         type if present on this construct, else an empty array
      *
      * @see #getAnnotationMirrors()
-     * @see #getAnnotation(java.lang.Class)
-     * @see java.lang.reflect.AnnotatedElement#getAnnotationsByType
+     * @see #getAnnotation(Class)
+     * @see java.lang.reflect.AnnotatedElement#getAnnotationsByType(Class)
      * @see EnumConstantNotPresentException
      * @see AnnotationTypeMismatchException
      * @see IncompleteAnnotationException
--- a/src/share/classes/javax/lang/model/element/Element.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/javax/lang/model/element/Element.java	Mon Oct 28 18:30:14 2013 -0400
@@ -202,6 +202,7 @@
      * @return {@code true} if the specified object represents the same
      *          element as this
      */
+    @Override
     boolean equals(Object obj);
 
     /**
@@ -209,6 +210,7 @@
      *
      * @see #equals
      */
+    @Override
     int hashCode();
 
 
@@ -219,11 +221,18 @@
      * Elements#getAllAnnotationMirrors(Element)
      * getAllAnnotationMirrors}.
      *
-     * @see ElementFilter
      * @since 1.6
      */
     @Override
     List<? extends AnnotationMirror> getAnnotationMirrors();
+
+    /**
+     * {@inheritDoc}
+     * @since 1.6
+     */
+    @Override
+    <A extends Annotation> A getAnnotation(Class<A> annotationType);
+
     /**
      * Applies a visitor to this element.
      *
--- a/src/share/classes/javax/lang/model/overview.html	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/javax/lang/model/overview.html	Mon Oct 28 18:30:14 2013 -0400
@@ -1,8 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
 <!--
-Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2005, 2013, 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
@@ -25,7 +23,9 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<html>
+<head>
+<title>javax.lang.model</title>
 </head>
 
 <body bgcolor="white">
--- a/src/share/classes/javax/tools/Diagnostic.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/javax/tools/Diagnostic.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,15 @@
 
     /**
      * Kinds of diagnostics, for example, error or warning.
+     *
+     * The kind of a diagnostic can be used to determine how the
+     * diagnostic should be presented to the user. For example,
+     * errors might be colored red or prefixed with the word "Error",
+     * while warnings might be colored yellow or prefixed with the
+     * word "Warning". There is no requirement that the Kind
+     * should imply any inherent semantic meaning to the message
+     * of the diagnostic: for example, a tool might provide an
+     * option to report all warnings as errors.
      */
     enum Kind {
         /**
@@ -63,7 +72,7 @@
         /**
          * Problem similar to a warning, but is mandated by the tool's
          * specification.  For example, the Java&trade; Language
-         * Specification, 3rd Ed. mandates warnings on certain
+         * Specification mandates warnings on certain
          * unchecked operations and the use of deprecated methods.
          */
         MANDATORY_WARNING,
--- a/src/share/classes/javax/tools/overview.html	Fri Oct 11 17:51:08 2013 -0700
+++ b/src/share/classes/javax/tools/overview.html	Mon Oct 28 18:30:14 2013 -0400
@@ -1,3 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!--
+Copyright (c) 2005, 2013, 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.
+-->
+
+<html>
+<head>
+<title>javax.tools</title>
+</head>
 <body>
 
 <p>
@@ -21,3 +51,4 @@
 </ul>
 
 </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/jdk/Exported.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2013, 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 jdk;
+
+import java.lang.annotation.*;
+
+/**
+  * Indicates whether or not a JDK specific type or package is an
+  * exported part of the JDK suitable for use outside of the JDK
+  * implementation itself.
+  *
+  * This annotation should only be applied to types and packages
+  * <em>outside</em> of the Java SE namespaces of {@code java.*} and
+  * {@code javax.*} packages.  For example, certain portions of {@code
+  * com.sun.*} are official parts of the JDK meant to be generally
+  * usable while other portions of {@code com.sun.*} are not.  This
+  * annotation type allows those portions to be easily and
+  * programmatically distinguished.
+  *
+  * <p>If in one release a type or package is
+  * <code>@Exported(true)</code>, in a subsequent major release such a
+  * type or package can transition to <code>@Exported(false)</code>.
+  *
+  * <p>If a type or package is <code>@Exported(false)</code> in a
+  * release, it may be removed in a subsequent major release.
+  *
+  * <p>If a top-level type has an <code>@Exported</code> annotation,
+  * any nested member types with the top-level type should have an
+  * <code>@Exported</code> annotation with the same value.
+  *
+  * (In exceptional cases, if a nested type is going to be removed
+  * before its enclosing type, the nested type's could be
+  * <code>@Exported(false)</code> while its enclosing type was
+  * <code>@Exported(true)</code>.)
+  *
+  * Likewise, if a package has an <code>@Exported</code> annotation,
+  * top-level types within that package should also have an
+  * <code>@Exported</code> annotation.
+  *
+  * Sometimes a top-level type may have a different
+  * <code>@Exported</code> value than its package.
+  *
+  * @since 1.8
+  */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.PACKAGE})
+@Exported
+public @interface Exported {
+    /**
+     * Whether or not the annotated type or package is an exported part of the JDK.
+     */
+    boolean value() default true;
+}
--- a/src/share/classes/jdk/Supported.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2013, 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 jdk;
-
-import java.lang.annotation.*;
-
-/**
-  * Indicates whether or not a JDK specific type or package is a
-  * supported part of the JDK.
-  *
-  * This annotation should only be applied to types and packages
-  * <em>outside</em> of the Java SE namespaces of {@code java.*} and
-  * {@code javax.*} packages.  For example, certain portions of {@code
-  * com.sun.*} are official parts of the JDK meant to be generally
-  * usable while other portions of {@code com.sun.*} are not.  This
-  * annotation type allows those portions to be easily and
-  * programmaticly distinguished.
-  *
-  * @since 1.8
-  */
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.PACKAGE})
-@Supported
-public @interface Supported {
-    /**
-     * Whether or not this package or type is a supported part of the JDK.
-     */
-    boolean value() default true;
-}
--- a/test/Makefile	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/Makefile	Mon Oct 28 18:30:14 2013 -0400
@@ -217,8 +217,8 @@
 # Root of all test results
 TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
 ABS_TEST_OUTPUT_DIR := \
-	$(shell mkdir -p $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
-		cd  $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
+	$(shell mkdir -p $(TEST_OUTPUT_DIR); \
+		cd  $(TEST_OUTPUT_DIR); \
 		pwd $(CYGPATH))
 # Subdirectories for different test runs
 JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
--- a/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4638136 7198273
+ * @bug 4638136 7198273 8025633
  * @summary  Add ability to skip over nav bar for accessibility
  * @author dkramer
  * @run main AccessSkipNav
@@ -86,20 +86,20 @@
             // Testing only for the presence of the <a href> and <a name>
 
             // Top navbar <a href>
-            { "<a href=\"#skip-navbar_top\" title=\"Skip navigation links\">Skip navigation links</a>",
+            { "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
                      TMPDEST_DIR1 + "p1" + FS + "C1.html" },
 
             // Top navbar <a name>
-            { "<a name=\"skip-navbar_top\">" + LS +
+            { "<a name=\"skip.navbar.top\">" + LS +
                       "<!--   -->" + LS + "</a>",
                      TMPDEST_DIR1 + "p1" + FS + "C1.html" },
 
             // Bottom navbar <a href>
-            { "<a href=\"#skip-navbar_bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
+            { "<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
                      TMPDEST_DIR1 + "p1" + FS + "C1.html" },
 
             // Bottom navbar <a name>
-            { "<a name=\"skip-navbar_bottom\">" + LS +
+            { "<a name=\"skip.navbar.bottom\">" + LS +
                       "<!--   -->" + LS + "</a>",
                      TMPDEST_DIR1 + "p1" + FS + "C1.html" }
         };
--- a/test/com/sun/javadoc/AuthorDD/AuthorDD.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/AuthorDD/AuthorDD.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4651598
+ * @bug 4651598 8026567
  * @summary Javadoc wrongly inserts </DD> tags when using multiple @author tags
  * @author dkramer
  * @run main AuthorDD
@@ -86,12 +86,12 @@
 
              // Test single @since tag:
 
-            { "<dt><span class=\"strong\">Since:</span></dt>"+NL+"<dd>JDK 1.0</dd>",
+            { "<dt><span class=\"simpleTagLabel\">Since:</span></dt>"+NL+"<dd>JDK 1.0</dd>",
                                   BUGID + FS + "p1" + FS + "C1.html" },
 
             // Test multiple @author tags:
 
-            { "<dt><span class=\"strong\">Author:</span></dt>"+NL+"<dd>Doug Kramer, Jamie, Neal</dd>",
+            { "<dt><span class=\"simpleTagLabel\">Author:</span></dt>"+NL+"<dd>Doug Kramer, Jamie, Neal</dd>",
                                   BUGID + FS + "p1" + FS + "C1.html" },
 
         };
--- a/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, 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 4645058 4747738 4855054
+ * @bug 4645058 4747738 4855054 8024756
  * @summary  Javascript IE load error when linked by -linkoffline
  *           Window title shouldn't change when loading left frames (javascript)
  * @author dkramer
@@ -115,9 +115,13 @@
 
             // Test that win title javascript is followed by NOSCRIPT code.
             {"<script type=\"text/javascript\"><!--" + LS +
-                     "    if (location.href.indexOf('is-external=true') == -1) {" + LS +
-                     "        parent.document.title=\"C (Window Title)\";" + LS +
-                     "    }" + LS + "//-->" + LS + "</script>",
+            "    try {" + LS +
+            "        if (location.href.indexOf('is-external=true') == -1) {" + LS +
+            "            parent.document.title=\"C (Window Title)\";" + LS +
+            "        }" + LS +
+            "    }" + LS +
+            "    catch(err) {" + LS +
+            "    }" + LS + "//-->" + LS + "</script>",
              TMPDEST_DIR1 + FS + "p1" + FS + "C.html"
             }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,290 @@
+/*
+ * Copyright (c) 2013, 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 8025633
+ * @summary Test for valid name attribute in HTML anchors.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestAnchorNames
+ * @run main TestAnchorNames
+ */
+
+public class TestAnchorNames extends JavadocTester {
+
+    private static final String BUG_ID = "8025633";
+
+    //Input for string search tests.
+    private static final String[][] TEST = {
+
+        //Test some section markers and links to these markers
+
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"skip.navbar.top\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"nested.class.summary\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#nested.class.summary\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"method.summary\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#method.summary\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"field.detail\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#field.detail\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"constructor.detail\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#constructor.detail\">"
+        },
+
+        //Test some members and link to these members
+
+        //The marker for this appears in the serialized-form.html which we will
+        //test below
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../serialized-form.html#pkg1.RegClass\">"
+        },
+        //Test some fields
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z_\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z_\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z_:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z_:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z:D_\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z:D_\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z:Dfield\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z:Dfield\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"fieldInCla:D:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#fieldInCla:D:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"S_:D:D:D:D:DINT\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#S_:D:D:D:D:DINT\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"method:D:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#method:D:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+            "<a name=\"Z:Z_field_In_Class\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+            "<a href=\"../pkg1/DeprMemClass.html#Z:Z_field_In_Class\">"
+        },
+        //Test constructor
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"RegClass-java.lang.String-int-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#RegClass-java.lang.String-int-\">"
+        },
+        //Test some methods
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z_methodInClass-java.lang.String-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClass-java.lang.String-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"method--\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#method--\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"foo-java.util.Map-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#foo-java.util.Map-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"methodInCla:Ds-java.lang.String:A-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#methodInCla:Ds-java.lang.String:A-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z_methodInClas:D-java.lang.String-int-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClas:D-java.lang.String-int-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"methodD-pkg1.RegClass.:DA-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.:DA-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"methodD-pkg1.RegClass.D:A-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.D:A-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+            "<a name=\"Z:Z:Dmethod_In_Class--\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+            "<a href=\"../pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">"
+        },
+
+        //Test enum
+
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.Te$t_Enum.html",
+            "<a name=\"Z:Z:DFLD2\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.Te$t_Enum.html",
+            "<a href=\"../pkg1/RegClass.Te$t_Enum.html#Z:Z:DFLD2\">"
+        },
+
+        //Test nested class
+
+        {BUG_ID + FS + "pkg1" + FS + "RegClass._NestedClas$.html",
+            "<a name=\"RegClass._NestedClas:D--\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass._NestedClas$.html",
+            "<a href=\"../pkg1/RegClass._NestedClas$.html#RegClass._NestedClas:D--\">"
+        },
+
+        //Test class use page
+
+        {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "DeprMemClass.html",
+            "<a href=\"../../pkg1/RegClass.html#d____mc\">"
+        },
+
+        //Test deprecated list page
+
+        {BUG_ID + FS + "deprecated-list.html",
+            "<a href=\"pkg1/DeprMemClass.html#Z:Z_field_In_Class\">"
+        },
+        {BUG_ID + FS + "deprecated-list.html",
+            "<a href=\"pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">"
+        },
+
+        //Test constant values page
+
+        {BUG_ID + FS + "constant-values.html",
+            "<a href=\"pkg1/RegClass.html#S_:D:D:D:D:DINT\">"
+        },
+
+        //Test serialized form page
+
+        //This is the marker for the link that appears in the pkg1.RegClass.html page
+        {BUG_ID + FS + "serialized-form.html",
+            "<a name=\"pkg1.RegClass\">"
+        },
+
+        //Test member name index page
+
+        {BUG_ID + FS + "index-all.html",
+            "<a name=\"I:Z:Z:D\">"
+        },
+        {BUG_ID + FS + "index-all.html",
+            "<a href=\"#I:Z:Z:D\">$"
+        },
+        {BUG_ID + FS + "index-all.html",
+            "<a href=\"#I:Z:Z_\">_"
+        }
+    };
+
+    private static final String[][] NEGATED_TEST = {
+        //The marker name conversion should only affect HTML anchors. It should not
+        //affect the lables.
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            " Z:Z_"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            " Z:Z:Dfield"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            " Z:Z_field_In_Class"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            " S_:D:D:D:D:DINT"
+        },
+    };
+
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1"
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) throws Exception {
+        TestAnchorNames tester = new TestAnchorNames();
+        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/testAnchorNames/pkg1/DeprMemClass.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2013, 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 pkg1;
+
+public class DeprMemClass
+{
+    /**
+     * Field in the class.
+     * @deprecated Do not use this field.
+     */
+    public int _field_In_Class;
+
+    public int _fld;
+
+    /**
+     * Method in the class.
+     * @deprecated Do not use this method.
+     */
+    public void $method_In_Class() {
+    }
+
+    public void regularMethod() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testAnchorNames/pkg1/RegClass.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2013, 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 pkg1;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @serial This is the serial tag's comment.
+ */
+public class RegClass implements Serializable {
+
+    /**
+     * Normal field in class.
+     */
+    public String field;
+
+    /**
+     * Normal field in class.
+     */
+    public String method$$;
+
+    /**
+     * Filed staring with $.
+     */
+    public String $field;
+
+    /**
+     * Filed staring with underscore.
+     */
+    public String _field;
+
+    /**
+     * Serial field
+     * @serial
+     */
+    public boolean t_e$t;
+
+    /**
+     * Field in class with a $ in the name.
+     */
+    public String fieldInCla$$;
+
+    /**
+     * Field name as just an underscore.
+     */
+    public int _;
+
+    /**
+     * Field name as just a $.
+     */
+    public int $;
+
+    /**
+     * Field name with underscore and $.
+     */
+    public int _$;
+
+    /**
+     * Field name with $ and underscore.
+     */
+    public int $_;
+
+    /**
+     * An array.
+     */
+    public int arr[];
+
+    /**
+     * Another array.
+     */
+    public int[] arr1;
+
+    /**
+     * A constant field.
+     */
+    public static final int S_$$$$$INT = 0;
+
+    /**
+     * Another field.
+     */
+    public DeprMemClass d____mc;
+
+    /**
+     * An enum.
+     */
+    public static enum Te$t_Enum {
+        FLD_1,
+        $FLD2
+    };
+
+    /**
+     * A constructor.
+     */
+    public RegClass(String p, int i) {
+    }
+
+    /**
+     * Method in Class.
+     * @param p a string
+     */
+    public void _methodInClass(String p) {
+    }
+
+    /**
+     * Method in Class.
+     * @param p a string
+     * @param i an int
+     */
+    public void _methodInClas$(String p, int i) {
+    }
+
+    /**
+     * Method with $ in the name.
+     * @param p a string array
+     */
+    public void methodInCla$s(String[] p) {
+    }
+
+    /**
+     * Method with D[] as a parameter.
+     * @param p an array of D
+     */
+    public void methodD(D[] p) {
+    }
+
+    /**
+     * Method with $A as a parameter.
+     * @param p an object of $A
+     */
+    public void methodD($A p) {
+    }
+
+    /**
+     * Serial test.
+     * @serialData This is a serial data comment.
+     * @return null
+     */
+    protected Object $readResolve(){return null;}
+
+    /**
+     * Simple method.
+     */
+    public void method() {}
+
+    /**
+     * Generics.
+     */
+    public static <A> void foo(Map<A, Map<A, A>> map) {}
+
+    /**
+     * A nested class.
+     */
+    public class _NestedClas$ {}
+
+    /**
+     * Nested class D.
+     */
+    class D {}
+
+    /**
+     * Nested class $A.
+     */
+    class $A {}
+}
--- a/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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,8 @@
 
 /*
  * @test
- * @summary  Make sure that annotations types with optional elements has
+ * @bug 8025633
+ * @summary  Make sure that annotations types with optional elements have
  *           element headers
  * @author   Mahmood Ali
  * @library  ../lib/
@@ -45,7 +46,7 @@
     //Input for string search tests.
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "AnnotationOptional.html",
-            "<a name=\"annotation_type_element_detail\">"
+            "<a name=\"annotation.type.element.detail\">"
         }
     };
 
--- a/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4973609 8015249
+ * @bug      4973609 8015249 8025633 8026567
  * @summary  Make sure that annotation types with 0 members does not have
  *           extra HR tags.
  * @author   jamieh
@@ -45,17 +45,17 @@
     //Input for string search tests.
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
-            "<li>Summary:&nbsp;</li>" + NL + "<li><a href=\"#annotation_type_" +
-            "field_summary\">Field</a>&nbsp;|&nbsp;</li>"},
+            "<li>Summary:&nbsp;</li>" + NL + "<li><a href=\"#annotation.type." +
+            "field.summary\">Field</a>&nbsp;|&nbsp;</li>"},
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
-            "<li>Detail:&nbsp;</li>" + NL + "<li><a href=\"#annotation_type_" +
-            "field_detail\">Field</a>&nbsp;|&nbsp;</li>"},
+            "<li>Detail:&nbsp;</li>" + NL + "<li><a href=\"#annotation.type." +
+            "field.detail\">Field</a>&nbsp;|&nbsp;</li>"},
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
             "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->"},
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
             "<h3>Field Summary</h3>"},
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
-            "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../" +
+            "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../" +
             "pkg/AnnotationTypeField.html#DEFAULT_NAME\">DEFAULT_NAME</a></span>" +
             "</code>&nbsp;</td>"},
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
--- a/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4652655 4857717
+ * @bug 4652655 4857717 8025633 8026567
  * @summary This test verifies that class cross references work properly.
  * @author jamieh
  * @library ../lib/
@@ -45,10 +45,10 @@
             "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigDecimal.html?is-external=true\" " +
                 "title=\"class or interface in java.math\"><code>Link to external class BigDecimal</code></a>"},
         {BUG_ID + FS + "C.html",
-            "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd(java.math.BigInteger)\" " +
+            "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" " +
                 "title=\"class or interface in java.math\"><code>Link to external member gcd</code></a>"},
         {BUG_ID + FS + "C.html",
-            "<dl>" + NL + "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+            "<dl>" + NL + "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
             "<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>" + NL +
             "</dl>"}
     };
--- a/test/com/sun/javadoc/testClassTree/TestClassTree.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testClassTree/TestClassTree.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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      4632553 4973607
+ * @bug      4632553 4973607 8026567
  * @summary  No need to include type name (class, interface, etc.) before
  *           every single type in class tree.
  *           Make sure class tree includes heirarchy for enums and annotation
@@ -49,12 +49,12 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "package-tree.html",
             "<ul>" + NL + "<li type=\"circle\">pkg.<a href=\"../pkg/ParentClass.html\" " +
-            "title=\"class in pkg\"><span class=\"strong\">ParentClass</span></a>"},
+            "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a>"},
 
         {BUG_ID + FS + "pkg" + FS + "package-tree.html",
             "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>" + NL +
             "<ul>" + NL + "<li type=\"circle\">pkg.<a href=\"../pkg/AnnotationType.html\" " +
-            "title=\"annotation in pkg\"><span class=\"strong\">AnnotationType</span></a> " +
+            "title=\"annotation in pkg\"><span class=\"typeNameLink\">AnnotationType</span></a> " +
             "(implements java.lang.annotation.Annotation)</li>" + NL + "</ul>"},
 
         {BUG_ID + FS + "pkg" + FS + "package-tree.html",
@@ -63,14 +63,14 @@
             "<li type=\"circle\">java.lang.Enum&lt;E&gt; (implements java.lang." +
             "Comparable&lt;T&gt;, java.io.Serializable)" + NL + "<ul>" + NL +
             "<li type=\"circle\">pkg.<a href=\"../pkg/Coin.html\" " +
-            "title=\"enum in pkg\"><span class=\"strong\">Coin</span></a></li>" + NL +
+            "title=\"enum in pkg\"><span class=\"typeNameLink\">Coin</span></a></li>" + NL +
             "</ul>" + NL + "</li>" + NL + "</ul>" + NL + "</li>" + NL + "</ul>"
         },
     };
     private static final String[][] NEGATED_TEST = {
         {BUG_ID + FS + "pkg" + FS + "package-tree.html",
             "<li type=\"circle\">class pkg.<a href=\"../pkg/ParentClass.html\" " +
-            "title=\"class in pkg\"><span class=\"strong\">ParentClass</span></a></li>"}
+            "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a></li>"}
         };
 
     /**
--- a/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4904037
+ * @bug      4904037 8026567
  * @summary  The constructor comments should be surrounded by
  *           <dl></dl>.  Check for this in the output.
  * @author   jamieh
@@ -47,7 +47,7 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "C.html", "<div class=\"block\">" +
                  "This is just a simple constructor.</div>" + NL +
-                 "<dl>" + NL + "<dt><span class=\"strong\">Parameters:</span></dt>" + NL +
+                 "<dl>" + NL + "<dt><span class=\"paramLabel\">Parameters:</span></dt>" + NL +
                  "<dd><code>i</code> - a param.</dd>" + NL +"</dl>"
         }
     };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testCustomTag/TagTestClass.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+/**
+ * @customTag A custom tag.
+ * @unknownTag An unknown tag
+ */
+public class TagTestClass {
+
+    public void method(){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testCustomTag/TestCustomTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2013, 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      8006248
+ * @summary  Test custom tag. Verify that an unknown tag generates appropriate warnings.
+ * @author   Bhavesh Patel
+ * @library  ../lib/
+ * @build    JavadocTester taglets.CustomTag TestCustomTag
+ * @run main TestCustomTag
+ */
+
+public class TestCustomTag extends JavadocTester {
+
+    //Test information.
+    private static final String BUG_ID = "8006248";
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+        "-Xdoclint:none", "-d", BUG_ID, "-tagletpath", SRC_DIR,
+        "-taglet", "taglets.CustomTag", "-sourcepath",
+        SRC_DIR, SRC_DIR + FS + "TagTestClass.java"
+    };
+
+    private static final String[] ARGS1 = new String[] {
+        "-d", BUG_ID + "-1", "-tagletpath", SRC_DIR, "-taglet", "taglets.CustomTag",
+        "-sourcepath", SRC_DIR, SRC_DIR + FS + "TagTestClass.java"
+    };
+    private static final String[] ARGS2 = new String[] {
+        "-Xdoclint:none", "-d", BUG_ID + "-2", "-sourcepath",
+        SRC_DIR, SRC_DIR + FS + "TagTestClass.java"
+    };
+
+    private static final String[] ARGS3 = new String[] {
+        "-d", BUG_ID + "-3", "-sourcepath", SRC_DIR, SRC_DIR + FS + "TagTestClass.java"
+    };
+
+    //Input for string search tests.
+    private static final String[][] TEST = new String[][] {
+        {WARNING_OUTPUT, "warning - @unknownTag is an unknown tag."
+        }
+    };
+
+    private static final String[][] TEST1 = new String[][] {
+        {ERROR_OUTPUT, "error: unknown tag: unknownTag"
+        }
+    };
+    private static final String[][] TEST2 = new String[][] {
+        {WARNING_OUTPUT, "warning - @customTag is an unknown tag."
+        },
+        {WARNING_OUTPUT, "warning - @unknownTag is an unknown tag."
+        }
+    };
+
+    private static final String[][] TEST3 = new String[][] {
+        {ERROR_OUTPUT, "error: unknown tag: customTag"
+        },
+        {ERROR_OUTPUT, "error: unknown tag: unknownTag"
+        }
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestCustomTag tester = new TestCustomTag();
+        run(tester, ARGS, TEST, NO_TEST);
+        run(tester, ARGS1, TEST1, NO_TEST);
+        run(tester, ARGS2, TEST2, NO_TEST);
+        run(tester, ARGS3, TEST3, NO_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/testCustomTag/taglets/CustomTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2013, 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 taglets;
+
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.taglets.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+
+import com.sun.javadoc.*;
+import java.util.*;
+
+public class CustomTag extends BaseTaglet {
+
+    public CustomTag() {
+        name = "customTag";
+    }
+
+    public static void register(Map tagletMap) {
+       CustomTag tag = new CustomTag();
+       Taglet t = (Taglet) tagletMap.get(tag.getName());
+       if (t != null) {
+           tagletMap.remove(tag.getName());
+       }
+       tagletMap.put(tag.getName(), tag);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Tag tag, TagletWriter writer) {
+        ArrayList inlineTags = new ArrayList();
+        inlineTags.add(new TextTag(tag.holder(), "<dt><span class=\"simpleTagLabel\">Custom Tag:</span></dt><dd>"));
+        inlineTags.addAll(Arrays.asList(tag.inlineTags()));
+        inlineTags.add(new TextTag(tag.holder(), "</dd>"));
+        return writer.commentTagsToOutput(tag,
+                (Tag[]) inlineTags.toArray(new Tag[] {}));
+    }
+}
--- a/test/com/sun/javadoc/testDeprecatedDocs/TestDeprecatedDocs.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testDeprecatedDocs/TestDeprecatedDocs.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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      4927552
+ * @bug      4927552 8026567
  * @summary  <DESC>
  * @author   jamieh
  * @library  ../lib/
@@ -76,20 +76,20 @@
         {TARGET_FILE, "pkg.DeprecatedClassByAnnotation.field"},
 
         {TARGET_FILE2, "<pre>@Deprecated" + NL +
-                 "public class <span class=\"strong\">DeprecatedClassByAnnotation</span>" + NL +
+                 "public class <span class=\"typeNameLabel\">DeprecatedClassByAnnotation</span>" + NL +
                  "extends java.lang.Object</pre>"},
 
         {TARGET_FILE2, "<pre>@Deprecated" + NL +
                  "public&nbsp;int field</pre>" + NL +
-                 "<div class=\"block\"><span class=\"strong\">Deprecated.</span>&nbsp;</div>"},
+                 "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>"},
 
         {TARGET_FILE2, "<pre>@Deprecated" + NL +
                  "public&nbsp;DeprecatedClassByAnnotation()</pre>" + NL +
-                 "<div class=\"block\"><span class=\"strong\">Deprecated.</span>&nbsp;</div>"},
+                 "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>"},
 
         {TARGET_FILE2, "<pre>@Deprecated" + NL +
                  "public&nbsp;void&nbsp;method()</pre>" + NL +
-                 "<div class=\"block\"><span class=\"strong\">Deprecated.</span>&nbsp;</div>"},
+                 "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>"},
     };
 
     private static final String[][] NEGATED_TEST = NO_TEST;
--- a/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,14 +23,13 @@
 
 /*
  * @test
- * @bug 4857717
+ * @bug 4857717 8025633 8026567
  * @summary Test to make sure that externally overriden and implemented methods
  * are documented properly.  The method should still include "implements" or
  * "overrides" documentation even though the method is external.
  * @author jamieh
  * @library ../lib/
- * @build JavadocTester
- * @build TestExternalOverridenMethod
+ * @build JavadocTester TestExternalOverridenMethod
  * @run main TestExternalOverridenMethod
  */
 
@@ -39,14 +38,14 @@
     private static final String BUG_ID = "4857717";
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "XReader.html",
-            "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-            "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true#read()\" " +
+            "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
+            "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true#read--\" " +
             "title=\"class or interface in java.io\">read</a></code>&nbsp;in class&nbsp;<code>" +
             "<a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true\" " +
             "title=\"class or interface in java.io\">FilterReader</a></code></dd>"},
         {BUG_ID + FS + "pkg" + FS + "XReader.html",
-            "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-            "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true#readInt()\" " +
+            "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>" + NL +
+            "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true#readInt--\" " +
             "title=\"class or interface in java.io\">readInt</a></code>&nbsp;in interface&nbsp;<code>" +
             "<a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true\" " +
             "title=\"class or interface in java.io\">DataInput</a></code></dd>"}};
--- a/test/com/sun/javadoc/testHref/TestHref.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testHref/TestHref.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4663254 8016328
+ * @bug      4663254 8016328 8025633 8026567
  * @summary  Verify that spaces do not appear in hrefs and anchors.
  * @author   jamieh
  * @library  ../lib/
@@ -46,31 +46,31 @@
     private static final String[][] TEST = {
         //External link.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)\""
+            "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\""
         },
         //Member summary table link.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\""
+            "href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\""
         },
         //Anchor test.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "<a name=\"method(int, int, java.util.ArrayList)\">" + NL +
+            "<a name=\"method-int-int-java.util.ArrayList-\">" + NL +
             "<!--   -->" + NL +
             "</a>"
         },
         //Backward compatibility anchor test.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "<a name=\"method(int, int, java.util.ArrayList)\">" + NL +
+            "<a name=\"method-int-int-java.util.ArrayList-\">" + NL +
             "<!--   -->" + NL +
             "</a>"
         },
         //{@link} test.
         {BUG_ID + FS + "pkg" + FS + "C2.html",
-            "Link: <a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
+            "Link: <a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">"
         },
         //@see test.
         {BUG_ID + FS + "pkg" + FS + "C2.html",
-            "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
+            "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">"
         },
 
         //Header does not link to the page itself.
@@ -80,7 +80,7 @@
 
         //Signature does not link to the page itself.
         {BUG_ID + FS + "pkg" + FS + "C4.html",
-            "public abstract class <span class=\"strong\">C4&lt;E extends C4&lt;E&gt;&gt;</span>"
+            "public abstract class <span class=\"typeNameLabel\">C4&lt;E extends C4&lt;E&gt;&gt;</span>"
         },
     };
     private static final String[][] NEGATED_TEST =
--- a/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -25,7 +25,7 @@
 
 /*
  * @test
- * @bug 6786690 6820360
+ * @bug 6786690 6820360 8025633 8026567
  * @summary This test verifies the nesting of definition list tags.
  * @author Bhavesh Patel
  * @library ../lib/
@@ -43,7 +43,7 @@
     // for default value.
     private static final String[][] TEST_ALL = {
         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<pre>public class " +
-                 "<span class=\"strong\">C1</span>" + NL +
+                 "<span class=\"typeNameLabel\">C1</span>" + NL +
                  "extends java.lang.Object" + NL + "implements java.io.Serializable</pre>"},
         {BUG_ID + FS + "pkg1" + FS + "C4.html", "<dl>" + NL +
                  "<dt>Default:</dt>" + NL + "<dd>true</dd>" + NL +
@@ -54,64 +54,64 @@
     // enclosing comments, tags and deprecated information.
     private static final String[][] TEST_CMNT_DEPR = {
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" + NL +
-                 "<dt><span class=\"strong\">Since:</span></dt>" + NL +
+                 "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
                  "<dd>JDK1.0</dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:</span></dt>" + NL +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
+                 "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"seeLabel\">See Also:</span></dt>" + NL +
                  "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>" +
                  "C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" +
                  "Serialized Form</a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL +
-                 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
-                 "<a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<dt><span class=\"seeLabel\">See Also:</span></dt>" + NL + "<dd>" +
+                 "<a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>"+ NL + "<dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>title" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>"+ NL + "<dt><span class=\"paramLabel\">Parameters:</span></dt>" + NL + "<dd><code>title" +
                  "</code> - the title</dd>" + NL + "<dd><code>test</code> - boolean value" +
-                 "</dd>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL +
+                 "</dd>" + NL + "<dt><span class=\"throwsLabel\">Throws:</span></dt>" + NL +
                  "<dd><code>java.lang.IllegalArgumentException</code> - if the " +
                  "<code>owner</code>'s" + NL +
                  "     <code>GraphicsConfiguration</code> is not from a screen " +
                  "device</dd>" + NL + "<dd><code>HeadlessException</code></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>undecorated" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"paramLabel\">Parameters:</span></dt>" + NL + "<dd><code>undecorated" +
                  "</code> - <code>true</code> if no decorations are" + NL +
                  "         to be enabled;" + NL + "         <code>false</code> " +
-                 "if decorations are to be enabled.</dd>" + NL + "<dt><span class=\"strong\">Since:" +
+                 "if decorations are to be enabled.</dd>" + NL + "<dt><span class=\"simpleTagLabel\">Since:" +
                  "</span></dt>" + NL + "<dd>1.4</dd>" + NL +
-                 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
-                 "<a href=\"../pkg1/C1.html#readObject()\"><code>readObject()" +
+                 "<dt><span class=\"seeLabel\">See Also:</span></dt>" + NL + "<dd>" +
+                 "<a href=\"../pkg1/C1.html#readObject--\"><code>readObject()" +
                  "</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL +
-                 "<dd><code>java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:" +
-                 "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"throwsLabel\">Throws:</span></dt>" + NL +
+                 "<dd><code>java.io.IOException</code></dd>" + NL + "<dt><span class=\"seeLabel\">See Also:" +
+                 "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:" +
-                 "</span></dt>" + NL + "<dd><code>set</code> - boolean</dd>" + NL + "<dt><span class=\"strong\">" +
+        {BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl>" + NL + "<dt><span class=\"paramLabel\">Parameters:" +
+                 "</span></dt>" + NL + "<dd><code>set</code> - boolean</dd>" + NL + "<dt><span class=\"simpleTagLabel\">" +
                  "Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
+        {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"throwsLabel\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>" +
-                 "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "java.io.IOException</code></dd>" + NL + "<dt><span class=\"seeLabel\">See Also:</span>" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
-                 "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
+                 "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by" + NL +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 is " +
-                 "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
+                 "<dd>1.4</dd>" + NL + "<dt><span class=\"seeLabel\">See Also:</span>" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
-                 "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
+                 "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by" + NL +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
-                 "<dl>" + NL + "<dt><span class=\"strong\">Throws:" +
+                 "<dl>" + NL + "<dt><span class=\"throwsLabel\">Throws:" +
                  "</span></dt>" + NL + "<dd><code><code>" +
                  "IOException</code></code></dd>" + NL +
                  "<dd><code>java.io.IOException</code></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
                  "&nbsp;</div>" + NL +
                  "<div class=\"block\">The name for this class.</div>"}};
 
@@ -122,55 +122,55 @@
     // and deprecated information.
     private static final String[][] TEST_NODEPR = {
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" + NL +
-                 "<dt><span class=\"strong\">Since:</span></dt>" + NL +
+                 "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
                  "<dd>JDK1.0</dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Since:</span>" +
-                 "</dt>" + NL + "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span>" +
+                 "</dt>" + NL + "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"seeLabel\">See Also:" +
                  "</span></dt>" + NL + "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" +
                  "<code>C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" +
                  "Serialized Form</a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"paramLabel\">Parameters:" +
                  "</span></dt>" + NL + "<dd><code>title</code> - the title</dd>" + NL + "<dd><code>" +
-                 "test</code> - boolean value</dd>" + NL + "<dt><span class=\"strong\">Throws:" +
+                 "test</code> - boolean value</dd>" + NL + "<dt><span class=\"throwsLabel\">Throws:" +
                  "</span></dt>" + NL + "<dd><code>java.lang.IllegalArgumentException" +
                  "</code> - if the <code>owner</code>'s" + NL + "     <code>GraphicsConfiguration" +
                  "</code> is not from a screen device</dd>" + NL + "<dd><code>" +
                  "HeadlessException</code></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"paramLabel\">Parameters:" +
                  "</span></dt>" + NL + "<dd><code>undecorated</code> - <code>true</code>" +
                  " if no decorations are" + NL + "         to be enabled;" + NL +
                  "         <code>false</code> if decorations are to be enabled." +
-                 "</dd>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL +
-                 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject()\">" +
+                 "</dd>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL +
+                 "<dt><span class=\"seeLabel\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject--\">" +
                  "<code>readObject()</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"throwsLabel\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>java.io.IOException</code></dd>" + NL + "<dt>" +
-                 "<span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<span class=\"seeLabel\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
+        {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"throwsLabel\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>" +
-                 "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "java.io.IOException</code></dd>" + NL + "<dt><span class=\"seeLabel\">See Also:</span>" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
-                 "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
+                 "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by" + NL +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 is " +
-                 "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
+                 "<dd>1.4</dd>" + NL + "<dt><span class=\"seeLabel\">See Also:</span>" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
-                 "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
+                 "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by" + NL +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
-                 "<dl>" + NL + "<dt><span class=\"strong\">Throws:" +
+                 "<dl>" + NL + "<dt><span class=\"throwsLabel\">Throws:" +
                  "</span></dt>" + NL + "<dd><code><code>" +
                  "IOException</code></code></dd>" + NL +
                  "<dd><code>java.io.IOException</code></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
                  "&nbsp;</div>" + NL + "<div class=\"block\">" +
                  "The name for this class.</div>"}};
 
@@ -186,14 +186,14 @@
                  "title=\"enum in pkg1\">C1.ModalExclusionType</a> " +
                  "APPLICATION_EXCLUDE</pre>" + NL + "</li>"},
         {BUG_ID + FS + "serialized-form.html", "<pre>boolean " +
-                 "undecorated</pre>" + NL + "<div class=\"block\"><span class=\"strong\">" +
-                 "Deprecated.</span>&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>" +
+                 "undecorated</pre>" + NL + "<div class=\"block\"><span class=\"deprecatedLabel\">" +
+                 "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by" + NL +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" +
                  "setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">" +
-                 "Deprecated.</span>&nbsp;<span class=\"italic\">As of JDK version" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">" +
+                 "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version" +
                  " 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"}};
 
     // Test for valid HTML generation which should not comprise of empty
--- a/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -25,7 +25,7 @@
 
 /*
  * @test
- * @bug 6786028
+ * @bug 6786028 8026567
  * @summary This test verifys the use of <strong> HTML tag instead of <B> by Javadoc std doclet.
  * @author Bhavesh Patel
  * @library ../lib/
@@ -38,7 +38,7 @@
 
     private static final String BUG_ID = "6786028";
     private static final String[][] TEST1 = {
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<span class=\"strong\">See Also:</span>"}};
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<span class=\"seeLabel\">See Also:</span>"}};
     private static final String[][] NEGATED_TEST1 = {
         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<STRONG>Method Summary</STRONG>"},
         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<B>"},
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2013, 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 8008164
+ * @summary Test styles on HTML tables generated by javadoc.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestHtmlTableStyles
+ * @run main TestHtmlTableStyles
+ */
+
+public class TestHtmlTableStyles extends JavadocTester {
+
+    private static final String BUG_ID = "8008164";
+
+    //Input for string search tests.
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table border cellpadding=3 cellspacing=1>"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Field Summary table, listing fields, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Constructor Summary table, listing " +
+            "constructors, and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Method Summary table, listing methods, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Class Summary table, listing classes, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "TestTable.html",
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Use table, listing fields, and an explanation\">"
+        },
+        {BUG_ID + FS + "overview-summary.html",
+            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Packages table, listing packages, and an explanation\">"
+        },
+        {BUG_ID + FS + "deprecated-list.html",
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Deprecated Methods table, listing " +
+            "deprecated methods, and an explanation\">"
+        },
+        {BUG_ID + FS + "constant-values.html",
+            "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Constant Field Values table, listing " +
+            "constant fields, and values\">"
+        },
+    };
+
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) throws Exception {
+        TestHtmlTableStyles tester = new TestHtmlTableStyles();
+        run(tester, ARGS, TEST, NO_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/testHtmlTableStyles/pkg1/TestTable.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013, 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 pkg1;
+
+/**
+ * Testing table in documentation comment. In the generated documentation, it
+ * should be displayed as a regular table and not have any styles that the javadoc
+ * generated tables have.
+ *
+ * <table border cellpadding=3 cellspacing=1>
+ * <caption>Summary of test table</caption>
+ *  <tr>
+ *    <td></td>
+ *    <td align=center colspan = 2> First Element (Head)</td>
+ *    <td align=center colspan = 2> Last Element (Tail)</td>
+ *  </tr>
+ *  <tr>
+ *    <td></td>
+ *    <td align=center><em>Throws exception</em></td>
+ *    <td align=center><em>Special value</em></td>
+ *    <td align=center><em>Throws exception</em></td>
+ *    <td align=center><em>Special value</em></td>
+ *  </tr>
+ *  <tr>
+ *    <td>Insert</td>
+ *    <td>addFirst(e)</td>
+ *    <td>offerFirst(e)</td>
+ *    <td>addLast(e)</td>
+ *    <td>offerLast(e)</td>
+ *  </tr>
+ *  <tr>
+ *    <td>Remove</td>
+ *    <td>removeFirst()</td>
+ *    <td>pollFirst()</td>
+ *    <td>removeLast()</td>
+ *    <td>pollLast()</td>
+ *  </tr>
+ * </table>
+ */
+public class TestTable
+{
+    /**
+     * Field in Class.
+     */
+    public String field;
+
+    /**
+     * Field constant in Class.
+     */
+    public static final int fieldCnst = 0;
+
+    /**
+     * Method in Class.
+     */
+    public void methodInClass(int i) {}
+
+    /**
+     * Deprecated method in Class.
+     * @deprecated Do not use it.
+     */
+    public void deprMethod() {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2013, 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 pkg2;
+
+import pkg1.*;
+
+/**
+ * Testing use of TestTable.
+ */
+public class TestUse
+{
+    public TestTable tTable;
+}
--- a/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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      6786688
+ * @bug      6786688 8008164
  * @summary  HTML tables should have table summary, caption and table headers.
  * @author   Bhavesh Patel
  * @library  ../lib/
@@ -50,121 +50,121 @@
 
         //Package summary
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Class Summary table, " +
             "listing classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Interface Summary table, " +
             "listing interfaces, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Enum Summary table, " +
             "listing enums, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Annotation Types Summary table, " +
             "listing annotation types, and an explanation\">"
         },
         // Class documentation
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Field Summary table, listing fields, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Method Summary table, listing methods, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Nested Class Summary table, listing " +
             "nested classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Constructor Summary table, listing " +
             "constructors, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.ModalExclusionType.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Enum Constant Summary table, listing " +
             "enum constants, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C3.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Required Element Summary table, " +
             "listing required elements, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C4.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Optional Element Summary table, " +
             "listing optional elements, and an explanation\">"
         },
         // Class use documentation
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "I1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing fields, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing fields, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         // Package use documentation
         {BUG_ID + FS + "pkg1" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing classes, and an explanation\">"
         },
         // Deprecated
         {BUG_ID + FS + "deprecated-list.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Deprecated Fields table, listing deprecated fields, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "deprecated-list.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Deprecated Methods table, listing deprecated methods, " +
             "and an explanation\">"
         },
         // Constant values
         {BUG_ID + FS + "constant-values.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Constant Field Values table, listing " +
             "constant fields, and values\">"
         },
--- a/test/com/sun/javadoc/testIndex/TestIndex.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testIndex/TestIndex.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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      4852280 4517115 4973608 4994589
+ * @bug      4852280 4517115 4973608 4994589 8026567
  * @summary  Perform tests on index.html file.
  *           Also test that index-all.html has the appropriate output.
  *           Test for unnamed package in index.
@@ -53,27 +53,27 @@
 
         //Test index-all.html
         {BUG_ID + FS + "index-all.html",
-            "<a href=\"pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">C</span></a>" +
+            "<a href=\"pkg/C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">C</span></a>" +
             " - Class in <a href=\"pkg/package-summary.html\">pkg</a>"},
         {BUG_ID + FS + "index-all.html",
             "<a href=\"pkg/Interface.html\" title=\"interface in pkg\">" +
-            "<span class=\"strong\">Interface</span></a> - Interface in " +
+            "<span class=\"typeNameLink\">Interface</span></a> - Interface in " +
             "<a href=\"pkg/package-summary.html\">pkg</a>"},
         {BUG_ID + FS + "index-all.html",
             "<a href=\"pkg/AnnotationType.html\" title=\"annotation in pkg\">" +
-            "<span class=\"strong\">AnnotationType</span></a> - Annotation Type in " +
+            "<span class=\"typeNameLink\">AnnotationType</span></a> - Annotation Type in " +
             "<a href=\"pkg/package-summary.html\">pkg</a>"},
         {BUG_ID + FS + "index-all.html",
             "<a href=\"pkg/Coin.html\" title=\"enum in pkg\">" +
-            "<span class=\"strong\">Coin</span></a> - Enum in " +
+            "<span class=\"typeNameLink\">Coin</span></a> - Enum in " +
             "<a href=\"pkg/package-summary.html\">pkg</a>"},
         {BUG_ID + FS + "index-all.html",
             "Class in <a href=\"package-summary.html\">&lt;Unnamed&gt;</a>"},
         {BUG_ID + FS + "index-all.html",
-            "<dl>" + NL + "<dt><span class=\"strong\"><a href=\"pkg/C.html#Java\">" +
+            "<dl>" + NL + "<dt><span class=\"memberNameLink\"><a href=\"pkg/C.html#Java\">" +
             "Java</a></span> - Static variable in class pkg.<a href=\"pkg/C.html\" " +
             "title=\"class in pkg\">C</a></dt>" + NL + "<dd>&nbsp;</dd>" + NL +
-            "<dt><span class=\"strong\"><a href=\"pkg/C.html#JDK\">JDK</a></span> " +
+            "<dt><span class=\"memberNameLink\"><a href=\"pkg/C.html#JDK\">JDK</a></span> " +
             "- Static variable in class pkg.<a href=\"pkg/C.html\" title=\"class in pkg\">" +
             "C</a></dt>" + NL + "<dd>&nbsp;</dd>" + NL + "</dl>"},
     };
--- a/test/com/sun/javadoc/testInterface/TestInterface.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testInterface/TestInterface.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4682448 4947464 5029946
+ * @bug      4682448 4947464 5029946 8025633 8026567
  * @summary  Verify that the public modifier does not show up in the
  *           documentation for public methods, as recommended by the JLS.
  *           If A implements I and B extends A, B should be in the list of
@@ -83,8 +83,8 @@
         },
         //Make sure "Specified By" has substituted type parameters.
         {BUG_ID + FS + "pkg" + FS + "Child.html",
-            "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg/Interface.html#method()\">method</a>" +
+            "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>" + NL +
+            "<dd><code><a href=\"../pkg/Interface.html#method--\">method</a>" +
             "</code>&nbsp;in interface&nbsp;<code>" +
             "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" +
             "Interface</a>&lt;<a href=\"../pkg/Child.html\" title=\"type parameter in Child\">" +
@@ -92,8 +92,8 @@
          },
         //Make sure "Overrides" has substituted type parameters.
         {BUG_ID + FS + "pkg" + FS + "Child.html",
-            "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg/Parent.html#method()\">method</a>" +
+            "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
+            "<dd><code><a href=\"../pkg/Parent.html#method--\">method</a>" +
             "</code>&nbsp;in class&nbsp;<code><a href=\"../pkg/Parent.html\" " +
             "title=\"class in pkg\">Parent</a>&lt;<a href=\"../pkg/Child.html\" " +
             "title=\"type parameter in Child\">T</a>&gt;</code></dd>"
--- a/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7112427 8012295
+ * @bug 7112427 8012295 8025633 8026567
  * @summary Test of the JavaFX doclet features.
  * @author jvalenta
  * @library ../lib/
@@ -38,32 +38,32 @@
     private static final String[][] TEST =
         new String[][] {
             {"./" + BUG_ID + "/C.html",
-                "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
-                "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"},
+                "<dt><span class=\"seeLabel\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate--\"><code>getRate()</code></a>, " + NL +
+                "<a href=\"C.html#setRate-double-\"><code>setRate(double)</code></a></dd>"},
             {"./" + BUG_ID + "/C.html",
                 "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL +
                 "<div class=\"block\">Sets the value of the property rate.</div>" + NL +
-                "<dl>" + NL + "<dt><span class=\"strong\">Property description:</span></dt>" },
+                "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>" },
             {"./" + BUG_ID + "/C.html",
                 "<pre>public final&nbsp;double&nbsp;getRate()</pre>" + NL +
                 "<div class=\"block\">Gets the value of the property rate.</div>" + NL +
-                "<dl>" + NL + "<dt><span class=\"strong\">Property description:</span></dt>" },
+                "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>" },
             {"./" + BUG_ID + "/C.html",
-                "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"C.html#rateProperty\">rate</a></span></code>" + NL +
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"C.html#rateProperty\">rate</a></span></code>" + NL +
                 "<div class=\"block\">Defines the direction/speed at which the <code>Timeline</code> is expected to"},
 
             {"./" + BUG_ID + "/C.html",
-                "<span class=\"strong\">Default value:</span>"},
+                "<span class=\"simpleTagLabel\">Default value:</span>"},
             {"./" + BUG_ID + "/C.html",
-                "<span class=\"strong\">Since:</span></dt>" + NL + "<dd>JavaFX 8.0</dd>" },
+                "<span class=\"simpleTagLabel\">Since:</span></dt>" + NL + "<dd>JavaFX 8.0</dd>" },
             {"./" + BUG_ID + "/C.html",
                 "<p>Sets the value of the property <code>Property</code>"},
             {"./" + BUG_ID + "/C.html",
                 "<p>Gets the value of the property <code>Property</code>"},
             {"./" + BUG_ID + "/C.html",
-                "<span class=\"strong\">Property description:</span>"},
+                "<span class=\"simpleTagLabel\">Property description:</span>"},
             {"./" + BUG_ID + "/C.html",
-                "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"C.html#setTestMethodProperty()\">setTestMethodProperty</a></span>()</code>&nbsp;</td>" },
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"C.html#setTestMethodProperty--\">setTestMethodProperty</a></span>()</code>&nbsp;</td>" },
             {"./" + BUG_ID + "/C.html",
                 "<h4>isPaused</h4>" + NL +
                 "<pre>public final&nbsp;double&nbsp;isPaused()</pre>" + NL +
--- a/test/com/sun/javadoc/testJavascript/TestJavascript.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4665566 4855876 7025314 8012375 8015997 8016328
+ * @bug      4665566 4855876 7025314 8012375 8015997 8016328 8024756
  * @summary  Verify that the output has the right javascript.
  * @author   jamieh
  * @library  ../lib/
@@ -104,9 +104,13 @@
 
         //Make sure title javascript only runs if is-external is not true
         {BUG_ID + FS + "pkg" + FS + "C.html",
-                "    if (location.href.indexOf('is-external=true') == -1) {" + NL +
-                "        parent.document.title=\"C\";" + NL +
-                        "    }"},
+            "    try {" + NL +
+            "        if (location.href.indexOf('is-external=true') == -1) {" + NL +
+            "            parent.document.title=\"C\";" + NL +
+            "        }" + NL +
+            "    }" + NL +
+            "    catch(err) {" + NL +
+            "    }"},
     };
 
     private static final String[][] NEGATED_TEST = NO_TEST;
--- a/test/com/sun/javadoc/testLegacyTaglet/Check.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testLegacyTaglet/Check.java	Mon Oct 28 18:30:14 2013 -0400
@@ -126,7 +126,7 @@
      * @param tag the tag representation of this custom tag.
      */
     public String toString(Tag tag) {
-        return "<dt><span class=\"strong\">" + TAG_HEADER + ":</span></dt><dd>" + tag.text() +
+        return "<dt><span class=\"simpleTagLabel\">" + TAG_HEADER + ":</span></dt><dd>" + tag.text() +
                 "</dd>\n";
     }
 
--- a/test/com/sun/javadoc/testLinkOption/TestLinkOption.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testLinkOption/TestLinkOption.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, 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 4720957 5020118
+ * @bug 4720957 5020118 8026567
  * @summary Test to make sure that -link and -linkoffline link to
  * right files.
  * @author jamieh
@@ -61,7 +61,7 @@
                                 "Object</a>&nbsp;p3)"
         },
         {BUG_ID + "-1" + FS + "java" + FS + "lang" + FS + "StringBuilderChild.html",
-                "<pre>public abstract class <span class=\"strong\">StringBuilderChild</span>" + NL +
+                "<pre>public abstract class <span class=\"typeNameLabel\">StringBuilderChild</span>" + NL +
                 "extends <a href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true\" " +
                 "title=\"class or interface in java.lang\">Object</a></pre>"
         },
--- a/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4732864 6280605 7064544 8014636 8016328
+ * @bug      4732864 6280605 7064544 8014636 8016328 8025633
  * @summary  Make sure that you can link from one member to another using
  *           non-qualified name, furthermore, ensure the right one is linked.
  * @author   jamieh
@@ -49,9 +49,9 @@
             "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
             " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
             " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
-            " Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>" + NL +
-            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL +
-            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
+            " Qualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>" + NL +
+            " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL +
+            " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
         },
         {BUG_ID + FS + "pkg" + FS + "C.InnerC.html",
             "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>" + NL +
--- a/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4638588 4635809 6256068 6270645
+ * @bug 4638588 4635809 6256068 6270645 8025633 8026567
  * @summary Test to make sure that members are inherited properly in the Javadoc.
  *          Verify that inheritence labels are correct.
  * @author jamieh
@@ -44,7 +44,7 @@
 
         //Public method should be inherited
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
-         "<a href=\"../pkg/BaseClass.html#pubMethod()\">"},
+         "<a href=\"../pkg/BaseClass.html#pubMethod--\">"},
 
         //Public inner class should be inherited.
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
@@ -56,7 +56,7 @@
 
         //Protected method should be inherited
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
-         "<a href=\"../pkg/BaseClass.html#proMethod()\">"},
+         "<a href=\"../pkg/BaseClass.html#proMethod--\">"},
 
         //Protected inner class should be inherited.
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
@@ -72,15 +72,15 @@
 
          // Test overriding/implementing methods with generic parameters.
                  {BUG_ID + FS + "pkg" + FS + "BaseClass.html",
-         "<dl>" + NL + "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-                          "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation(java.lang.Class)\">" +
+         "<dl>" + NL + "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>" + NL +
+                          "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation-java.lang.Class-\">" +
                           "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>" +
                           "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">" +
                           "BaseInterface</a></code></dd>" + NL + "</dl>"},
 
          // Test diamond inheritence member summary (6256068)
                  {BUG_ID + FS + "diamond" + FS + "Z.html",
-                 "<code><a href=\"../diamond/A.html#aMethod()\">aMethod</a></code>"},
+                 "<code><a href=\"../diamond/A.html#aMethod--\">aMethod</a></code>"},
 
          // Test that doc is inherited from closed parent (6270645)
                  {BUG_ID + FS + "inheritDist" + FS + "C.html",
@@ -90,7 +90,7 @@
 
     private static final String[][] NEGATED_TEST = {
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
-        "<a href=\"../pkg/BaseClass.html#staticMethod()\">staticMethod</a></code>"},
+        "<a href=\"../pkg/BaseClass.html#staticMethod--\">staticMethod</a></code>"},
     };
     private static final String[] ARGS =
         new String[] {
--- a/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4951228 6290760
+ * @bug      4951228 6290760 8025633 8026567
  * @summary  Test the case where the overriden method returns a different
  *           type than the method in the child class.  Make sure the
  *           documentation is inherited but the return type isn't.
@@ -49,7 +49,7 @@
         // Check return type in member summary.
         {BUG_ID + FS + "pkg" + FS + "PublicChild.html",
             "<code><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>" + NL +
-            "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../pkg/PublicChild.html#returnTypeTest()\">" +
+            "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../pkg/PublicChild.html#returnTypeTest--\">" +
             "returnTypeTest</a></span>()</code>"
         },
         // Check return type in member detail.
@@ -60,9 +60,9 @@
 
          // Legacy anchor dimensions (6290760)
         {BUG_ID + FS + "pkg2" + FS + "A.html",
-            "<a name=\"f(java.lang.Object[])\">" + NL +
+            "<a name=\"f-java.lang.Object:A-\">" + NL +
             "<!--   -->" + NL +
-            "</a><a name=\"f(T[])\">" + NL +
+            "</a><a name=\"f-T:A-\">" + NL +
             "<!--   -->" + NL +
             "</a>"
         },
--- a/test/com/sun/javadoc/testNavigation/TestNavigation.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testNavigation/TestNavigation.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4131628 4664607 7025314 8023700 7198273
+ * @bug      4131628 4664607 7025314 8023700 7198273 8025633 8026567
  * @summary  Make sure the Next/Prev Class links iterate through all types.
  *           Make sure the navagation is 2 columns, not 3.
  * @author   jamieh
@@ -46,21 +46,21 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "A.html", "<li>Prev&nbsp;Class</li>"},
         {BUG_ID + FS + "pkg" + FS + "A.html",
-            "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">Next&nbsp;Class</span></a>"},
+            "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>"},
         {BUG_ID + FS + "pkg" + FS + "C.html",
-            "<a href=\"../pkg/A.html\" title=\"annotation in pkg\"><span class=\"strong\">Prev&nbsp;Class</span></a>"},
+            "<a href=\"../pkg/A.html\" title=\"annotation in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>"},
         {BUG_ID + FS + "pkg" + FS + "C.html",
-            "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"strong\">Next&nbsp;Class</span></a>"},
+            "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>"},
         {BUG_ID + FS + "pkg" + FS + "E.html",
-            "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"strong\">Prev&nbsp;Class</span></a>"},
+            "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>"},
         {BUG_ID + FS + "pkg" + FS + "E.html",
-            "<a href=\"../pkg/I.html\" title=\"interface in pkg\"><span class=\"strong\">Next&nbsp;Class</span></a>"},
+            "<a href=\"../pkg/I.html\" title=\"interface in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>"},
         {BUG_ID + FS + "pkg" + FS + "I.html",
-            "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"strong\">Prev&nbsp;Class</span></a>"},
+            "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>"},
         {BUG_ID + FS + "pkg" + FS + "I.html", "<li>Next&nbsp;Class</li>"},
         // Test for 4664607
         {BUG_ID + FS + "pkg" + FS + "I.html",
-            "<div class=\"skipNav\"><a href=\"#skip-navbar_top\" title=\"Skip navigation links\">Skip navigation links</a></div>" + NL + "<a name=\"navbar_top_firstrow\">" + NL +
+            "<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>" + NL + "<a name=\"navbar.top.firstrow\">" + NL +
             "<!--   -->" + NL + "</a>"}
     };
     private static final String[][] NEGATED_TEST = NO_TEST;
--- a/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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      6758050
+ * @bug      6758050 8025633
  * @summary  Test HTML output for nested generic types.
  * @author   bpatel
  * @library  ../lib/
@@ -46,7 +46,7 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "NestedGenerics.html",
             "<div class=\"block\">Contains <a " +
-            "href=\"../pkg/NestedGenerics.html#foo(java.util.Map)\"><code>foo" +
+            "href=\"../pkg/NestedGenerics.html#foo-java.util.Map-\"><code>foo" +
             "(java.util.Map&lt;A, java.util.Map&lt;A, A&gt;&gt;)</code></a></div>"
         }
     };
--- a/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344
+ * @bug      4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633 8026567
  * @summary  Run Javadoc on a set of source files that demonstrate new
  *           language features.  Check the output to ensure that the new
  *           language features are properly documented.
@@ -53,7 +53,7 @@
             {BUG_ID + FS + "pkg" + FS + "Coin.html", "Enum Coin</h2>"},
             //Make sure enum signature is correct.
             {BUG_ID + FS + "pkg" + FS + "Coin.html", "<pre>public enum " +
-                     "<span class=\"strong\">Coin</span>" + NL +
+                     "<span class=\"typeNameLabel\">Coin</span>" + NL +
                      "extends java.lang.Enum&lt;<a href=\"../pkg/Coin.html\" " +
                      "title=\"enum in pkg\">Coin</a>&gt;</pre>"
             },
@@ -62,7 +62,7 @@
                      "</span><span class=\"tabEnd\">&nbsp;</span></caption>"},
             //Detail for enum constant
             {BUG_ID + FS + "pkg" + FS + "Coin.html",
-                "<span class=\"strong\"><a href=\"../pkg/Coin.html#Dime\">Dime</a></span>"},
+                "<span class=\"memberNameLink\"><a href=\"../pkg/Coin.html#Dime\">Dime</a></span>"},
             //Automatically insert documentation for values() and valueOf().
             {BUG_ID + FS + "pkg" + FS + "Coin.html",
                 "Returns an array containing the constants of this enum type,"},
@@ -80,11 +80,11 @@
                 "Class TypeParameters&lt;E&gt;</h2>"},
             //Check class type parameters section.
             {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
-                "<dt><span class=\"strong\">Type Parameters:</span></dt>" + NL + "<dd><code>E</code> - " +
+                "<dt><span class=\"paramLabel\">Type Parameters:</span></dt>" + NL + "<dd><code>E</code> - " +
                 "the type parameter for this class."},
             //Type parameters in @see/@link
             {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
-                "<dl>" + NL + "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
+                "<dl>" + NL + "<dt><span class=\"seeLabel\">See Also:</span></dt>" + NL + "<dd>" +
                 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" +
                 "<code>TypeParameters</code></a></dd>" + NL + "</dl>"},
             //Method that uses class type parameter.
@@ -93,7 +93,7 @@
                     "parameter in TypeParameters\">E</a>&nbsp;param)"},
             //Method type parameter section.
             {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
-                "<span class=\"strong\">Type Parameters:</span></dt>" + NL + "<dd><code>T</code> - This is the first " +
+                "<span class=\"paramLabel\">Type Parameters:</span></dt>" + NL + "<dd><code>T</code> - This is the first " +
                     "type parameter.</dd>" + NL + "<dd><code>V</code> - This is the second type " +
                     "parameter."},
             //Signature of method with type parameters
@@ -118,7 +118,7 @@
 
             //Signature of subclass that has type parameters.
             {BUG_ID + FS + "pkg" + FS + "TypeParameterSubClass.html",
-                "<pre>public class <span class=\"strong\">TypeParameterSubClass&lt;T extends " +
+                "<pre>public class <span class=\"typeNameLabel\">TypeParameterSubClass&lt;T extends " +
                 "java.lang.String&gt;</span>" + NL + "extends " +
                 "<a href=\"../pkg/TypeParameterSuperClass.html\" title=\"class in pkg\">" +
                 "TypeParameterSuperClass</a>&lt;T&gt;</pre>"},
@@ -145,7 +145,7 @@
             //=================================
             {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int...&nbsp;i)"},
             {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[][]...&nbsp;i)"},
-            {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[]...)"},
+            {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "-int:A...-"},
             {BUG_ID + FS + "pkg" + FS + "VarArgs.html",
                 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" +
                 "TypeParameters</a>...&nbsp;t"},
@@ -156,19 +156,19 @@
             //Make sure the summary links are correct.
             {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
                 "<li>Summary:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>" + NL +
-                "<li><a href=\"#annotation_type_required_element_summary\">" +
+                "<li><a href=\"#annotation.type.required.element.summary\">" +
                 "Required</a>&nbsp;|&nbsp;</li>" + NL + "<li>" +
-                "<a href=\"#annotation_type_optional_element_summary\">Optional</a></li>"},
+                "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>"},
             //Make sure the detail links are correct.
             {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
                 "<li>Detail:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>" + NL +
-                "<li><a href=\"#annotation_type_element_detail\">Element</a></li>"},
+                "<li><a href=\"#annotation.type.element.detail\">Element</a></li>"},
             //Make sure the heading is correct.
             {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
                 "Annotation Type AnnotationType</h2>"},
             //Make sure the signature is correct.
             {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
-                "public @interface <span class=\"strong\">AnnotationType</span>"},
+                "public @interface <span class=\"memberNameLabel\">AnnotationType</span>"},
             //Make sure member summary headings are correct.
             {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
                 "<h3>Required Element Summary</h3>"},
@@ -188,53 +188,53 @@
 
             //PACKAGE
             {BUG_ID + FS + "pkg" + FS + "package-summary.html",
-                "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>=\"Package Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)"},
+                "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"Package Annotation\"," + NL +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)"},
 
             //CLASS
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre><a href=\"../pkg/AnnotationType.html\" " +
                 "title=\"annotation in pkg\">@AnnotationType</a>(" +
-                "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
+                "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" +
                 "=\"Class Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">" +
-                "required</a>=1994)" + NL + "public class <span class=\"strong\">" +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">" +
+                "required</a>=1994)" + NL + "public class <span class=\"typeNameLabel\">" +
                 "AnnotationTypeUsage</span>" + NL + "extends java.lang.Object</pre>"},
 
             //FIELD
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre><a href=\"../pkg/AnnotationType.html\" " +
                 "title=\"annotation in pkg\">@AnnotationType</a>(" +
-                "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
+                "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" +
                 "=\"Field Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">" +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">" +
                 "required</a>=1994)" + NL + "public&nbsp;int field</pre>"},
 
             //CONSTRUCTOR
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre><a href=\"../pkg/AnnotationType.html\" " +
                 "title=\"annotation in pkg\">@AnnotationType</a>(" +
-                "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
+                "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" +
                 "=\"Constructor Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">" +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">" +
                 "required</a>=1994)" + NL + "public&nbsp;AnnotationTypeUsage()</pre>"},
 
             //METHOD
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre><a href=\"../pkg/AnnotationType.html\" " +
                 "title=\"annotation in pkg\">@AnnotationType</a>(" +
-                "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
+                "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" +
                 "=\"Method Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">" +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">" +
                 "required</a>=1994)" + NL + "public&nbsp;void&nbsp;method()</pre>"},
 
             //METHOD PARAMS
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre>public&nbsp;void&nbsp;methodWithParams(" +
                 "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" +
-                "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">" +
+                "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" +
                 "optional</a>=\"Parameter Annotation\",<a " +
-                "href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)" + NL +
+                "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)" + NL +
                 "                             int&nbsp;documented," + NL +
                 "                             int&nbsp;undocmented)</pre>"},
 
@@ -242,9 +242,9 @@
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre>public&nbsp;AnnotationTypeUsage(<a " +
                 "href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" +
-                "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">" +
+                "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" +
                 "optional</a>=\"Constructor Param Annotation\",<a " +
-                "href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)" + NL +
+                "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)" + NL +
                 "                           int&nbsp;documented," + NL +
                 "                           int&nbsp;undocmented)</pre>"},
 
@@ -254,43 +254,43 @@
 
             //Integer
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#d()\">d</a>=3.14,"},
+                "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,"},
 
             //Double
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#d()\">d</a>=3.14,"},
+                "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,"},
 
             //Boolean
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#b()\">b</a>=true,"},
+                "<a href=\"../pkg1/A.html#b--\">b</a>=true,"},
 
             //String
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#s()\">s</a>=\"sigh\","},
+                "<a href=\"../pkg1/A.html#s--\">s</a>=\"sigh\","},
 
             //Class
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#c()\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,"},
+                "<a href=\"../pkg1/A.html#c--\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,"},
 
             //Bounded Class
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#w()\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,"},
+                "<a href=\"../pkg1/A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,"},
 
             //Enum
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#e()\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,"},
+                "<a href=\"../pkg1/A.html#e--\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,"},
 
             //Annotation Type
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#a()\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required()\">required</a>=1994),"},
+                "<a href=\"../pkg1/A.html#a--\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994),"},
 
             //String Array
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#sa()\">sa</a>={\"up\",\"down\"},"},
+                "<a href=\"../pkg1/A.html#sa--\">sa</a>={\"up\",\"down\"},"},
 
             //Primitive
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#primitiveClassTest()\">primitiveClassTest</a>=boolean.class,"},
+                "<a href=\"../pkg1/A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,"},
 
             //XXX:  Add array test case after this if fixed:
             //5020899: Incorrect internal representation of class-valued annotation elements
@@ -299,7 +299,7 @@
             {BUG_ID + FS + "pkg1" + FS + "B.html",
                 "<pre><a href=\"../pkg1/A.html\" title=\"annotation in pkg1\">@A</a>"},
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "public interface <span class=\"strong\">B</span></pre>"},
+                "public interface <span class=\"typeNameLabel\">B</span></pre>"},
 
 
             //==============================================================
@@ -320,7 +320,7 @@
                      "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
-                     "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest1.html\" " +
+                     "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" " +
                      "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends " +
                      "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo" +
                      "</a> &amp; <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">" +
@@ -333,9 +333,9 @@
                      "pkg2\">Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
-                     "<td class=\"colLast\"><span class=\"strong\">ClassUseTest1." +
-                     "</span><code><span class=\"strong\"><a href=\"../../pkg2/" +
-                     "ClassUseTest1.html#method(T)\">method</a></span>" +
+                     "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest1." +
+                     "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" +
+                     "ClassUseTest1.html#method-T-\">method</a></span>" +
                      "(T&nbsp;t)</code>&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
@@ -372,7 +372,7 @@
                     "</span></caption>"
            },
            {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html",
-                    "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest1.html\" " +
+                    "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" " +
                      "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends " +
                      "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo" +
                      "</a> &amp; <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">" +
@@ -386,9 +386,9 @@
                     "</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html",
-                     "<td class=\"colLast\"><span class=\"strong\">" +
-                     "ClassUseTest1.</span><code><span class=\"strong\"><a href=\"../../" +
-                     "pkg2/ClassUseTest1.html#method(T)\">method</a></span>" +
+                     "<td class=\"colLast\"><span class=\"typeNameLabel\">" +
+                     "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../../" +
+                     "pkg2/ClassUseTest1.html#method-T-\">method</a></span>" +
                      "(T&nbsp;t)</code>&nbsp;</td>"
             },
 
@@ -401,7 +401,7 @@
                      "&nbsp;</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
-                     "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest2.html\" " +
+                     "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" " +
                      "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends " +
                      "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">" +
                      "ParamTest</a>&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" +
@@ -415,9 +415,9 @@
                      "&nbsp;</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
-                     "<td class=\"colLast\"><span class=\"strong\">ClassUseTest2." +
-                     "</span><code><span class=\"strong\"><a href=\"../../pkg2/" +
-                     "ClassUseTest2.html#method(T)\">method</a></span>" +
+                     "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest2." +
+                     "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" +
+                     "ClassUseTest2.html#method-T-\">method</a></span>" +
                      "(T&nbsp;t)</code>&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
@@ -456,7 +456,7 @@
                      "Foo3</a></span><span class=\"tabEnd\">&nbsp;</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
-                     "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest2.html\" " +
+                     "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" " +
                      "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends " +
                      "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">" +
                      "ParamTest</a>&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" +
@@ -470,9 +470,9 @@
                      "</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
-                     "<td class=\"colLast\"><span class=\"strong\">ClassUseTest2." +
-                     "</span><code><span class=\"strong\"><a href=\"../../pkg2/" +
-                     "ClassUseTest2.html#method(T)\">method</a></span>" +
+                     "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest2." +
+                     "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" +
+                     "ClassUseTest2.html#method-T-\">method</a></span>" +
                      "(T&nbsp;t)</code>&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
@@ -500,7 +500,7 @@
                      "&nbsp;</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
-                     "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3.html\" " +
+                     "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" " +
                      "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends " +
                      "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">" +
                      "ParamTest2</a>&lt;java.util.List&lt;? extends " +
@@ -515,9 +515,9 @@
                      "&nbsp;</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
-                     "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3" +
-                     ".</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." +
-                     "html#method(T)\">method</a></span>(T&nbsp;t)</code>&nbsp;</td>"
+                     "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3" +
+                     ".</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." +
+                     "html#method-T-\">method</a></span>(T&nbsp;t)</code>&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
                      "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../" +
@@ -538,7 +538,7 @@
                      "</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html",
-                     "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3.html\" " +
+                     "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" " +
                      "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends " +
                      "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">" +
                      "ParamTest2</a>&lt;java.util.List&lt;? extends " +
@@ -552,9 +552,9 @@
                      "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;</span></caption>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html",
-                     "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3." +
-                     "</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." +
-                     "html#method(T)\">method</a></span>(T&nbsp;t)</code>" +
+                     "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3." +
+                     "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." +
+                     "html#method-T-\">method</a></span>(T&nbsp;t)</code>" +
                      "&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html",
@@ -586,9 +586,9 @@
                      "<th class=\"colLast\" scope=\"col\">Method and Description</th>" + NL +
                      "</tr>" + NL + "<tbody>" + NL + "<tr class=\"altColor\">" + NL +
                      "<td class=\"colFirst\"><code>void</code></td>" + NL +
-                     "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3." +
-                     "</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." +
-                     "html#method(java.util.Set)\">method</a></span>(java." +
+                     "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3." +
+                     "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." +
+                     "html#method-java.util.Set-\">method</a></span>(java." +
                      "util.Set&lt;<a href=\"../../pkg2/Foo4.html\" title=\"" +
                      "class in pkg2\">Foo4</a>&gt;&nbsp;p)</code>&nbsp;</td>" + NL +
                      "</tr>" + NL + "</tbody>"
@@ -663,14 +663,14 @@
             // TYPE PARAMETER IN INDEX
             //=================================
             {BUG_ID + FS + "index-all.html",
-                "<span class=\"strong\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">" +
+                "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" +
                 "method(Vector&lt;Object&gt;)</a></span>"
             },
             //=================================
             // TYPE PARAMETER IN INDEX
             //=================================
             {BUG_ID + FS + "index-all.html",
-                "<span class=\"strong\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">" +
+                "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" +
                 "method(Vector&lt;Object&gt;)</a></span>"
             },
         };
@@ -679,7 +679,7 @@
         // ENUM TESTING
         //=================================
         //NO constructor section
-        {BUG_ID + FS + "pkg" + FS + "Coin.html", "<span class=\"strong\">Constructor Summary</span>"},
+        {BUG_ID + FS + "pkg" + FS + "Coin.html", "<h3>Constructor Summary</h3>"},
         //=================================
         // TYPE PARAMETER TESTING
         //=================================
@@ -698,25 +698,25 @@
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
             "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Class Annotation\"," + NL +
             "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)" + NL +
-            "public class <span class=\"strong\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>"},
+            "public class <span class=\"typeNameLabel\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>"},
 
         //FIELD
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
             "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Field Annotation\"," + NL +
             "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)" + NL +
-            "public int <span class=\"strong\">field</span>"},
+            "public int <span class=\"memberNameLabel\">field</span>"},
 
         //CONSTRUCTOR
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
             "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\"," + NL +
             "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)" + NL +
-            "public <span class=\"strong\">AnnotationTypeUsage</span>()"},
+            "public <span class=\"typeNameLabel\">AnnotationTypeUsage</span>()"},
 
         //METHOD
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
             "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Method Annotation\"," + NL +
             "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)" + NL +
-            "public void <span class=\"strong\">method</span>()"},
+            "public void <span class=\"memberNameLabel\">method</span>()"},
 
         //=================================
         // Make sure annotation types do not
--- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4368820
+ * @bug      4368820 8025633 8026567
  * @summary  Inherited comment should link directly to member, not just
  *           class
  * @author   jamieh
@@ -46,8 +46,8 @@
     //Input for string search tests.
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-            "<span class=\"strong\">Description copied from class:&nbsp;<code>" +
-            "<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy()\">" +
+            "<span class=\"descfrmTypeLabel\">Description copied from class:&nbsp;<code>" +
+            "<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy--\">" +
             "BaseClass</a></code></span>"
         }
     };
--- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethods.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethods.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4634891
+ * @bug 4634891 8026567
  * @summary Determine if overriden methods are properly documented when
  * -protected (default) visibility flag is used.
  * @author jamieh
@@ -40,12 +40,12 @@
     private static final String[][] TEST = {
         //The public method should be overriden
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
 
         //The public method in different package should be overriden
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"}
     };
 
@@ -54,17 +54,17 @@
         //The package private method should be overriden since the base and sub class are in the same
         //package.  However, the link should not show up because the package private methods are not documented.
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"},
 
         //The private method in should not be overriden
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
 
         //The private method in different package should not be overriden
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
 
         //The package private method should not be overriden since the base and sub class are in
--- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4634891
+ * @bug 4634891 8025633 8026567
  * @summary Determine if overriden methods are properly documented when
  * -protected (default) visibility flag is used.
  * @author jamieh
@@ -40,23 +40,23 @@
     private static final String[][] TEST = {
         //The public method should be overriden
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">" +
                  "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
 
         //The public method in different package should be overriden
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">" +
                  "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
 
         //The package private method should be overriden since the base and sub class are in the same
         //package.
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">" +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">" +
                  "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>" +
                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}
     };
@@ -65,18 +65,18 @@
 
         //The private method in should not be overriden
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
 
         //The private method in different package should not be overriden
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">"},
 
         //The package private method should not be overriden since the base and sub class are in
         //different packages.
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">"},
     };
 
--- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4634891
+ * @bug 4634891 8026567
  * @summary Determine if overriden methods are properly documented when
  * -protected (default) visibility flag is used.
  * @author jamieh
@@ -40,18 +40,18 @@
     private static final String[][] TEST = {
         //The public method should be overriden
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
 
         //The package private method should be overriden since the base and sub class are in the same
         //package.
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"},
 
         //The public method in different package should be overriden
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod"},
     };
 
@@ -59,18 +59,18 @@
 
         //The private method in should not be overriden
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
 
         //The private method in different package should not be overriden
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod"},
 
         //The package private method should not be overriden since the base and sub class are in
         //different packages.
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
-         "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
                  "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod"}
 
 
--- a/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      6492694
+ * @bug      6492694 8026567
  * @summary  Test package deprecation.
  * @author   bpatel
  * @library  ../lib/
@@ -49,8 +49,8 @@
     //Input for string search tests.
     private static final String[][] TEST1 = {
         {BUG_ID + "-1" + FS + "pkg1" + FS + "package-summary.html",
-            "<div class=\"deprecatedContent\"><span class=\"strong\">Deprecated.</span>" + NL +
-            "<div class=\"block\"><span class=\"italic\">This package is Deprecated." +
+            "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated.</span>" + NL +
+            "<div class=\"block\"><span class=\"deprecationComment\">This package is Deprecated." +
             "</span></div>"
         },
         {BUG_ID + "-1" + FS + "deprecated-list.html",
--- a/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4802275 4967243
+ * @bug      4802275 4967243 8026567
  * @summary  Make sure param tags are still printed even though they do not
  *           match up with a real parameters.
  *           Make sure inheritDoc cannot be used in an invalid param tag.
@@ -48,12 +48,12 @@
     private static final String[][] TEST = {
         //Regular param tags.
         {BUG_ID + FS + "pkg" + FS + "C.html",
-            "<span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>param1</code> - testing 1 2 3.</dd>" +
+            "<span class=\"paramLabel\">Parameters:</span></dt>" + NL + "<dd><code>param1</code> - testing 1 2 3.</dd>" +
                 NL + "<dd><code>param2</code> - testing 1 2 3."
         },
         //Param tags that don't match with any real parameters.
         {BUG_ID + FS + "pkg" + FS + "C.html",
-            "<span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code><I>p1</I></code> - testing 1 2 3.</dd>" +
+            "<span class=\"paramLabel\">Parameters:</span></dt>" + NL + "<dd><code><I>p1</I></code> - testing 1 2 3.</dd>" +
                 NL + "<dd><code><I>p2</I></code> - testing 1 2 3."
         },
         //{@inherit} doc misuse does not cause doclet to throw exception.
--- a/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4780441 4874845 4978816 8014017 8016328
+ * @bug      4780441 4874845 4978816 8014017 8016328 8025633 8026567
  * @summary  Make sure that when the -private flag is not used, members
  *           inherited from package private class are documented in the child.
  *
@@ -66,7 +66,7 @@
 
         // Method inheritence from non-public superclass.
         {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
-            "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent(int)\">" +
+            "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent-int-\">" +
                 "methodInheritedFromParent</a>"
         },
 
@@ -78,7 +78,7 @@
 
         // Method inheritence from non-public superinterface.
         {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
-            "<a href=\"../pkg/PublicInterface.html#methodInterface(int)\">" +
+            "<a href=\"../pkg/PublicInterface.html#methodInterface-int-\">" +
                 "methodInterface</a>"
         },
 
@@ -112,12 +112,12 @@
     private static final String[][] NEGATED_TEST1 = {
        // Should not document that a method overrides method from private class.
       {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
-        "<span class=\"strong\">Overrides:</span>"},
+        "<span class=\"overrideSpecifyLabel\">Overrides:</span>"},
       // Should not document that a method specified by private interface.
       {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
-        "<span class=\"strong\">Specified by:</span>"},
+        "<span class=\"overrideSpecifyLabel\">Specified by:</span>"},
       {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
-        "<span class=\"strong\">Specified by:</span>"},
+        "<span class=\"overrideSpecifyLabel\">Specified by:</span>"},
       // Should not mention that any documentation was copied.
       {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
         "Description copied from"},
@@ -139,7 +139,7 @@
         //Do not inherit private interface method with generic parameters.
         //This method has been implemented.
         {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html",
-            "<span class=\"strong\"><a href=\"../pkg2/I.html#hello(T)\">hello</a></span>"},
+            "<span class=\"memberNameLink\"><a href=\"../pkg2/I.html#hello-T-\">hello</a></span>"},
     };
 
     // Test output when -private flag is used.
@@ -171,20 +171,20 @@
             "PrivateParent</a>"
         },
         {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
-            "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent(int)\">" +
+            "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent-int-\">" +
                 "methodInheritedFromParent</a>"
         },
         // Should document that a method overrides method from private class.
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
-            "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[],%20int,%20T,%20V,%20java.util.List)\">" +
+            "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>" + NL +
+            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">" +
             "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>" +
             "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
             "PrivateParent</a></code></dd>"},
        // Should document that a method is specified by private interface.
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
-            "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface(int)\">" +
+            "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>" + NL +
+            "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" +
             "methodInterface</a></code>&nbsp;in interface&nbsp;<code>" +
             "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
             "PrivateInterface</a></code></dd>"},
@@ -195,7 +195,7 @@
             "PrivateInterface</a>"
         },
         {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateInterface.html",
-            "<a href=\"../pkg/PrivateInterface.html#methodInterface(int)\">" +
+            "<a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" +
                 "methodInterface</a>"
         },
       // Should mention that any documentation was copied.
@@ -227,12 +227,12 @@
       //Since private flag is used, we can document that private interface method
       //with generic parameters has been implemented.
       {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
-            "<span class=\"strong\">Description copied from interface:&nbsp;<code>" +
-            "<a href=\"../pkg2/I.html#hello(T)\">I</a></code></span>"},
+            "<span class=\"descfrmTypeLabel\">Description copied from interface:&nbsp;<code>" +
+            "<a href=\"../pkg2/I.html#hello-T-\">I</a></code></span>"},
 
       {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
-            "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg2/I.html#hello(T)\">hello</a></code>" +
+            "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>" + NL +
+            "<dd><code><a href=\"../pkg2/I.html#hello-T-\">hello</a></code>" +
             "&nbsp;in interface&nbsp;<code>" +
             "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" +
             "&lt;java.lang.String&gt;</code></dd>"},
@@ -240,14 +240,14 @@
       //Make sure when no modifier appear in the class signature, the
       //signature is displayed correctly without extra space at the beginning.
       {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateParent.html",
-            "<pre>class <span class=\"strong\">PrivateParent</span>"},
+            "<pre>class <span class=\"typeNameLabel\">PrivateParent</span>"},
 
       {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
-            "<pre>public class <span class=\"strong\">PublicChild</span>"},
+            "<pre>public class <span class=\"typeNameLabel\">PublicChild</span>"},
     };
     private static final String[][] NEGATED_TEST2 = {
         {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateParent.html",
-            "<pre> class <span class=\"strong\">PrivateParent</span>"},
+            "<pre> class <span class=\"typeNameLabel\">PrivateParent</span>"},
     };
 
     /**
--- a/test/com/sun/javadoc/testProfiles/TestProfiles.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testProfiles/TestProfiles.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      8006124 8009684 8016921 8023700 8024096
+ * @bug      8006124 8009684 8016921 8023700 8024096 8008164 8026567 8026770
  * @summary  Test javadoc support for profiles.
  * @author   Bhavesh Patel, Evgeniya Stepanova
  * @library  ../lib/
@@ -85,6 +85,20 @@
             "<h3><a href=\"pkg2/compact2-package-summary.html\" "
             + "target=\"classFrame\">pkg2</a></h3>"
         },
+        {PROFILE_BUG_ID + FS + "compact2-summary.html",
+            "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL
+            + "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">"
+            + "pkg2</a></h3>" + NL + "<table class=\"typeSummary\" border=\"0\" "
+            + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, "
+            + "listing classes, and an explanation\">"
+        },
+        {PROFILE_BUG_ID + FS + "compact2-summary.html",
+            "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL
+            + "<h3><a href=\"pkg4/compact2-package-summary.html\" target=\"classFrame\">"
+            + "pkg4</a></h3>" + NL + "<table class=\"typeSummary\" border=\"0\" "
+            + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, "
+            + "listing classes, and an explanation\">"
+        },
         // Tests for profileName-package-summary.html listing the summary for a
         // package in a profile.
         {PROFILE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html",
@@ -94,6 +108,12 @@
         {PROFILE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html",
             "<div class=\"subTitle\">compact3</div>"
         },
+        {PROFILE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html",
+            "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL
+            + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" "
+            + "cellspacing=\"0\" summary=\"Interface Summary table, listing "
+            + "interfaces, and an explanation\">"
+        },
         //Test for "overview-frame.html" showing the "All Profiles" link.
         {PROFILE_BUG_ID + FS + "overview-frame.html",
             "<span><a href=\"profile-overview-frame.html\" "
@@ -122,22 +142,22 @@
         },
         {PROFILE_BUG_ID + FS + "deprecated-list.html","<td class=\"colOne\">"
             + "<a href=\"pkg2/Class1Pkg2.html\" title=\"class in pkg2\">pkg2.Class1Pkg2</a>"
-            + NL +"<div class=\"block\"><span class=\"italic\">Class1Pkg2. This class is deprecated</span></div>"
+            + NL +"<div class=\"block\"><span class=\"deprecationComment\">Class1Pkg2. This class is deprecated</span></div>"
         },
         //Test deprecated package in profile
         {PROFILE_BUG_ID + FS + "deprecated-list.html","<td class=\"colOne\">"
             + "<a href=\"pkgDeprecated/package-summary.html\">pkgDeprecated</a>"
-            + NL +"<div class=\"block\"><span class=\"italic\">This package is <b>Deprecated</b>."
+            + NL +"<div class=\"block\"><span class=\"deprecationComment\">This package is <b>Deprecated</b>."
             + " Use pkg1.</span></div>"
         },
         {PROFILE_BUG_ID + FS + "pkgDeprecated" + FS + "package-summary.html",
-            "<div class=\"deprecatedContent\"><span class=\"strong\">Deprecated.</span>"
-            + NL + "<div class=\"block\"><span class=\"italic\">This package is <b>Deprecated</b>."
+            "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated.</span>"
+            + NL + "<div class=\"block\"><span class=\"deprecationComment\">This package is <b>Deprecated</b>."
             + " Use pkg1.</span></div>"
         },
         // need to add teststring when JDK-8015496 will be fixed
         //Test exception in profiles
-        {PROFILE_BUG_ID + FS + "compact1-summary.html","<table class=\"packageSummary\" "
+        {PROFILE_BUG_ID + FS + "compact1-summary.html","<table class=\"typeSummary\" "
             + "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
             + "summary=\"Exception Summary table, listing exceptions, and an explanation\">"
             + NL + "<caption><span>Exception Summary</span><span class=\"tabEnd\">"
@@ -149,7 +169,7 @@
         },
         //Test errors in profiles
         {PROFILE_BUG_ID + FS + "compact1-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
             + "summary=\"Error Summary table, listing errors, and an explanation\">"
             + NL + "<caption><span>Error Summary</span><span class=\"tabEnd\">&nbsp;"
             + "</span></caption>" + NL + "<tr>" + NL + "<th class=\"colFirst\""
@@ -171,6 +191,21 @@
             + "target=\"classFrame\">Anno1Pkg4</a></li>"
         },
         {PROFILE_BUG_ID + FS + "compact1-summary.html","<li>Use</li>"
+        },
+        {PROFILE_BUG_ID + FS + "compact2-summary.html",
+            "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL
+            + "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">"
+            + "pkg2</a></h3>" + NL + "<li class=\"blockList\">" + NL
+            + "<table class=\"typeSummary\" border=\"0\" "
+            + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, "
+            + "listing classes, and an explanation\">"
+        },
+        {PROFILE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html",
+            "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL
+            + "<li class=\"blockList\">" + NL
+            + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" "
+            + "cellspacing=\"0\" summary=\"Interface Summary table, listing "
+            + "interfaces, and an explanation\">"
         }
     };
     private static final String[][] PACKAGES_TEST = {
--- a/test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      8006124 8009684 8015663 8015496
+ * @bug      8006124 8009684 8015663 8015496 8026567
  * @summary  Test javadoc options support for profiles.
  * @author   Evgeniya Stepanova
  * @library  ../lib/
@@ -87,7 +87,7 @@
         {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html",
             "<h3><a href=\"pkgDeprecated/compact1-package-summary.html\" target=\"" +
             "classFrame\">pkgDeprecated</a></h3>" + NL + "<div class=\"deprecatedContent\">" +
-            "<span class=\"strong\">Deprecated.</span></div>"
+            "<span class=\"deprecatedLabel\">Deprecated.</span></div>"
         }
     };
     private static final String[][] PROFILES_CONFIGURATION_NEGATED_TEST = {
--- a/test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, 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,7 +56,7 @@
         {BUG_ID + FS + "pkg" + FS + "C.html",
             "<a href=\"../pkg/RegContainerDoc.html\" " +
             "title=\"annotation in pkg\">@RegContainerDoc</a>" +
-            "(<a href=\"../pkg/RegContainerDoc.html#value()\">value</a>={" +
+            "(<a href=\"../pkg/RegContainerDoc.html#value--\">value</a>={" +
             "<a href=\"../pkg/RegContaineeNotDoc.html\" " +
             "title=\"annotation in pkg\">@RegContaineeNotDoc</a>," +
             "<a href=\"../pkg/RegContaineeNotDoc.html\" " +
@@ -71,7 +71,7 @@
         {BUG_ID + FS + "pkg" + FS + "C.html",
             "<a href=\"../pkg/ContainerSynthDoc.html\" " +
             "title=\"annotation in pkg\">@ContainerSynthDoc</a>(" +
-            "<a href=\"../pkg/ContainerSynthDoc.html#value()\">value</a>=" +
+            "<a href=\"../pkg/ContainerSynthDoc.html#value--\">value</a>=" +
             "<a href=\"../pkg/ContaineeSynthDoc.html\" " +
             "title=\"annotation in pkg\">@ContaineeSynthDoc</a>)"},
         {BUG_ID + FS + "pkg" + FS + "C.html",
@@ -82,37 +82,37 @@
 
         {BUG_ID + FS + "pkg" + FS + "D.html",
             "<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>" +
-            "(<a href=\"../pkg/RegDoc.html#x()\">x</a>=1)"},
+            "(<a href=\"../pkg/RegDoc.html#x--\">x</a>=1)"},
         {BUG_ID + FS + "pkg" + FS + "D.html",
             "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>" +
-            "(<a href=\"../pkg/RegArryDoc.html#y()\">y</a>=1)"},
+            "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1)"},
         {BUG_ID + FS + "pkg" + FS + "D.html",
             "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>" +
-            "(<a href=\"../pkg/RegArryDoc.html#y()\">y</a>={1,2})"},
+            "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})"},
         {BUG_ID + FS + "pkg" + FS + "D.html",
             "<a href=\"../pkg/NonSynthDocContainer.html\" " +
             "title=\"annotation in pkg\">@NonSynthDocContainer</a>" +
-            "(<a href=\"../pkg/NonSynthDocContainer.html#value()\">value</a>=" +
+            "(<a href=\"../pkg/NonSynthDocContainer.html#value--\">value</a>=" +
             "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)"},
 
         {BUG_ID + FS + "pkg1" + FS + "C.html",
             "<a href=\"../pkg1/RegContainerValDoc.html\" " +
             "title=\"annotation in pkg1\">@RegContainerValDoc</a>" +
-            "(<a href=\"../pkg1/RegContainerValDoc.html#value()\">value</a>={" +
+            "(<a href=\"../pkg1/RegContainerValDoc.html#value--\">value</a>={" +
             "<a href=\"../pkg1/RegContaineeNotDoc.html\" " +
             "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>," +
             "<a href=\"../pkg1/RegContaineeNotDoc.html\" " +
             "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>}," +
-            "<a href=\"../pkg1/RegContainerValDoc.html#y()\">y</a>=3)"},
+            "<a href=\"../pkg1/RegContainerValDoc.html#y--\">y</a>=3)"},
         {BUG_ID + FS + "pkg1" + FS + "C.html",
             "<a href=\"../pkg1/ContainerValDoc.html\" " +
             "title=\"annotation in pkg1\">@ContainerValDoc</a>" +
-            "(<a href=\"../pkg1/ContainerValDoc.html#value()\">value</a>={" +
+            "(<a href=\"../pkg1/ContainerValDoc.html#value--\">value</a>={" +
             "<a href=\"../pkg1/ContaineeNotDoc.html\" " +
             "title=\"annotation in pkg1\">@ContaineeNotDoc</a>," +
             "<a href=\"../pkg1/ContaineeNotDoc.html\" " +
             "title=\"annotation in pkg1\">@ContaineeNotDoc</a>}," +
-            "<a href=\"../pkg1/ContainerValDoc.html#x()\">x</a>=1)"}
+            "<a href=\"../pkg1/ContainerValDoc.html#x--\">x</a>=1)"}
     };
 
     private static final String[][] NEGATED_TEST = {
@@ -124,7 +124,7 @@
         {BUG_ID + FS + "pkg" + FS + "C.html",
             "<a href=\"../pkg/RegContainerNotDoc.html\" " +
             "title=\"annotation in pkg\">@RegContainerNotDoc</a>" +
-            "(<a href=\"../pkg/RegContainerNotDoc.html#value()\">value</a>={" +
+            "(<a href=\"../pkg/RegContainerNotDoc.html#value--\">value</a>={" +
             "<a href=\"../pkg/RegContaineeNotDoc.html\" " +
             "title=\"annotation in pkg\">@RegContaineeNotDoc</a>," +
             "<a href=\"../pkg/RegContaineeNotDoc.html\" " +
@@ -138,25 +138,25 @@
         {BUG_ID + FS + "pkg1" + FS + "C.html",
             "<a href=\"../pkg1/RegContainerValNotDoc.html\" " +
             "title=\"annotation in pkg1\">@RegContainerValNotDoc</a>" +
-            "(<a href=\"../pkg1/RegContainerValNotDoc.html#value()\">value</a>={" +
+            "(<a href=\"../pkg1/RegContainerValNotDoc.html#value--\">value</a>={" +
             "<a href=\"../pkg1/RegContaineeDoc.html\" " +
             "title=\"annotation in pkg1\">@RegContaineeDoc</a>," +
             "<a href=\"../pkg1/RegContaineeDoc.html\" " +
             "title=\"annotation in pkg1\">@RegContaineeDoc</a>}," +
-            "<a href=\"../pkg1/RegContainerValNotDoc.html#y()\">y</a>=4)"},
+            "<a href=\"../pkg1/RegContainerValNotDoc.html#y--\">y</a>=4)"},
         {BUG_ID + FS + "pkg1" + FS + "C.html",
             "<a href=\"../pkg1/ContainerValNotDoc.html\" " +
             "title=\"annotation in pkg1\">@ContainerValNotDoc</a>" +
-            "(<a href=\"../pkg1/ContainerValNotDoc.html#value()\">value</a>={" +
+            "(<a href=\"../pkg1/ContainerValNotDoc.html#value--\">value</a>={" +
             "<a href=\"../pkg1/ContaineeNotDoc.html\" " +
             "title=\"annotation in pkg1\">@ContaineeNotDoc</a>," +
             "<a href=\"../pkg1/ContaineeNotDoc.html\" " +
             "title=\"annotation in pkg1\">@ContaineeNotDoc</a>}," +
-            "<a href=\"../pkg1/ContainerValNotDoc.html#x()\">x</a>=2)"},
+            "<a href=\"../pkg1/ContainerValNotDoc.html#x--\">x</a>=2)"},
         {BUG_ID + FS + "pkg1" + FS + "C.html",
             "<a href=\"../pkg1/ContainerSynthNotDoc.html\" " +
             "title=\"annotation in pkg1\">@ContainerSynthNotDoc</a>(" +
-            "<a href=\"../pkg1/ContainerSynthNotDoc.html#value()\">value</a>=" +
+            "<a href=\"../pkg1/ContainerSynthNotDoc.html#value--\">value</a>=" +
             "<a href=\"../pkg1/ContaineeSynthDoc.html\" " +
             "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>)"}
     };
--- a/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Mon Oct 28 18:30:14 2013 -0400
@@ -25,7 +25,7 @@
 
 /*
  * @test
- * @bug 6802694
+ * @bug 6802694 8025633 8026567
  * @summary This test verifies deprecation info in serialized-form.html.
  * @author Bhavesh Patel
  * @library ../lib/
@@ -42,29 +42,29 @@
     // display the inline comments, tags and deprecation information if any.
     private static final String[][] TEST_CMNT_DEPR = {
         {BUG_ID + FS + "serialized-form.html", "<dl>" + NL +
-                 "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" +
-                 "java.io.IOException</code></dd>"+ NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<dt><span class=\"throwsLabel\">Throws:</span></dt>" + NL + "<dd><code>" +
+                 "java.io.IOException</code></dd>"+ NL + "<dt><span class=\"seeLabel\">See Also:</span>" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
-                 "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
+                 "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by" + NL +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 " +
                  "is undecorated.</div>" + NL + "&nbsp;" + NL +
-                 "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
+                 "<dd>1.4</dd>" + NL + "<dt><span class=\"seeLabel\">See Also:</span>" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
-                 "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
+                 "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by" + NL +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
-                 "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code><code>" +
+                 "<dl>" + NL + "<dt><span class=\"throwsLabel\">Throws:</span></dt>" + NL + "<dd><code><code>" +
                  "IOException</code></code></dd>" + NL +
                  "<dd><code>java.io.IOException</code></dd>" + NL + "</dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">Deprecated.</span>" +
                  "&nbsp;</div>" + NL + "<div class=\"block\">" +
                  "The name for this class.</div>"}};
 
@@ -73,14 +73,14 @@
     // information if any.
     private static final String[][] TEST_NOCMNT = {
         {BUG_ID + FS + "serialized-form.html", "<pre>boolean undecorated</pre>" + NL +
-                 "<div class=\"block\"><span class=\"strong\">Deprecated.</span>&nbsp;<span class=\"italic\">" +
+                 "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;<span class=\"deprecationComment\">" +
                  "As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" +
                  "setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"},
-        {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">" +
-                 "Deprecated.</span>&nbsp;<span class=\"italic\">As of JDK version" +
+        {BUG_ID + FS + "serialized-form.html", "<span class=\"deprecatedLabel\">" +
+                 "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version" +
                  " 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"}};
 
     // Test with -nodeprecated option. The serialized-form.html should
--- a/test/com/sun/javadoc/testSimpleTag/TestSimpleTag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testSimpleTag/TestSimpleTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, 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 4695326 4750173 4920381
+ * @bug 4695326 4750173 4920381 8026567
  * @summary Test the declarartion of simple tags using -tag. Verify that
  * "-tag name" is a shortcut for "-tag name:a:Name:".  Also verity that
  * you can escape the ":" character with a back slash so that it is not
@@ -42,13 +42,13 @@
     private static final String[][] TEST =
         new String[][] {
             {"./" + BUG_ID + "/C.html",
-                "<span class=\"strong\">Todo:</span>"},
+                "<span class=\"simpleTagLabel\">Todo:</span>"},
             {"./" + BUG_ID + "/C.html",
-                "<span class=\"strong\">EJB Beans:</span>"},
+                "<span class=\"simpleTagLabel\">EJB Beans:</span>"},
             {"./" + BUG_ID + "/C.html",
-                "<span class=\"strong\">Regular Tag:</span>"},
+                "<span class=\"simpleTagLabel\">Regular Tag:</span>"},
             {"./" + BUG_ID + "/C.html",
-                "<span class=\"strong\">Back-Slash-Tag:</span>"},
+                "<span class=\"simpleTagLabel\">Back-Slash-Tag:</span>"},
         };
 
     private static final String[] ARGS = new String[] {
--- a/test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      8008768
+ * @bug      8008768 8026567
  * @summary  Using {@inheritDoc} in simple tag defined via -tag fails
  * @library  ../lib/
  * @build    JavadocTester TestSimpleTagInherit
@@ -46,10 +46,10 @@
     //Input for string search tests.
     private static final String[][] TEST = {
         { BUG_ID + FS + "p" + FS + "TestClass.html",
-          "<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL +
+          "<dt><span class=\"simpleTagLabel\"><em>Custom:</em></span></dt>" + NL +
           "<dd>doc for BaseClass class</dd>" },
         { BUG_ID + FS + "p" + FS + "TestClass.html",
-          "<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL +
+          "<dt><span class=\"simpleTagLabel\"><em>Custom:</em></span></dt>" + NL +
           "<dd>doc for BaseClass method</dd>" }
     };
     private static final String[][] NEGATED_TEST = NO_TEST;
--- a/test/com/sun/javadoc/testSinceTag/TestSinceTag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testSinceTag/TestSinceTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      7180906
+ * @bug      7180906 8026567
  * @summary  Test to make sure that the since tag works correctly
  * @author   Bhavesh Patel
  * @library  ../lib/
@@ -48,11 +48,11 @@
     //Input for string search tests.
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
-            "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
+            "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
             "<dd>JDK1.0</dd>"
         },
         {BUG_ID + FS + "serialized-form.html",
-            "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
+            "<dl>" + NL + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>" + NL +
             "<dd>1.4</dd>"
         }
     };
--- a/test/com/sun/javadoc/testStylesheet/TestStylesheet.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testStylesheet/TestStylesheet.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4494033 7028815 7052425 8007338 8023608
+ * @bug      4494033 7028815 7052425 8007338 8023608 8008164
  * @summary  Run tests on doclet stylesheet.
  * @author   jamieh
  * @library  ../lib/
@@ -59,10 +59,8 @@
         {BUG_ID + FS + "stylesheet.css",
             "ul {" + NL + "    list-style-type:disc;" + NL + "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".overviewSummary caption, .packageSummary caption, " +
-            ".contentContainer ul.blockList li.blockList caption, " +
-            ".summary caption, .classUseContainer caption, " +
-            ".constantValuesContainer caption {" + NL +
+            ".overviewSummary caption, .memberSummary caption, .typeSummary caption," + NL +
+            ".useSummary caption, .constantsSummary caption, .deprecatedSummary caption {" + NL +
             "    position:relative;" + NL +
             "    text-align:left;" + NL +
             "    background-repeat:no-repeat;" + NL +
@@ -74,10 +72,8 @@
             "    margin:0px;" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".overviewSummary caption span, .packageSummary caption span, " +
-            ".contentContainer ul.blockList li.blockList caption span, " +
-            ".summary caption span, .classUseContainer caption span, " +
-            ".constantValuesContainer caption span {" + NL +
+            ".overviewSummary caption span, .memberSummary caption span, .typeSummary caption span," + NL +
+            ".useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -86,8 +82,7 @@
             "    background-image:url(resources/titlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption " +
-            "span.activeTableTab span {" + NL +
+            ".memberSummary caption span.activeTableTab span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -96,7 +91,7 @@
             "    background-image:url(resources/activetitlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption span.tableTab span {" + NL +
+            ".memberSummary caption span.tableTab span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -105,8 +100,7 @@
             "    background-image:url(resources/titlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption span.tableTab, " +
-            ".contentContainer ul.blockList li.blockList caption span.activeTableTab {" + NL +
+            ".memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {" + NL +
             "    padding-top:0px;" + NL +
             "    padding-left:0px;" + NL +
             "    background-image:none;" + NL +
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testTagOutput/TestTagOutput.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2013, 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 8026370 8026567
+ * @summary This test checks the generated tag output.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestTagOutput
+ * @run main TestTagOutput
+ */
+
+public class TestTagOutput extends JavadocTester {
+
+    private static final String BUG_ID = "8026370";
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "pkg1" + FS + "DeprecatedTag.html",
+            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>"},
+        {BUG_ID + FS + "pkg1" + FS + "DeprecatedTag.html",
+            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;" +
+            "<span class=\"deprecationComment\">Do not use this.</span></div>"}};
+
+    private static final String[][] NEGATED_TEST = {
+        {BUG_ID + FS + "pkg1" + FS + "DeprecatedTag.html",
+            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated." +
+            "</span>&nbsp;<span class=\"deprecationComment\"></span></div>"}};
+
+    private static final String[] ARGS =
+        new String[] {
+            "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"};
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestTagOutput tester = new TestTagOutput();
+        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/testTagOutput/pkg1/DeprecatedTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2013, 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 pkg1;
+
+public class DeprecatedTag {
+
+    /**
+     * This method is deprecated.
+     *
+     * @deprecated
+     */
+    public void deprecatedMethod() {
+    }
+
+    /**
+     * This method is also deprecated.
+     *
+     * @deprecated Do not use this.
+     */
+    public void deprecatedMethodWithDesc() {
+    }
+}
+
--- a/test/com/sun/javadoc/testTaglets/TestTaglets.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testTaglets/TestTaglets.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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      4654308 4767038
+ * @bug      4654308 4767038 8025633
  * @summary  Use a Taglet and include some inline tags such as {@link}.  The
  *           inline tags should be interpreted properly.
  *           Run Javadoc on some sample source that uses {@inheritDoc}.  Make
@@ -55,8 +55,8 @@
 
     //Input for string search tests.
     private static final String[][] TEST_4654308 = new String[][] {
-        {"4654308" + FS + "C.html", "<span class=\"strong\">Foo:</span></dt>" +
-                 "<dd>my only method is <a href=\"C.html#method()\"><code>here" +
+        {"4654308" + FS + "C.html", "<span class=\"simpleTagLabel\">Foo:</span></dt>" +
+                 "<dd>my only method is <a href=\"C.html#method--\"><code>here" +
                  "</code></a></dd></dl>"}
     };
     private static final String[][] NEGATED_TEST_4654308 = NO_TEST;
--- a/test/com/sun/javadoc/testTaglets/taglets/Foo.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testTaglets/taglets/Foo.java	Mon Oct 28 18:30:14 2013 -0400
@@ -50,7 +50,7 @@
      */
     public Content getTagletOutput(Tag tag, TagletWriter writer) {
         ArrayList inlineTags = new ArrayList();
-        inlineTags.add(new TextTag(tag.holder(), "<dt><span class=\"strong\">Foo:</span></dt><dd>"));
+        inlineTags.add(new TextTag(tag.holder(), "<dt><span class=\"simpleTagLabel\">Foo:</span></dt><dd>"));
         inlineTags.addAll(Arrays.asList(tag.inlineTags()));
         inlineTags.add(new TextTag(tag.holder(), "</dd>"));
         return writer.commentTagsToOutput(tag,
--- a/test/com/sun/javadoc/testThrowsHead/TestThrowsHead.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testThrowsHead/TestThrowsHead.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, 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 4530727
+ * @bug 4530727 8026567
  * @summary When an exception is declared in the method signature but
  * not documented with a throws tag, we generate a link to it in the
  * throws section.  Make sure that the link is below a Throws heading.
@@ -38,7 +38,7 @@
 
     private static final String BUG_ID = "4530727";
     private static final String[][] TEST = {
-        {BUG_ID + FS + "C.html", "<dt><span class=\"strong\">Throws:</span>"}
+        {BUG_ID + FS + "C.html", "<dt><span class=\"throwsLabel\">Throws:</span>"}
     };
     private static final String[][] NEGATED_TEST = NO_TEST;
     private static final String[] ARGS = new String[] {
--- a/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,10 +23,11 @@
 
 /*
  * @test
- * @bug      8005091 8009686
+ * @bug      8005091 8009686 8025633 8026567
  * @summary  Make sure that type annotations are displayed correctly
  * @author   Bhavesh Patel
  * @library  ../lib/
+ * @ignore
  * @build    JavadocTester TestTypeAnnotations
  * @run main TestTypeAnnotations
  */
@@ -73,12 +74,12 @@
 
         // Test for type annotations on Class Parameters (ClassParameters.java).
         {BUG_ID + FS + "typeannos" + FS + "ExtendsBound.html",
-            "class <span class=\"strong\">ExtendsBound&lt;K extends <a " +
+            "class <span class=\"typeNameLabel\">ExtendsBound&lt;K extends <a " +
             "href=\"../typeannos/ClassParamA.html\" title=\"annotation in " +
             "typeannos\">@ClassParamA</a> java.lang.String&gt;</span>"
         },
         {BUG_ID + FS + "typeannos" + FS + "ExtendsGeneric.html",
-            "<pre>class <span class=\"strong\">ExtendsGeneric&lt;K extends " +
+            "<pre>class <span class=\"typeNameLabel\">ExtendsGeneric&lt;K extends " +
             "<a href=\"../typeannos/ClassParamA.html\" title=\"annotation in " +
             "typeannos\">@ClassParamA</a> <a href=\"../typeannos/Unannotated.html\" " +
             "title=\"class in typeannos\">Unannotated</a>&lt;<a href=\"" +
@@ -86,24 +87,24 @@
             "@ClassParamB</a> java.lang.String&gt;&gt;</span>"
         },
         {BUG_ID + FS + "typeannos" + FS + "TwoBounds.html",
-            "<pre>class <span class=\"strong\">TwoBounds&lt;K extends <a href=\"" +
+            "<pre>class <span class=\"typeNameLabel\">TwoBounds&lt;K extends <a href=\"" +
             "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" +
             "@ClassParamA</a> java.lang.String,V extends <a href=\"../typeannos/" +
             "ClassParamB.html\" title=\"annotation in typeannos\">@ClassParamB" +
             "</a> java.lang.String&gt;</span>"
         },
         {BUG_ID + FS + "typeannos" + FS + "Complex1.html",
-            "class <span class=\"strong\">Complex1&lt;K extends <a href=\"../" +
+            "class <span class=\"typeNameLabel\">Complex1&lt;K extends <a href=\"../" +
             "typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" +
             "@ClassParamA</a> java.lang.String &amp; java.lang.Runnable&gt;</span>"
         },
         {BUG_ID + FS + "typeannos" + FS + "Complex2.html",
-            "class <span class=\"strong\">Complex2&lt;K extends java.lang." +
+            "class <span class=\"typeNameLabel\">Complex2&lt;K extends java.lang." +
             "String &amp; <a href=\"../typeannos/ClassParamB.html\" title=\"" +
             "annotation in typeannos\">@ClassParamB</a> java.lang.Runnable&gt;</span>"
         },
         {BUG_ID + FS + "typeannos" + FS + "ComplexBoth.html",
-            "class <span class=\"strong\">ComplexBoth&lt;K extends <a href=\"" +
+            "class <span class=\"typeNameLabel\">ComplexBoth&lt;K extends <a href=\"" +
             "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\"" +
             ">@ClassParamA</a> java.lang.String &amp; <a href=\"../typeannos/" +
             "ClassParamA.html\" title=\"annotation in typeannos\">@ClassParamA" +
@@ -272,13 +273,13 @@
             "<pre>void&nbsp;oneException()" + NL +
             "           throws <a href=\"../typeannos/ThrB.html\" title=\"" +
             "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" +
-            "ThrB.html#value()\">value</a>=\"m\") java.lang.Exception</pre>"
+            "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>"
         },
         {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html",
             "<pre>void&nbsp;twoExceptions()" + NL +
             "            throws <a href=\"../typeannos/ThrB.html\" title=\"" +
             "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" +
-            "ThrB.html#value()\">value</a>=\"m\") java.lang.RuntimeException," + NL +
+            "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException," + NL +
             "                   <a href=\"../typeannos/ThrA.html\" title=\"" +
             "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
         },
@@ -307,14 +308,14 @@
             "<pre>void&nbsp;wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" +
             "class in typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/" +
             "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"" +
-            "../typeannos/WldB.html#value()\">value</a>=\"m\") java.lang." +
+            "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang." +
             "String&gt;&nbsp;l)</pre>"
         },
         {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html",
             "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " +
             "typeannos\">MyList</a>&lt;? extends <a href=\"../typeannos/WldB." +
             "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../" +
-            "typeannos/WldB.html#value()\">value</a>=\"m\") java.lang.String" +
+            "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String" +
             "&gt;&nbsp;returnWcExtends()</pre>"
         },
 
@@ -329,7 +330,7 @@
             "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrA." +
             "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" +
             "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" +
-            "</a>(<a href=\"../typeannos/RcvrB.html#value()\">value</a>=\"m\")" +
+            "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")" +
             "&nbsp;DefaultUnmodified&nbsp;this)</pre>"
         },
         {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html",
@@ -354,7 +355,7 @@
         {BUG_ID + FS + "typeannos" + FS + "WithValue.html",
             "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept(" +
             "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " +
-            "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value()\">" +
+            "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">" +
             "value</a>=\"m\")&nbsp;WithValue&nbsp;this," + NL +
             "                                           T&nbsp;r)" + NL +
             "                                    throws java.lang.Exception</pre>"
@@ -362,7 +363,7 @@
         {BUG_ID + FS + "typeannos" + FS + "WithFinal.html",
             "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrB." +
             "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" +
-            "typeannos/RcvrB.html#value()\">value</a>=\"m\")&nbsp;WithFinal" +
+            "typeannos/RcvrB.html#value--\">value</a>=\"m\")&nbsp;WithFinal" +
             "&nbsp;this)</pre>"
         },
         {BUG_ID + FS + "typeannos" + FS + "WithBody.html",
--- a/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4927167 4974929 7010344
+ * @bug      4927167 4974929 7010344 8025633
  * @summary  When the type parameters are more than 10 characters in length,
  *           make sure there is a line break between type params and return type
  *           in member summary. Also, test for type parameter links in package-summary and
@@ -71,7 +71,7 @@
         },
         //Nested type parameters
         {BUG_ID + FS + "pkg" + FS + "C.html",
-            "<a name=\"formatDetails(java.util.Collection, java.util.Collection)\">" + NL +
+            "<a name=\"formatDetails-java.util.Collection-java.util.Collection-\">" + NL +
             "<!--   -->" + NL +
             "</a>"
         },
--- a/test/com/sun/javadoc/testValueTag/TestValueTag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testValueTag/TestValueTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4764045 8004825
+ * @bug      4764045 8004825 8026567
  * @summary  This test ensures that the value tag works in all
  * use cases. The explainations for each test case are written below.
  * @author   jamieh
@@ -94,7 +94,7 @@
             "Result: <a href=\"../pkg2/Class3.html#TEST_17_PASSES\">\"Test 17 passes\"</a>"},
         //Test @value tag used with custom tag.
         {BUG_ID + FS + "pkg1" + FS + "CustomTagUsage.html",
-            "<dt><span class=\"strong\">Todo:</span></dt>" + NL +
+            "<dt><span class=\"simpleTagLabel\">Todo:</span></dt>" + NL +
                 "<dd>the value of this constant is 55.</dd>"},
         //Test @value errors printed dues to invalid use or when used with
         //non-constant or with bad references.
--- a/test/com/sun/javadoc/testWarnings/TestWarnings.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/testWarnings/TestWarnings.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4515705 4804296 4702454 4697036
+ * @bug      4515705 4804296 4702454 4697036 8025633
  * @summary  Make sure that first sentence warning only appears once.
  *           Make sure that only warnings/errors are printed when quiet is used.
  *           Make sure that links to private/unincluded methods do not cause
@@ -65,8 +65,8 @@
     };
 
     private static final String[][] TEST2 = {
-        {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#m()\"><code>m()</code></a><br/>"},
-        {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#X()\"><code>X()</code></a><br/>"},
+        {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#m--\"><code>m()</code></a><br/>"},
+        {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#X--\"><code>X()</code></a><br/>"},
         {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#f\"><code>f</code></a><br/>"},
     };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, 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 8016675
+ * @summary Test for window title.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestWindowTitle
+ * @run main TestWindowTitle
+ */
+
+public class TestWindowTitle extends JavadocTester {
+
+    private static final String BUG_ID = "8016675";
+    private static final String WIN_TITLE =
+            "Testing \"Window 'Title'\" with a \\ backslash and a / " +
+            "forward slash and a \u00e8 unicode char also a    tab and also a " +
+            "\t special character another \u0002 unicode)";
+    private static final String[][] TEST = {
+        {BUG_ID + FS  + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing \\\"Window \\\'Title\\\'\\\" " +
+            "with a \\\\ backslash and a / forward slash and a \\u00E8 unicode char " +
+            "also a    tab and also a \\t special character another \\u0002 unicode))\";"
+        },
+    };
+    private static final String[][] NEG_TEST = {
+        {BUG_ID + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing \"Window \'Title\'\" " +
+            "with a \\ backslash and a / forward slash and a \u00E8 unicode char " +
+            "also a    tab and also a \t special character another \u0002 unicode))\";"
+        },
+    };
+    private static final String[] ARGS = new String[]{
+        "-d", BUG_ID, "-windowtitle", WIN_TITLE, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestWindowTitle tester = new TestWindowTitle();
+        run(tester, ARGS, TEST, NEG_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/testWindowTitle/p1/C1.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2013, 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 p1;
+
+public class C1 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testWindowTitle/p2/C2.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2013, 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 p2;
+
+public class C2 {
+}
--- a/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java	Mon Oct 28 18:30:14 2013 -0400
@@ -28,6 +28,7 @@
  *
  * @author   Mahmood Ali <mali>
  * @library  ../../lib/
+ * @ignore
  * @build    JavadocTester
  * @build    TestSmoke
  * @run main TestSmoke
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/doclint/CustomTagTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,19 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8006248
+ * @summary DocLint should report unknown tags
+ * @build DocLintTester
+ * @run main DocLintTester CustomTagTest.java
+ * @run main DocLintTester -XcustomTags: -ref CustomTagTest.out CustomTagTest.java
+ * @run main DocLintTester -XcustomTags:customTag -ref CustomTagTestWithOption.out CustomTagTest.java
+ * @run main DocLintTester -XcustomTags:customTag,anotherCustomTag -ref CustomTagTestWithOption.out CustomTagTest.java
+ * @author bpatel
+ */
+
+/**
+ * @customTag Text for a custom tag.
+ * @unknownTag Text for an unknown tag.
+ */
+public class CustomTagTest {
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/doclint/CustomTagTest.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,8 @@
+CustomTagTest.java:14: error: unknown tag: customTag
+ * @customTag Text for a custom tag.
+   ^
+CustomTagTest.java:15: error: unknown tag: unknownTag
+ * @unknownTag Text for an unknown tag.
+   ^
+2 errors
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/doclint/CustomTagTestWithOption.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,5 @@
+CustomTagTest.java:15: error: unknown tag: unknownTag
+ * @unknownTag Text for an unknown tag.
+   ^
+1 error
+
--- a/test/tools/doclint/DocLintTester.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/doclint/DocLintTester.java	Mon Oct 28 18:30:14 2013 -0400
@@ -58,6 +58,8 @@
                 badArgs = true;
             } else if (arg.startsWith("-Xmsgs")) {
                 opts.add(arg);
+            } else if (arg.startsWith("-XcustomTags")) {
+                opts.add(arg);
             } else if (arg.startsWith("-")) {
                 opts.add(arg);
                 if (i < args.length - 1 && !args[i+1].startsWith("-"))
--- a/test/tools/doclint/HtmlAttrsTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/doclint/HtmlAttrsTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -10,7 +10,7 @@
 /** */
 public class HtmlAttrsTest {
     /**
-     * <p xyz>
+     * <p xyz> text </p>
      */
     public void unknown() { }
 
--- a/test/tools/doclint/HtmlAttrsTest.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/doclint/HtmlAttrsTest.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 HtmlAttrsTest.java:13: error: unknown attribute: xyz
-     * <p xyz>
+     * <p xyz> text </p>
           ^
 HtmlAttrsTest.java:18: warning: attribute obsolete: name
      * <img name="x" alt="alt">
--- a/test/tools/doclint/tidy/BadEnd.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/doclint/tidy/BadEnd.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,6 +1,9 @@
 BadEnd.java:14: warning: nested tag not allowed: <code>
  * <code> text <code>
                ^
+BadEnd.java:14: warning: empty <code> tag
+ * <code> text <code>
+               ^
 BadEnd.java:14: error: element not closed: code
  * <code> text <code>
                ^
@@ -14,4 +17,4 @@
  * <a name="here"> text <a>
    ^
 4 errors
-1 warning
+2 warnings
--- a/test/tools/doclint/tidy/TrimmingEmptyTag.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/doclint/tidy/TrimmingEmptyTag.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8004832
+ * @bug 8004832 8026368
  * @summary Add new doclint package
  * @library ..
  * @build DocLintTester
@@ -26,4 +26,9 @@
  * <ul></ul>
  * <ul><li></li></ul>
  */
-public class TrimmingEmptyTag { }
+public class TrimmingEmptyTag {
+    /** <p> */
+    public void implicitParaEnd_endOfComment() { }
+    /** <p> <ul><li>text</ul> */
+    public void implicitParaEnd_nextBlockTag() { }
+}
--- a/test/tools/doclint/tidy/TrimmingEmptyTag.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/doclint/tidy/TrimmingEmptyTag.out	Mon Oct 28 18:30:14 2013 -0400
@@ -43,4 +43,10 @@
 TrimmingEmptyTag.java:26: warning: empty <ul> tag
  * <ul></ul>
        ^
-15 warnings
+TrimmingEmptyTag.java:30: warning: empty <p> tag
+    /** <p> */
+        ^
+TrimmingEmptyTag.java:32: warning: empty <p> tag
+    /** <p> <ul><li>text</ul> */
+        ^
+17 warnings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/ArraysInIntersections.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2013, 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 8021339
+ * @summary Allow arrays in intersection types
+ * @compile ArraysInIntersections.java
+ */
+
+import java.io.Serializable;
+
+public class ArraysInIntersections<T extends Serializable & Integer[]> {
+
+    public <S extends Serializable & Integer[]> Object m() {
+        return (Serializable & Integer[]) new Integer[1];
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/InferArraysInIntersections.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2013, 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 8021339
+ * @summary Allow arrays in intersection types
+ * @compile -doe -XDrawDiagnostics InferArraysInIntersections.java
+ */
+import java.util.*;
+
+class InferArraysInIntersections {
+   <T> T m(List<? super T> t) { return null; }
+
+   void test(List<char[]> lc) {
+      Runnable r = m(lc); //inference fails here
+   }
+}
--- a/test/tools/javac/MethodParameters/AnnotationTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/AnnotationTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters AnnotationTest.java
- * @run main Tester AnnotationTest
+ * @run main Tester AnnotationTest AnnotationTest.out
  */
 
 import java.lang.annotation.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/AnnotationTest.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,10 @@
+static interface AnnotationTest$Annos -- inner
+AnnotationTest$Annos.foo()
+AnnotationTest$Annos.value()
+class AnnotationTest -- 
+AnnotationTest.<init>(i, ji)
+AnnotationTest.foo(i, ji)
+static interface AnnotationTest$I -- inner
+AnnotationTest$I.m(i, ji)
+static interface AnnotationTest$Anno -- inner
+AnnotationTest$Anno.f()
\ No newline at end of file
--- a/test/tools/javac/MethodParameters/AnonymousClass.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/AnonymousClass.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters AnonymousClass.java
- * @run main Tester AnonymousClass
+ * @run main Tester AnonymousClass AnonymousClass.out
  */
 
 class AnonymousClass {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/AnonymousClass.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,80 @@
+static public class AnonymousClass$Sinner -- inner
+AnonymousClass$Sinner.<init>()
+AnonymousClass$Sinner.<init>(arg, barg)
+AnonymousClass$Sinner.m(s/*synthetic*/, ts/*synthetic*/)/*synthetic*/
+AnonymousClass$Sinner.m()/*synthetic*/
+AnonymousClass$Sinner.m(s, ts)
+AnonymousClass$Sinner.m()
+class AnonymousClass$9 -- anon
+AnonymousClass$9.<init>(final this$0/*implicit*/)
+AnonymousClass$9.m()/*synthetic*/
+AnonymousClass$9.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$9.m(i, ji)
+AnonymousClass$9.m()
+class AnonymousClass$Inner -- inner
+AnonymousClass$Inner.<init>(final this$0/*synthetic*/)
+AnonymousClass$Inner.<init>(final this$0/*synthetic*/, arg, barg)
+AnonymousClass$Inner.m(s/*synthetic*/, ts/*synthetic*/)/*synthetic*/
+AnonymousClass$Inner.m()/*synthetic*/
+AnonymousClass$Inner.m(s, ts)
+AnonymousClass$Inner.m()
+class AnonymousClass$3 -- anon
+AnonymousClass$3.<init>(final this$0/*implicit*/, arg, barg)
+AnonymousClass$3.m()/*synthetic*/
+AnonymousClass$3.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$3.m(i, ji)
+AnonymousClass$3.m()
+class AnonymousClass$2 -- anon
+AnonymousClass$2.<init>(final this$0/*implicit*/)
+AnonymousClass$2.m()/*synthetic*/
+AnonymousClass$2.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$2.m(i, ji)
+AnonymousClass$2.m()
+class AnonymousClass -- 
+AnonymousClass.<init>(final a, ba)
+AnonymousClass.foo(final a, ba)
+class AnonymousClass$5 -- anon
+AnonymousClass$5.<init>(final this$0/*implicit*/, arg, barg)
+AnonymousClass$5.m()/*synthetic*/
+AnonymousClass$5.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$5.m(i, ji)
+AnonymousClass$5.m()
+static interface AnonymousClass$I -- inner
+AnonymousClass$I.m()
+AnonymousClass$I.m(x, yx)
+class AnonymousClass$10 -- anon
+AnonymousClass$10.<init>(final this$0/*implicit*/, arg, barg)
+AnonymousClass$10.m()/*synthetic*/
+AnonymousClass$10.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$10.m(i, ji)
+AnonymousClass$10.m()
+class AnonymousClass$8 -- anon
+AnonymousClass$8.<init>(final this$0/*implicit*/, arg, barg)
+AnonymousClass$8.m()/*synthetic*/
+AnonymousClass$8.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$8.m(i, ji)
+AnonymousClass$8.m()
+class AnonymousClass$6 -- anon
+AnonymousClass$6.<init>(final this$0/*implicit*/)
+AnonymousClass$6.m()/*synthetic*/
+AnonymousClass$6.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$6.m(i, ji)
+AnonymousClass$6.m()
+class AnonymousClass$7 -- anon
+AnonymousClass$7.<init>(final this$0/*implicit*/)
+AnonymousClass$7.m()/*synthetic*/
+AnonymousClass$7.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$7.m(i, ji)
+AnonymousClass$7.m()
+class AnonymousClass$4 -- anon
+AnonymousClass$4.<init>(final this$0/*implicit*/)
+AnonymousClass$4.m()/*synthetic*/
+AnonymousClass$4.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$4.m(i, ji)
+AnonymousClass$4.m()
+class AnonymousClass$1 -- anon
+AnonymousClass$1.<init>(final this$0/*implicit*/)
+AnonymousClass$1.m()/*synthetic*/
+AnonymousClass$1.m(i/*synthetic*/, ji/*synthetic*/)/*synthetic*/
+AnonymousClass$1.m(i, ji)
+AnonymousClass$1.m()
\ No newline at end of file
--- a/test/tools/javac/MethodParameters/ClassFileVisitor.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/ClassFileVisitor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -82,15 +82,14 @@
      * Read the class and determine some key characteristics, like if it's
      * an enum, or inner class, etc.
      */
-    void visitClass(final String cname, final File cfile, final StringBuilder sb)
-        throws Exception {
+    void visitClass(final String cname, final File cfile, final StringBuilder sb) throws Exception {
         this.cname = cname;
         classFile = ClassFile.read(cfile);
         isEnum = classFile.access_flags.is(AccessFlags.ACC_ENUM);
         isInterface = classFile.access_flags.is(AccessFlags.ACC_INTERFACE);
         isPublic = classFile.access_flags.is(AccessFlags.ACC_PUBLIC);
         isInner = false;
-        isStatic = true;
+        isStatic = false;
         isAnon = false;
 
         Attribute attr = classFile.getAttribute("InnerClasses");
@@ -100,10 +99,11 @@
         sb.append(isStatic ? "static " : "")
             .append(isPublic ? "public " : "")
             .append(isEnum ? "enum " : isInterface ? "interface " : "class ")
-            .append(cname).append(" -- ")
-            .append(isInner? "inner " : "" )
-            .append(isAnon ?  "anon" : "")
-            .append("\n");;
+            .append(cname).append(" -- ");
+        if (isInner) {
+            sb.append(isAnon ? "anon" : "inner");
+        }
+        sb.append("\n");
 
         for (Method method : classFile.methods) {
             new MethodVisitor().visitMethod(method, sb);
@@ -148,7 +148,9 @@
         public int mNumParams;
         public boolean mSynthetic;
         public boolean mIsConstructor;
+        public boolean mIsClinit;
         public boolean mIsBridge;
+        public boolean isFinal;
         public String prefix;
 
         void visitMethod(Method method, StringBuilder sb) throws Exception {
@@ -160,9 +162,13 @@
             mNumParams = -1; // no MethodParameters attribute found
             mSynthetic = method.access_flags.is(AccessFlags.ACC_SYNTHETIC);
             mIsConstructor = mName.equals("<init>");
+            mIsClinit = mName.equals("<clinit>");
             prefix = cname + "." + mName + "() - ";
             mIsBridge = method.access_flags.is(AccessFlags.ACC_BRIDGE);
 
+            if (mIsClinit) {
+                sb = new StringBuilder(); // Discard output
+            }
             sb.append(cname).append(".").append(mName).append("(");
 
             for (Attribute a : method.attributes) {
@@ -170,9 +176,18 @@
             }
             if (mNumParams == -1) {
                 if (mSynthetic) {
-                    sb.append("<none>)!!");
+                    // We don't generate MethodParameters attribute for synthetic
+                    // methods, so we are creating a parameter pattern to match
+                    // ReflectionVisitor API output.
+                    for (int i = 0; i < mParams; i++) {
+                        if (i == 0)
+                            sb.append("arg").append(i);
+                        else
+                            sb.append(", arg").append(i);
+                    }
+                    sb.append(")/*synthetic*/");
                 } else {
-                    sb.append("<none>)");
+                    sb.append(")");
                 }
             }
             sb.append("\n");
@@ -217,7 +232,7 @@
             String sep = "";
             String userParam = null;
             for (int x = 0; x <  mNumParams; x++) {
-
+                isFinal = (mp.method_parameter_table[x].flags & AccessFlags.ACC_FINAL) != 0;
                 // IMPL: Assume all parameters are named, something.
                 int cpi = mp.method_parameter_table[x].name_index;
                 if (cpi == 0) {
@@ -229,6 +244,8 @@
                 String param = null;
                 try {
                     param = classFile.constant_pool.getUTF8Value(cpi);
+                    if (isFinal)
+                        param = "final " + param;
                     sb.append(sep).append(param);
                     sep = ", ";
                 } catch(ConstantPoolException e) {
@@ -239,7 +256,7 @@
 
 
                 // Check availability, flags and special names
-                int check = checkParam(mp, param, x, sb);
+                int check = checkParam(mp, param, x, sb, isFinal);
                 if (check < 0) {
                     return null;
                 }
@@ -253,9 +270,15 @@
                     char c = userParam.charAt(0);
                     expect =  (++c) + userParam;
                 }
+                if(isFinal && expect != null)
+                    expect = "final " + expect;
                 if (check > 0) {
+                    if(isFinal) {
+                        userParam = param.substring(6);
+                    } else {
                     userParam = param;
                 }
+                }
                 if (expect != null && !param.equals(expect)) {
                     error(prefix + "param[" + x + "]='"
                           + param + "' expected '" + expect + "'");
@@ -263,7 +286,7 @@
                 }
             }
             if (mSynthetic) {
-                sb.append(")!!");
+                sb.append(")/*synthetic*/");
             } else {
                 sb.append(")");
             }
@@ -278,7 +301,7 @@
          * explicitly declared parameter.
          */
         int checkParam(MethodParameters_attribute mp, String param, int index,
-                       StringBuilder sb) {
+                       StringBuilder sb, boolean isFinal) {
 
             boolean synthetic = (mp.method_parameter_table[index].flags
                                  & AccessFlags.ACC_SYNTHETIC) != 0;
@@ -304,9 +327,13 @@
                     }
                 } else if (index == 0) {
                     if (isAnon) {
+                        expect = "this\\$[0-9]+";
                         allowMandated = true;
-                        expect = "this\\$[0-n]*";
+                        if (isFinal) {
+                            expect = "final this\\$[0-9]+";
+                        }
                     } else if (isInner && !isStatic) {
+                        expect = "this\\$[0-9]+";
                         allowMandated = true;
                         if (!isPublic) {
                             // some but not all non-public inner classes
@@ -314,7 +341,9 @@
                             // the test a bit of slack and allow either.
                             allowSynthetic = true;
                         }
-                        expect = "this\\$[0-n]*";
+                        if (isFinal) {
+                            expect = "final this\\$[0-9]+";
+                        }
                     }
                 }
             } else if (isEnum && mNumParams == 1 && index == 0 && mName.equals("valueOf")) {
@@ -327,8 +356,8 @@
                  */
                 expect = null;
             }
-            if (mandated) sb.append("!");
-            if (synthetic) sb.append("!!");
+            if (mandated) sb.append("/*implicit*/");
+            if (synthetic) sb.append("/*synthetic*/");
 
             // IMPL: our rules a somewhat fuzzy, sometimes allowing both mandated
             // and synthetic. However, a parameters cannot be both.
--- a/test/tools/javac/MethodParameters/Constructors.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/Constructors.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters Constructors.java
- * @run main Tester Constructors
+ * @run main Tester Constructors Constructors.out
  */
 
 public class Constructors {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/Constructors.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,5 @@
+public class Constructors -- 
+Constructors.<init>()
+Constructors.<init>(final a, final ba)
+Constructors.<init>(a, final ba, final cba)
+Constructors.<init>(a, ba, final cba, final dcba)
\ No newline at end of file
--- a/test/tools/javac/MethodParameters/EnumTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/EnumTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters EnumTest.java
- * @run main Tester EnumTest
+ * @run main Tester EnumTest EnumTest.out
  */
 
 /** Test that parameter names are recorded for enum methods */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/EnumTest.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,7 @@
+enum EnumTest -- 
+EnumTest.<init>($enum$name/*synthetic*/, $enum$ordinal/*synthetic*/)
+EnumTest.<init>($enum$name/*synthetic*/, $enum$ordinal/*synthetic*/, a, ba)
+EnumTest.ok(c, dc)
+EnumTest.values()
+EnumTest.valueOf(A, BA)
+EnumTest.valueOf(name/*implicit*/)
\ No newline at end of file
--- a/test/tools/javac/MethodParameters/InstanceMethods.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/InstanceMethods.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters InstanceMethods.java
- * @run main Tester InstanceMethods
+ * @run main Tester InstanceMethods InstanceMethods.out
  */
 
 public class InstanceMethods {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/InstanceMethods.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,11 @@
+public class InstanceMethods -- 
+InstanceMethods.<init>()
+InstanceMethods.empty()
+InstanceMethods.def(a, final ba, final cba)
+InstanceMethods.pub(d, final ed, final fed)
+InstanceMethods.prot(g, final hg, final ihg)
+InstanceMethods.priv(j, final kj, final lkj)
+InstanceMethods.def(A, BA, final CBA, final DCBA)
+InstanceMethods.pub(B, CB, final DCB, final EDCB)
+InstanceMethods.prot(C, DC, final EDC, final FEDC)
+InstanceMethods.priv(D, ED, final FED, final GFED)
\ No newline at end of file
--- a/test/tools/javac/MethodParameters/LambdaTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/LambdaTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters LambdaTest.java
- * @run main Tester LambdaTest
+ * @run main Tester LambdaTest LambdaTest.out
  */
 
 /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/LambdaTest.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,7 @@
+class LambdaTest -- 
+LambdaTest.<init>()
+LambdaTest.foo(i)
+LambdaTest.lambda$static$1(arg0)/*synthetic*/
+LambdaTest.lambda$null$0(arg0, arg1)/*synthetic*/
+static interface LambdaTest$I -- inner
+LambdaTest$I.m(x)
--- a/test/tools/javac/MethodParameters/LocalClassTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/LocalClassTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters LocalClassTest.java
- * @run main Tester LocalClassTest
+ * @run main Tester LocalClassTest LocalClassTest.out
  */
 
 class LocalClassTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/LocalClassTest.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,12 @@
+class LocalClassTest$1Local_has_constructor -- inner
+LocalClassTest$1Local_has_constructor.<init>(final this$0/*implicit*/, a, ba)
+LocalClassTest$1Local_has_constructor.<init>(final this$0/*implicit*/)
+LocalClassTest$1Local_has_constructor.foo(m, nm)
+LocalClassTest$1Local_has_constructor.foo()
+class LocalClassTest$1Local_default_constructor -- inner
+LocalClassTest$1Local_default_constructor.<init>(final this$0/*implicit*/)
+LocalClassTest$1Local_default_constructor.foo()
+LocalClassTest$1Local_default_constructor.foo(m, nm)
+class LocalClassTest -- 
+LocalClassTest.<init>()
+LocalClassTest.foo()
\ No newline at end of file
--- a/test/tools/javac/MethodParameters/MemberClassTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/MemberClassTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters MemberClassTest.java
- * @run main Tester MemberClassTest
+ * @run main Tester MemberClassTest MemberClassTest.out
  */
 
 class MemberClassTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/MemberClassTest.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,33 @@
+static class MemberClassTest$Static_Member -- inner
+MemberClassTest$Static_Member.<init>()
+MemberClassTest$Static_Member.<init>(arg, barg)
+MemberClassTest$Static_Member.m(s, ts)
+MemberClassTest$Static_Member.m()
+public class MemberClassTest$Member -- inner
+MemberClassTest$Member.<init>(final this$0/*implicit*/)
+MemberClassTest$Member.<init>(final this$0/*implicit*/, a, ba)
+MemberClassTest$Member.m(s, ts)
+MemberClassTest$Member.m()
+public class MemberClassTest$Member$Member_Member -- inner
+MemberClassTest$Member$Member_Member.<init>(final this$1/*implicit*/)
+MemberClassTest$Member$Member_Member.<init>(final this$1/*implicit*/, x, yx)
+class MemberClassTest$1 -- anon
+MemberClassTest$1.<init>(final this$0/*implicit*/)
+MemberClassTest$1.m()
+MemberClassTest$1.m(s, ts)
+static public class MemberClassTest$Static_Member$Static_Member_Static_Member -- inner
+MemberClassTest$Static_Member$Static_Member_Static_Member.<init>()
+MemberClassTest$Static_Member$Static_Member_Static_Member.<init>(x, yx)
+public class MemberClassTest$Static_Member$Static_Member_Member -- inner
+MemberClassTest$Static_Member$Static_Member_Member.<init>(final this$0/*implicit*/)
+MemberClassTest$Static_Member$Static_Member_Member.<init>(final this$0/*implicit*/, x, yx)
+class MemberClassTest -- 
+MemberClassTest.<init>(final a, ba)
+MemberClassTest.<init>()
+MemberClassTest.foo()
+static interface MemberClassTest$I -- inner
+MemberClassTest$I.m()
+MemberClassTest$I.m(x, yx)
+class MemberClassTest$1$Anonymous_Member -- inner
+MemberClassTest$1$Anonymous_Member.<init>(final this$1/*implicit*/)
+MemberClassTest$1$Anonymous_Member.<init>(final this$1/*implicit*/, x, yx)
\ No newline at end of file
--- a/test/tools/javac/MethodParameters/ReflectionVisitor.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/ReflectionVisitor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -48,6 +48,7 @@
     boolean isMember;
     boolean isStatic;
     boolean isPublic;
+    boolean isFinal;
     Class clazz;
     StringBuilder sb;
 
@@ -72,8 +73,8 @@
             .append(isPublic ? "public " : "")
             .append(isEnum ? "enum " : isInterface ? "interface " : "class ")
             .append(cl).append(" -- ")
-            .append(isMember? "member " : "" )
-            .append(isLocal? "local " : "" )
+            .append(isMember? "inner" : "" )
+            .append(isLocal? "inner" : "" )
             .append(isAnon ?  "anon" : "")
             .append("\n");
 
@@ -82,7 +83,6 @@
         }
 
         for (Method m :clazz.getDeclaredMethods()) {
-
             testMethod(m);
         }
     }
@@ -116,9 +116,15 @@
         for (Parameter p : c.getParameters()) {
             i++;
             String pname = p.getName();
+            int pmodifier = p.getModifiers();
+            isFinal = false;
+            if (Modifier.isFinal(pmodifier)) {
+                isFinal = true;
+                pname = "final " + pname;
+            }
             sb.append(sep).append(pname);
-            if (p.isImplicit()) sb.append("!");
-            if (p.isSynthetic()) sb.append("!!");
+            if (p.isImplicit()) sb.append("/*implicit*/");
+            if (p.isSynthetic()) sb.append("/*synthetic*/");
             sep = ", ";
 
             // Set expectations
@@ -135,11 +141,17 @@
                 }
             } else if (i == 0) {
                 if (isAnon) {
-                    allowImplicit = true;
-                } else if (isLocal) {
+                    expect = "this\\$[0-9]+";
                     allowImplicit = true;
-                    expect = "this\\$[0-n]*";
+                    if (isFinal)
+                        expect = "final this\\$[0-9]+";
+                } else if (isLocal) {
+                    expect = "this\\$[0-9]+";
+                    allowImplicit = true;
+                    if (isFinal)
+                        expect = "final this\\$[0-9]+";
                 } else if ((isMember && !isStatic)) {
+                    expect = "this\\$[0-9]+";
                     allowImplicit = true;
                     if (!isPublic) {
                         // some but not all non-public inner classes
@@ -147,7 +159,8 @@
                         // the test a bit of slack and allow either.
                         allowSynthetic = true;
                     }
-                    expect = "this\\$[0-n]*";
+                    if (isFinal)
+                        expect = "final this\\$[0-9]+";
                 }
             }
 
@@ -201,11 +214,16 @@
                 char ch = param.charAt(0);
                 expect =  (++ch) + param;
             }
-
+            if (isFinal && expect != null) {
+                expect = "final " + expect;
+            }
             if (pname != null && fidelity) {
+                if (isFinal) {
+                    param = pname.substring(6);
+                } else {
                 param = pname;
             }
-
+            }
             if (expect != null && !expect.equals(pname)) {
                 error(prefix + "param[" + i + "]='" + pname +
                       "' expected '" + expect + "'");
@@ -213,7 +231,7 @@
             }
         }
         if  (c.isSynthetic()) {
-            sb.append(")!!\n");
+            sb.append(")/*synthetic*/\n");
         } else {
             sb.append(")\n");
         }
@@ -240,13 +258,24 @@
         // the test-case design pattern, except synthetic methods.
         for (Parameter p : m.getParameters()) {
             i++;
+            isFinal = false;
+            int pmodifier = p.getModifiers();
             if (param == null) {
                 param = p.getName();
+                if (Modifier.isFinal(pmodifier)) {
+                    isFinal = true;
+                    param = "final " + param;
+                }
                 sb.append(sep).append(param);
             } else  {
                 char c = param.charAt(0);
                 String expect =  m.isSynthetic() ? ("arg" + i) : ((++c) + param);
                 param = p.getName();
+                if (Modifier.isFinal(pmodifier)) {
+                    isFinal = true;
+                    expect = "final " + expect;
+                    param = "final " + param;
+                }
                 sb.append(sep).append(param);
                 if (!m.isBridge() && !expect.equals(param)) {
                     error(prefix + "param[" + i + "]='"
@@ -254,10 +283,18 @@
                     break;
                 }
             }
+            if(isFinal)
+                param = param.substring(6);
+            if (p.isImplicit()) {
+                sb.append("/*implicit*/");
+            }
+            if (p.isSynthetic()) {
+                sb.append("/*synthetic*/");
+            }
             sep = ", ";
         }
         if  (m.isSynthetic()) {
-            sb.append(")!!\n");
+            sb.append(")/*synthetic*/\n");
         } else {
             sb.append(")\n");
         }
--- a/test/tools/javac/MethodParameters/StaticMethods.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/StaticMethods.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters StaticMethods.java
- * @run main Tester StaticMethods
+ * @run main Tester StaticMethods StaticMethods.out
  */
 
 public class StaticMethods {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/StaticMethods.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,11 @@
+public class StaticMethods -- 
+StaticMethods.<init>()
+StaticMethods.def(a, ba, final cba, final dcba)
+StaticMethods.def(a, final ba, final cba)
+StaticMethods.pub(d, final ed, final fed)
+StaticMethods.pub(a, ba, final cba, final dcba)
+StaticMethods.prot(g, final hg, final ihg)
+StaticMethods.prot(aa, baa, final cbaa, final dcbaa)
+StaticMethods.priv(j, final kj, final lkj)
+StaticMethods.priv(abc, babc, final cbabc, final dcbabc)
+StaticMethods.empty()
\ No newline at end of file
--- a/test/tools/javac/MethodParameters/Tester.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/Tester.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,6 +23,11 @@
 
 import java.io.*;
 import java.lang.reflect.Constructor;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * Test driver for MethodParameters testing.
@@ -44,6 +49,13 @@
 
     final static File classesdir = new File(System.getProperty("test.classes", "."));
 
+    private String classname;
+    private File[] files;
+    private File refFile;
+    private int errors;
+    private int warnings;
+    private int diffGolden;
+
     /**
      * The visitor classes that does the actual checking are referenced
      * statically, to force compilations, without having to reference
@@ -62,32 +74,38 @@
      * Test-driver expect a single classname as argument.
      */
     public static void main(String... args) throws Exception {
-        if (args.length != 1) {
-            throw new Error("A single class name is expected as argument");
+        if (args.length != 2) {
+            throw new Error("A single class name and a golden file are expected as argument");
         }
-        final String pattern = args[0] + ".*\\.class";
-        File files[] = classesdir.listFiles(new FileFilter() {
+        String testSrc = System.getProperty("test.src");
+        String testName = args[0];
+        String testGoldenFile = args[1];
+        final String pattern = testName + ".*\\.class";
+        File refFile = new File(testSrc, testGoldenFile);
+        File[] files = classesdir.listFiles(new FileFilter() {
                 public boolean accept(File f) {
                     return f.getName().matches(pattern);
                 }
             });
         if (files.length == 0) {
-            File file = new File(classesdir, args[0] + ".class");
+            File file = new File(classesdir, testName + ".class");
             throw new Error(file.getPath() + " not found");
         }
 
-        new Tester(args[0], files).run();
+        new Tester(testName, files, refFile).run();
     }
 
-    public Tester(String name, File files[]) {
+    public Tester(String name, File[] files, File refFile) {
         this.classname = name;
         this.files = files;
+        this.refFile = refFile;
     }
 
     void run() throws Exception {
 
         // Test with each visitor
         for (Class<Visitor> vclass : visitors) {
+            boolean compResult = false;
             try {
                 String vname = vclass.getName();
                 Constructor c = vclass.getConstructor(Tester.class);
@@ -105,12 +123,21 @@
                         e.printStackTrace();
                     }
                 }
-                info(sb.toString());
+                String output = sb.toString();
+                info(output);
+                compResult = compareOutput(refFile, output);
             } catch(ReflectiveOperationException e) {
                 warn("Class " + vclass.getName() + " ignored, not a Visitor");
                 continue;
             }
+            if (!compResult) {
+                diffGolden++;
+                error("The output from " + vclass.getName() + " did not match golden file.");
         }
+        }
+
+        if (0 != diffGolden)
+            throw new Exception("Test output is not equal with golden file.");
 
         if(0 != warnings)
                 System.err.println("Test generated " + warnings + " warnings");
@@ -119,6 +146,25 @@
             throw new Exception("Tester test failed with " +
                                 errors + " errors");
     }
+    // Check if test output matches the golden file.
+    boolean compareOutput(File refFile, String sb)
+            throws FileNotFoundException, IOException {
+
+        List<String> refFileList = Files.readAllLines(refFile.toPath(), StandardCharsets.UTF_8);
+        List<String> sbList = Arrays.asList(sb.split("[\r\n]+"));
+        // Check if test output contains unexpected lines or is missing expected lines.
+        List<String> sbOnly = new ArrayList<>(sbList);
+        sbOnly.removeAll(refFileList);
+        for (String line: sbOnly)
+            error("unexpected line found: " + line);
+
+        List<String> refOnly = new ArrayList<>(refFileList);
+        refOnly.removeAll(sbList);
+        for (String line: refOnly)
+            error("expected line not found: " + line);
+
+        return sbOnly.isEmpty() && refOnly.isEmpty();
+    }
 
     abstract static  class Visitor {
         Tester tester;
@@ -153,9 +199,4 @@
     void info(String msg) {
         System.out.println(msg);
     }
-
-    int errors;
-    int warnings;
-    String classname;
-    File files[];
 }
--- a/test/tools/javac/MethodParameters/UncommonParamNames.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/MethodParameters/UncommonParamNames.java	Mon Oct 28 18:30:14 2013 -0400
@@ -27,7 +27,7 @@
  * @summary javac should generate method parameters correctly.
  * @build Tester
  * @compile -parameters UncommonParamNames.java
- * @run main Tester UncommonParamNames
+ * @run main Tester UncommonParamNames UncommonParamNames.out
  */
 
 /** Test uncommon parameter names */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/MethodParameters/UncommonParamNames.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,17 @@
+class UncommonParamNames -- 
+UncommonParamNames.<init>(zerozero)
+UncommonParamNames.<init>(a)
+UncommonParamNames.<init>($1)
+UncommonParamNames.<init>(_x)
+UncommonParamNames.<init>(a, ba, cba, dcba, edcba, fedcba, gfedcba, hgfedcba, ihgfedcba, jihgfedcba, kjihgfedcba, lkjihgfedcba, mlkjihgfedcba, nmlkjihgfedcba, onmlkjihgfedcba, ponmlkjihgfedcba, qponmlkjihgfedcba, rqponmlkjihgfedcba, srqponmlkjihgfedcba, tsrqponmlkjihgfedcba, utsrqponmlkjihgfedcba, vutsrqponmlkjihgfedcba, wvutsrqponmlkjihgfedcba, xwvutsrqponmlkjihgfedcba, yxwvutsrqponmlkjihgfedcba, zyxwvutsrqponmlkjihgfedcba)
+UncommonParamNames.<init>(aLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongName, baLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongName, cbaLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongName)
+UncommonParamNames.<init>(zerozeroeight)
+UncommonParamNames.<init>(zerozeroseven)
+UncommonParamNames.foo(zerozero)
+UncommonParamNames.foo(a)
+UncommonParamNames.foo($1)
+UncommonParamNames.foo(a, ba, cba, dcba, edcba, fedcba, gfedcba, hgfedcba, ihgfedcba, jihgfedcba, kjihgfedcba, lkjihgfedcba, mlkjihgfedcba, nmlkjihgfedcba, onmlkjihgfedcba, ponmlkjihgfedcba, qponmlkjihgfedcba, rqponmlkjihgfedcba, srqponmlkjihgfedcba, tsrqponmlkjihgfedcba, utsrqponmlkjihgfedcba, vutsrqponmlkjihgfedcba, wvutsrqponmlkjihgfedcba, xwvutsrqponmlkjihgfedcba, yxwvutsrqponmlkjihgfedcba, zyxwvutsrqponmlkjihgfedcba)
+UncommonParamNames.foo(zerozeroseven)
+UncommonParamNames.foo(zerozeroeight)
+UncommonParamNames.foo(aLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongName, baLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongName, cbaLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongName)
+UncommonParamNames.foo(_x)
\ No newline at end of file
--- a/test/tools/javac/T7042623.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/T7042623.java	Mon Oct 28 18:30:14 2013 -0400
@@ -2,6 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug 7042623
  * @summary Regression: javac silently crash when attributing non-existent annotation
+ * @ignore
  * @compile/fail/ref=T7042623.out -XDrawDiagnostics -XDdev T7042623.java
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/T8019486/WrongLNTForLambdaTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2013, 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 8019486 8026861
+ * @summary javac, generates erroneous LVT for a test case with lambda code
+ * @library /tools/javac/lib
+ * @build ToolBox
+ * @run main WrongLNTForLambdaTest
+ */
+
+import java.io.File;
+import java.nio.file.Paths;
+
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.Code_attribute;
+import com.sun.tools.classfile.LineNumberTable_attribute;
+import com.sun.tools.classfile.Method;
+import com.sun.tools.javac.util.Assert;
+
+public class WrongLNTForLambdaTest {
+
+    static final String testSource =
+    /* 01 */        "import java.util.List;\n" +
+    /* 02 */        "import java.util.Arrays;\n" +
+    /* 03 */        "import java.util.stream.Collectors;\n" +
+    /* 04 */        "\n" +
+    /* 05 */        "public class Foo {\n" +
+    /* 06 */        "    void bar(int value) {\n" +
+    /* 07 */        "        final List<Integer> numbers = Arrays.asList(1, 2, 3);\n" +
+    /* 08 */        "        final List<Integer> numbersPlusOne = \n" +
+    /* 09 */        "             numbers.stream().map(number -> number / 1).collect(Collectors.toList());\n" +
+    /* 10 */        "    }\n" +
+    /* 11 */        "    void variablesInLambdas(int value) {\n" +
+    /* 12 */        "        Runnable r1 = () -> {\n" +
+    /* 13 */        "            int i  = value;\n" +
+    /* 14 */        "            class FooBar<T extends CharSequence> {\n" +
+    /* 15 */        "                public void run() {\n" +
+    /* 16 */        "                    T t = null;\n" +
+    /* 17 */        "                }\n" +
+    /* 18 */        "            }\n" +
+    /* 19 */        "        };\n" +
+    /* 20 */        "        Runnable r2 = () -> System.err.println(1);\n" +
+    /* 21 */        "        Runnable r3 = (Runnable & java.io.Serializable) this::foo;\n" +
+    /* 22 */        "        Runnable r4 = super :: notify;\n" +
+    /* 23 */        "    }\n" +
+    /* 24 */        "    private void foo() {}\n" +
+    /* 25 */        "}";
+
+    static final int[][] simpleLambdaExpectedLNT = {
+    //  {line-number, start-pc},
+        {9,           0},       //number -> number / 1
+    };
+
+    static final int[][] lambdaWithVarsExpectedLNT = {
+    //  {line-number, start-pc},
+        {13,           0},       //number -> number / 1
+        {19,           2},       //number -> number / 1
+    };
+
+    static final int[][] insideLambdaWithVarsExpectedLNT = {
+    //  {line-number, start-pc},
+        {16,           0},       //number -> number / 1
+        {17,           2},       //number -> number / 1
+    };
+
+    static final int[][] lambdaVoid2VoidExpectedLNT = {
+    //  {line-number, start-pc},
+        {20,           0},       //number -> number / 1
+    };
+
+    static final int[][] deserializeExpectedLNT = {
+    //  {line-number, start-pc},
+        {05,           0},       //number -> number / 1
+    };
+
+    static final int[][] lambdaBridgeExpectedLNT = {
+    //  {line-number, start-pc},
+        {22,           0},       //number -> number / 1
+    };
+
+    public static void main(String[] args) throws Exception {
+        new WrongLNTForLambdaTest().run();
+    }
+
+    void run() throws Exception {
+        compileTestClass();
+        checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
+                "Foo.class").toUri()), "lambda$bar$0", simpleLambdaExpectedLNT);
+        checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
+                "Foo.class").toUri()), "lambda$variablesInLambdas$1", lambdaWithVarsExpectedLNT);
+        checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
+                "Foo$1FooBar.class").toUri()), "run", insideLambdaWithVarsExpectedLNT);
+        checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
+                "Foo.class").toUri()), "lambda$variablesInLambdas$2", lambdaVoid2VoidExpectedLNT);
+        checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
+                "Foo.class").toUri()), "$deserializeLambda$", deserializeExpectedLNT);
+        checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
+                "Foo.class").toUri()), "lambda$MR$variablesInLambdas$notify$8bc4f5bd$1", lambdaBridgeExpectedLNT);
+    }
+
+    void compileTestClass() throws Exception {
+        ToolBox.JavaToolArgs javacSuccessArgs =
+                new ToolBox.JavaToolArgs().setSources(testSource);
+        ToolBox.javac(javacSuccessArgs);
+    }
+
+    void checkClassFile(final File cfile, String methodToFind, int[][] expectedLNT) throws Exception {
+        ClassFile classFile = ClassFile.read(cfile);
+        boolean methodFound = false;
+        for (Method method : classFile.methods) {
+            if (method.getName(classFile.constant_pool).equals(methodToFind)) {
+                methodFound = true;
+                Code_attribute code = (Code_attribute) method.attributes.get("Code");
+                LineNumberTable_attribute lnt =
+                        (LineNumberTable_attribute) code.attributes.get("LineNumberTable");
+                Assert.check(lnt.line_number_table_length == expectedLNT.length,
+                        "The LineNumberTable found has a length different to the expected one");
+                int i = 0;
+                for (LineNumberTable_attribute.Entry entry: lnt.line_number_table) {
+                    Assert.check(entry.line_number == expectedLNT[i][0] &&
+                            entry.start_pc == expectedLNT[i][1],
+                            "LNT entry at pos " + i + " differ from expected." +
+                            "Found " + entry.line_number + ":" + entry.start_pc +
+                            ". Expected " + expectedLNT[i][0] + ":" + expectedLNT[i][1]);
+                    i++;
+                }
+            }
+        }
+        Assert.check(methodFound, "The seek method was not found");
+    }
+
+    void error(String msg) {
+        throw new AssertionError(msg);
+    }
+
+}
--- a/test/tools/javac/T8019486/WrongLVTForLambdaTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2013, 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 8019486
- * @summary javac, generates erroneous LVT for a test case with lambda code
- * @library /tools/javac/lib
- * @build ToolBox
- * @run main WrongLVTForLambdaTest
- */
-
-import java.io.File;
-import java.nio.file.Paths;
-
-import com.sun.tools.classfile.ClassFile;
-import com.sun.tools.classfile.Code_attribute;
-import com.sun.tools.classfile.LineNumberTable_attribute;
-import com.sun.tools.classfile.Method;
-import com.sun.tools.javac.util.Assert;
-
-public class WrongLVTForLambdaTest {
-
-    static final String testSource =
-    /* 01 */        "import java.util.List;\n" +
-    /* 02 */        "import java.util.Arrays;\n" +
-    /* 03 */        "import java.util.stream.Collectors;\n" +
-    /* 04 */        "\n" +
-    /* 05 */        "public class Foo {\n" +
-    /* 06 */        "    void bar(int value) {\n" +
-    /* 07 */        "        final List<Integer> numbers = Arrays.asList(1, 2, 3);\n" +
-    /* 08 */        "        final List<Integer> numbersPlusOne = \n" +
-    /* 09 */        "             numbers.stream().map(number -> number / 1).collect(Collectors.toList());\n" +
-    /* 10 */        "    }\n" +
-    /* 11 */        "}";
-
-    static final int[][] expectedLNT = {
-    //  {line-number, start-pc},
-        {9,           0},       //number -> number / 1
-    };
-
-    public static void main(String[] args) throws Exception {
-        new WrongLVTForLambdaTest().run();
-    }
-
-    void run() throws Exception {
-        compileTestClass();
-        checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
-                "Foo.class").toUri()));
-    }
-
-    void compileTestClass() throws Exception {
-        ToolBox.JavaToolArgs javacSuccessArgs =
-                new ToolBox.JavaToolArgs().setSources(testSource);
-        ToolBox.javac(javacSuccessArgs);
-    }
-
-    void checkClassFile(final File cfile) throws Exception {
-        ClassFile classFile = ClassFile.read(cfile);
-        int methodsFound = 0;
-        for (Method method : classFile.methods) {
-            if (method.getName(classFile.constant_pool).startsWith("lambda$")) {
-                ++methodsFound;
-                Code_attribute code = (Code_attribute) method.attributes.get("Code");
-                LineNumberTable_attribute lnt =
-                        (LineNumberTable_attribute) code.attributes.get("LineNumberTable");
-                Assert.check(lnt.line_number_table_length == expectedLNT.length,
-                        "The LineNumberTable found has a length different to the expected one");
-                int i = 0;
-                for (LineNumberTable_attribute.Entry entry: lnt.line_number_table) {
-                    Assert.check(entry.line_number == expectedLNT[i][0] &&
-                            entry.start_pc == expectedLNT[i][1],
-                            "LNT entry at pos " + i + " differ from expected." +
-                            "Found " + entry.line_number + ":" + entry.start_pc +
-                            ". Expected " + expectedLNT[i][0] + ":" + expectedLNT[i][1]);
-                    i++;
-                }
-            }
-        }
-        Assert.check(methodsFound == 1, "Expected to find one lambda method, found " + methodsFound);
-    }
-
-    void error(String msg) {
-        throw new AssertionError(msg);
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/neg/8022765/T8022765.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,141 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 8022765
+ * @summary javac should not crash for incorrect attribute values
+ * @build VerifyAnnotationsAttributed
+ * @run main VerifyAnnotationsAttributed T8022765.java
+ * @compile/fail/ref=T8022765.out -XDrawDiagnostics T8022765.java
+ */
+@Ann(@Override)
+@Primitive(@Override)
+@Str(@Override)
+@En(@Override)
+@ArrAnn(@Override)
+@ArrPrimitive(@Override)
+@ArrStr(@Override)
+@ArrEn(@Override)
+class AnnC { }
+
+class PrimitiveC {
+    private static final int C = 1;
+    @Ann(C)
+    @Primitive(C)
+    @Str(C)
+    @En(C)
+    @ArrAnn(C)
+    @ArrPrimitive(C)
+    @ArrStr(C)
+    @ArrEn(C)
+    class I {
+    }
+}
+
+class StringC {
+
+    private static final String C = "";
+
+    @Ann(C)
+    @Primitive(C)
+    @Str(C)
+    @En(C)
+    @ArrAnn(C)
+    @ArrPrimitive(C)
+    @ArrStr(C)
+    @ArrEn(C)
+    class I {
+    }
+}
+
+@Ann(E.A)
+@Primitive(E.A)
+@Str(E.A)
+@En(E.A)
+@ArrAnn(E.A)
+@ArrPrimitive(E.A)
+@ArrStr(E.A)
+@ArrEn(E.A)
+class EnC { }
+
+@Ann({@Override})
+@Primitive({@Override})
+@Str({@Override})
+@En({@Override})
+@ArrAnn({@Override})
+@ArrPrimitive({@Override})
+@ArrStr({@Override})
+@ArrEn({@Override})
+class ArrAnnC { }
+
+class ArrPrimitiveC {
+    private static final int C = 1;
+    @Ann({C})
+    @Primitive({C})
+    @Str({C})
+    @En({C})
+    @ArrAnn({C})
+    @ArrPrimitive({C})
+    @ArrStr({C})
+    @ArrEn({C})
+    class I {
+    }
+}
+
+class ArrStringC {
+    private static final String C = "";
+    @Ann({C})
+    @Primitive({C})
+    @Str({C})
+    @En({C})
+    @ArrAnn({C})
+    @ArrPrimitive({C})
+    @ArrStr({C})
+    @ArrEn({C})
+    class I {
+    }
+}
+
+@Ann({E.A})
+@Primitive({E.A})
+@Str({E.A})
+@En({E.A})
+@ArrAnn({E.A})
+@ArrPrimitive({E.A})
+@ArrStr({E.A})
+@ArrEn({E.A})
+class ArrEnC { }
+
+@interface Ann {
+    Override value();
+}
+
+@interface Primitive {
+    int value();
+}
+
+@interface Str {
+    String value();
+}
+
+@interface En {
+    E value();
+}
+
+@interface ArrAnn {
+    Override[] value();
+}
+
+@interface ArrPrimitive {
+    int[] value();
+}
+
+@interface ArrStr {
+    String[] value();
+}
+
+@interface ArrEn {
+    E[] value();
+}
+
+enum E {
+    A;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/neg/8022765/T8022765.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,57 @@
+T8022765.java:10:12: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:11:6: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:12:5: compiler.err.annotation.not.valid.for.type: E
+T8022765.java:14:15: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:15:9: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:16:8: compiler.err.annotation.not.valid.for.type: E
+T8022765.java:21:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:23:10: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:24:9: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
+T8022765.java:25:13: compiler.err.annotation.value.must.be.annotation
+T8022765.java:27:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:28:12: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
+T8022765.java:37:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:38:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:40:9: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+T8022765.java:41:13: compiler.err.annotation.value.must.be.annotation
+T8022765.java:42:19: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:44:12: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+T8022765.java:49:7: compiler.err.annotation.value.must.be.annotation
+T8022765.java:50:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:51:7: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
+T8022765.java:53:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:54:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:55:10: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
+T8022765.java:59:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:60:12: compiler.err.annotation.value.not.allowable.type
+T8022765.java:61:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:62:5: compiler.err.annotation.value.not.allowable.type
+T8022765.java:64:16: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:65:10: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:66:9: compiler.err.annotation.not.valid.for.type: E
+T8022765.java:71:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:72:16: compiler.err.annotation.value.not.allowable.type
+T8022765.java:73:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:74:9: compiler.err.annotation.value.not.allowable.type
+T8022765.java:75:14: compiler.err.annotation.value.must.be.annotation
+T8022765.java:77:14: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:78:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
+T8022765.java:85:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:86:16: compiler.err.annotation.value.not.allowable.type
+T8022765.java:87:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:88:9: compiler.err.annotation.value.not.allowable.type
+T8022765.java:89:14: compiler.err.annotation.value.must.be.annotation
+T8022765.java:90:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:92:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+T8022765.java:97:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:97:8: compiler.err.attribute.value.must.be.constant
+T8022765.java:98:12: compiler.err.annotation.value.not.allowable.type
+T8022765.java:98:14: compiler.err.attribute.value.must.be.constant
+T8022765.java:99:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:99:8: compiler.err.attribute.value.must.be.constant
+T8022765.java:100:5: compiler.err.annotation.value.not.allowable.type
+T8022765.java:100:7: compiler.err.attribute.value.must.be.constant
+T8022765.java:101:11: compiler.err.annotation.value.must.be.annotation
+T8022765.java:102:17: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:103:11: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
+56 errors
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/neg/8022765/VerifyAnnotationsAttributed.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.tree.IdentifierTree;
+import com.sun.source.tree.MemberSelectTree;
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TreePathScanner;
+import com.sun.source.util.Trees;
+import com.sun.tools.javac.api.JavacTool;
+import com.sun.tools.javac.file.JavacFileManager;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Collections;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+
+public class VerifyAnnotationsAttributed {
+    public static void main(String... args) throws IOException, URISyntaxException {
+        if (args.length != 1) throw new IllegalStateException("Must provide class name!");
+        File testSrc = new File(System.getProperty("test.src"));
+        File testFile = new File(testSrc, args[0]);
+        if (!testFile.canRead()) throw new IllegalStateException("Cannot read the test source");
+        JavacFileManager fm = JavacTool.create().getStandardFileManager(null, null, null);
+        JavacTask task = JavacTool.create().getTask(null,
+                                                    fm,
+                                                    null,
+                                                    Collections.<String>emptyList(),
+                                                    null,
+                                                    fm.getJavaFileObjects(testFile));
+        final Trees trees = Trees.instance(task);
+        final CompilationUnitTree cut = task.parse().iterator().next();
+        task.analyze();
+
+        //ensure all the annotation attributes are annotated meaningfully
+        //all the attributes in the test file should contain either an identifier
+        //or a select, so only checking those for a reasonable Element/Symbol.
+        new TreePathScanner<Void, Void>() {
+            @Override
+            public Void visitIdentifier(IdentifierTree node, Void p) {
+                verifyAttributedMeaningfully();
+                return super.visitIdentifier(node, p);
+            }
+            @Override
+            public Void visitMemberSelect(MemberSelectTree node, Void p) {
+                verifyAttributedMeaningfully();
+                return super.visitMemberSelect(node, p);
+            }
+            private void verifyAttributedMeaningfully() {
+                Element el = trees.getElement(getCurrentPath());
+
+                if (el == null || el.getKind() == ElementKind.OTHER) {
+                    throw new IllegalStateException("Not attributed properly: " + getCurrentPath().getParentPath().getLeaf());
+                }
+            }
+        }.scan(cut, null);
+    }
+}
--- a/test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java	Mon Oct 28 18:30:14 2013 -0400
@@ -54,10 +54,10 @@
         IMPORTEXPECTED("import expectedFiles.*;\n"),
         REPEATABLE("\n@Repeatable(FooContainer.class)\n"),
         CONTAINER("@interface FooContainer {\n" + "  Foo[] value();\n}\n"),
-        BASE("@interface Foo {}\n"),
-        BASEANNO("@Foo"),
-        LEGACYCONTAINER("@FooContainer(value = {@Foo, @Foo})\n"),
-        REPEATABLEANNO("\n@Foo() @Foo()"),
+        BASE("@interface Foo {int value() default Integer.MAX_VALUE;}\n"),
+        BASEANNO("@Foo(0)"),
+        LEGACYCONTAINER("@FooContainer(value = {@Foo(1), @Foo(2)})\n"),
+        REPEATABLEANNO("\n@Foo(1) @Foo(2)"),
         DEPRECATED("\n@Deprecated"),
         DOCUMENTED("\n@Documented"),
         INHERITED("\n@Inherited"),
--- a/test/tools/javac/annotations/repeatingAnnotations/combo/ReflectionTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/repeatingAnnotations/combo/ReflectionTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -45,6 +45,8 @@
 
 import expectedFiles.ExpectedBase;
 import expectedFiles.ExpectedContainer;
+import java.util.Iterator;
+import java.util.regex.Pattern;
 
 /*
  * Objective:
@@ -99,6 +101,7 @@
      *  Set it to true to get more debug information
      */
     static final boolean DEBUG = false;
+    static boolean CHECKORDERING;
 
     public static void main(String args[]) throws Exception {
         ReflectionTest test = new ReflectionTest();
@@ -145,6 +148,23 @@
                 if (c != null) {
                     // For the loaded class object, compare expected and actual annotation values
                     // for each of the methods under test from java.lang.reflect.AnnotatedElement
+
+
+                    // Ignoring following test cases since for now they are
+                    // failing with ordering issues.
+                    // @ignore 8025924: Several test cases in repeatingAnnotations/combo/ReflectionTest
+                    // fail with ordering issues
+                    List<String> orderingTestFailures = Arrays.asList(
+                            "SingleOnSuperContainerOnSub_Inherited_Legacy",
+                            "SingleOnSuperContainerAndSingleOnSub_Inherited_Legacy",
+                            "ContainerAndSingleOnSuperSingleOnSub_Inherited_Legacy",
+                            "SingleAnnoWithContainer",
+                            "SingleOnSuperContainerAndSingleOnSub_Inherited");
+                    if (orderingTestFailures.contains(testCase.toString())) {
+                        CHECKORDERING = false;
+                    } else
+                        CHECKORDERING = true;
+
                     checkAnnoValues(srcType, c);
                 } else {
                     error("Could not load className = " + c);
@@ -167,12 +187,12 @@
     enum TestCase {
         BasicNonRepeatable_Legacy(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"}, "
-                + "getDeclAnnoVal = \"Foo\", "
-                + "getAnnosArgs = {\"Foo\"}, "
-                + "getDeclAnnosArgs = {\"Foo\"}) ",
+                + "getAnnotationVal = \"@Foo(value=0)\", "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"}, "
+                + "getDeclAnnoVal = \"@Foo(value=0)\", "
+                + "getAnnosArgs = {\"@Foo(value=0)\"}, "
+                + "getDeclAnnosArgs = {\"@Foo(value=0)\"}) ",
         "@ExpectedContainer") {
 
             @Override
@@ -202,11 +222,11 @@
                         Sample package-info.java
                         @ExpectedBase
                         @ExpectedContainer
-                        @Foo
+                        @Foo(0)
                         package testpkg;
 
                         @Retention(RetentionPolicy.RUNTIME)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         Sample testSrc:
                         package testpkg;
@@ -229,11 +249,11 @@
                     /*
                         Sample testSrc for class
                         @Retention(RetentionPolicy.RUNTIME)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @ExpectedBase
                         @ExpectedContainer
-                        @Foo
+                        @Foo(0)
                         class A {}
                          */
                         replaceVal = expectedVals + anno;
@@ -248,11 +268,11 @@
         },
         SingleAnnoInherited_Legacy(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
-                + "getAnnotationsVals = {\"Foo\", \"ExpectedBase\", \"ExpectedContainer\"}, "
+                + "getAnnotationVal = \"@Foo(value=0)\", "
+                + "getAnnotationsVals = {\"@Foo(value=0)\", \"ExpectedBase\", \"ExpectedContainer\"}, "
                 + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
                 + "getDeclAnnoVal = \"NULL\", "
-                + "getAnnosArgs = {\"Foo\"}, "
+                + "getAnnosArgs = {\"@Foo(value=0)\"}, "
                 + "getDeclAnnosArgs = {})",
         "@ExpectedContainer") {
 
@@ -273,9 +293,9 @@
                 Sample testSrc:
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
-                @Foo
+                @Foo(0)
                 class SuperClass { }
 
                 @ExpectedBase
@@ -337,9 +357,9 @@
                 Sample test src:
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
-                @Foo
+                @Foo(0)
                 interface TestInterface { }
 
                 @ExpectedBase
@@ -375,18 +395,18 @@
         },
         AnnoOnSuperAndSubClass_Inherited_Legacy(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"}, "
+                + "getAnnotationVal = \"@Foo(value=2)\", "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=2)\"}, "
                 + // override every annotation on superClass
-                "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"}, "
+                "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=2)\"}, "
                 + // ignores inherited annotations
-                "getDeclAnnoVal = \"Foo\", " // ignores inherited
-                + "getAnnosArgs = {\"Foo\"}, "
-                + "getDeclAnnosArgs = { \"Foo\" })", // ignores inherited
+                "getDeclAnnoVal = \"@Foo(value=2)\", " // ignores inherited
+                + "getAnnosArgs = {\"@Foo(value=2)\"}, "
+                + "getDeclAnnosArgs = { \"@Foo(value=2)\" })", // ignores inherited
         "@ExpectedContainer(value=FooContainer.class, "
                 + "getAnnotationVal = \"NULL\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"}, "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=2)\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=2)\"}, "
                 + // ignores inherited annotations
                 "getDeclAnnoVal = \"NULL\", " + // ignores inherited
                 "getAnnosArgs = {}, " + "getDeclAnnosArgs = {})") { // ignores inherited
@@ -408,19 +428,19 @@
                 Sample test src
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Inherited
                 @interface FooContainer {
                 Foo[] value();
                 }
 
-                @Foo
+                @Foo(1)
                 class SuperClass { }
 
                 @ExpectedBase
                 @ExpectedContainer
-                @Foo
+                @Foo(2)
                 class SubClass extends SuperClass {}
                  */
                 // @Inherited only works for classes, no switch cases for
@@ -435,12 +455,13 @@
 
                 if (srcType == SrcType.CLASS) {
                     // Contents for SuperClass
-                    anno = Helper.ContentVars.BASEANNO.getVal();
+                    anno = "@Foo(1)";
                     replaceVal = commonStmts + "\n" + anno;
                     String superClassContents = srcType.getTemplate()
                             .replace("#CN", SUPERCLASS).replace("#REPLACE", replaceVal);
 
                     // Contents for SubClass that extends SuperClass
+                    anno = "@Foo(2)";
                     replaceVal = expectedVals + "\n" + anno;
                     String subClassContents = SrcType.CLASSEXTENDS.getTemplate()
                             .replace("#CN", className).replace("#SN", SUPERCLASS)
@@ -456,17 +477,17 @@
         BasicContainer_Legacy(
         "@ExpectedBase(value = Foo.class, "
                 + "getAnnotationVal = \"NULL\","
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnoVal = \"NULL\", " + "getAnnosArgs = {}, "
                 + "getDeclAnnosArgs = {} )",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
-                + "getDeclAnnoVal = \"FooContainer\", "
-                + "getAnnosArgs = {\"FooContainer\"}, "
-                + "getDeclAnnosArgs = {\"FooContainer\"} )") {
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnoVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"} )") {
 
             @Override
             public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
@@ -498,11 +519,11 @@
                         Sample package-info.java
                         @ExpectedBase
                         @ExpectedContainer
-                        @FooContainer(value = {@Foo, @Foo})
+                        @FooContainer(value = {@Foo(1), @Foo(2)})
                         package testpkg;
 
                         @Retention(RetentionPolicy.RUNTIME)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @interface FooContainer {
@@ -529,7 +550,7 @@
                         Sample testSrc for class:
                         @Retention(RetentionPolicy.RUNTIME)
                         @Inherited
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @Inherited
@@ -539,7 +560,7 @@
 
                         @ExpectedBase
                         @ExpectedContainer
-                        @FooContainer(value = {@Foo, @Foo})
+                        @FooContainer(value = {@Foo(1), @Foo(2)})
                         class A {}
                          */
                         replaceVal = expectedVals + anno;
@@ -554,23 +575,23 @@
         },
         SingleAndContainerOnSuper_Legacy(
         "@ExpectedBase(value = Foo.class, "
-                + "getAnnotationVal = \"Foo\","
+                + "getAnnotationVal = \"@Foo(value=0)\","
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnoVal = \"Foo\", "
-                + "getAnnosArgs = {\"Foo\"}, "
-                + "getDeclAnnosArgs = {\"Foo\"} )",
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnoVal = \"@Foo(value=0)\", "
+                + "getAnnosArgs = {\"@Foo(value=0)\"}, "
+                + "getDeclAnnosArgs = {\"@Foo(value=0)\"} )",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnoVal = \"FooContainer\", "
-                + "getAnnosArgs = {\"FooContainer\"}, "
-                + "getDeclAnnosArgs = {\"FooContainer\"} )") {
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnoVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"} )") {
 
             @Override
             public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
@@ -589,8 +610,8 @@
                         + getExpectedContainer() + "\n";
                 StringBuilder commonStmts = new StringBuilder();
 
-                anno = Helper.ContentVars.LEGACYCONTAINER.getVal()
-                        + Helper.ContentVars.BASEANNO.getVal();
+                anno = Helper.ContentVars.BASEANNO.getVal() +
+                       Helper.ContentVars.LEGACYCONTAINER.getVal();
                 commonStmts.append(Helper.ContentVars.IMPORTEXPECTED.getVal())
                         .append(Helper.ContentVars.IMPORTSTMTS.getVal())
                         .append(Helper.ContentVars.RETENTIONRUNTIME.getVal())
@@ -603,12 +624,12 @@
                         Sample package-info.java
                         @ExpectedBase
                         @ExpectedContainer
-                        @Foo
-                        @FooContainer(value = {@Foo, @Foo})
+                        @Foo(0)
+                        @FooContainer(value = {@Foo(1), @Foo(2)})
                         package testpkg;
 
                         @Retention(RetentionPolicy.RUNTIME)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @interface FooContainer {
@@ -636,7 +657,7 @@
                         Sample testSrc for class:
                         @Retention(RetentionPolicy.RUNTIME)
                         @Inherited
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @Inherited
@@ -646,8 +667,8 @@
 
                         @ExpectedBase
                         @ExpectedContainer
-                        @Foo
-                        @FooContainer(value = {@Foo, @Foo})
+                        @Foo(0)
+                        @FooContainer(value = {@Foo(1), @Foo(2)})
                         class A {}
                          */
                         replaceVal = expectedVals + anno;
@@ -664,17 +685,17 @@
         BasicContainer_Inherited_Legacy(
         "@ExpectedBase(value = Foo.class, "
                 + "getAnnotationVal = \"NULL\","
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
                 + "getDeclAnnoVal = \"NULL\", "
                 + "getAnnosArgs = {}, "
                 + "getDeclAnnosArgs = {} )",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
                 + "getDeclAnnoVal = \"NULL\", "
-                + "getAnnosArgs = {\"FooContainer\"}, "
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosArgs = {} )") {
 
             @Override
@@ -694,7 +715,7 @@
                 Sample testSrc:
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -702,7 +723,7 @@
                 Foo[] value();
                 }
 
-                @FooContainer(value = {@Foo, @Foo})
+                @FooContainer(value = {@Foo(1), @Foo(2)})
                 class SuperClass { }
 
                 @ExpectedBase
@@ -736,20 +757,20 @@
         },
         ContainerOnSuperSingleOnSub_Inherited_Legacy(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
+                + "getAnnotationVal = \"@Foo(value=0)\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"},"
-                + "getDeclAnnoVal = \"Foo\","
-                + "getAnnosArgs = {\"Foo\"},"
-                + "getDeclAnnosArgs = {\"Foo\"})",
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=0)\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
+                + "getDeclAnnoVal = \"@Foo(value=0)\","
+                + "getAnnosArgs = {\"@Foo(value=0)\"},"
+                + "getDeclAnnosArgs = {\"@Foo(value=0)\"})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"},"
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=0)\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
                 + "getDeclAnnoVal = \"NULL\","
-                + "getAnnosArgs = {\"FooContainer\"},"
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
                 + "getDeclAnnosArgs = {})") {
 
             @Override
@@ -769,7 +790,7 @@
                 Sample testSrc:
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -777,12 +798,12 @@
                 Foo[] value();
                 }
 
-                @FooContainer(value = {@Foo, @Foo})
+                @FooContainer(value = {@Foo(1), @Foo(2)})
                 class SuperClass { }
 
                 @ExpectedBase
                 @ExpectedContainer
-                @Foo
+                @Foo(0)
                 class SubClass extends SuperClass {}
                  */
                 // @Inherited only works for classes, no switch cases for
@@ -811,22 +832,24 @@
                 return files;
             }
         },
+        // @ignore 8025924: Several test cases in repeatingAnnotations/combo/ReflectionTest
+        // fail with ordering issues
         ContainerAndSingleOnSuperSingleOnSub_Inherited_Legacy(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
+                + "getAnnotationVal = \"@Foo(value=0)\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"},"
-                + "getDeclAnnoVal = \"Foo\","
-                + "getAnnosArgs = {\"Foo\"},"
-                + "getDeclAnnosArgs = {\"Foo\"})",
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=0)\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
+                + "getDeclAnnoVal = \"@Foo(value=0)\","
+                + "getAnnosArgs = {\"@Foo(value=0)\"},"
+                + "getDeclAnnosArgs = {\"@Foo(value=0)\"})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"},"
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=0)\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\"},"
                 + "getDeclAnnoVal = \"NULL\","
-                + "getAnnosArgs = {\"FooContainer\"},"
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
                 + "getDeclAnnosArgs = {})") {
 
             @Override
@@ -846,7 +869,7 @@
                 Sample testSrc:
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -854,12 +877,12 @@
                 Foo[] value();
                 }
 
-                @FooContainer(value = {@Foo, @Foo}) @Foo
+                @FooContainer(value = {@Foo(1), @Foo(2)}) @Foo(3)
                 class SuperClass { }
 
                 @ExpectedBase
                 @ExpectedContainer
-                @Foo
+                @Foo(0)
                 class SubClass extends SuperClass {}
                  */
                 // @Inherited only works for classes, no switch cases for
@@ -868,7 +891,7 @@
                 if (srcType == SrcType.CLASS) {
                     // Contents for SuperClass
                     anno = Helper.ContentVars.LEGACYCONTAINER.getVal()
-                            + Helper.ContentVars.BASEANNO.getVal();
+                            + "@Foo(3)";
                     replaceVal = commonStmts + "\n" + anno;
                     String superClassContents = srcType.getTemplate()
                             .replace("#CN", SUPERCLASS)
@@ -888,23 +911,25 @@
                 return files;
             }
         },
+        // @ignore 8025924: Several test cases in repeatingAnnotations/combo/ReflectionTest
+        // fail with ordering issues
         SingleOnSuperContainerOnSub_Inherited_Legacy(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
+                + "getAnnotationVal = \"@Foo(value=0)\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"},"
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
                 + "getDeclAnnoVal = \"NULL\","
-                + "getAnnosArgs = {\"Foo\"},"
+                + "getAnnosArgs = {\"@Foo(value=0)\"},"
                 + "getDeclAnnosArgs = {})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"},"
-                + "getDeclAnnoVal = \"FooContainer\","
-                + "getAnnosArgs = {\"FooContainer\"},"
-                + "getDeclAnnosArgs = {\"FooContainer\"})") {
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getDeclAnnoVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\","
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getDeclAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"})") {
 
             @Override
             public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
@@ -924,7 +949,7 @@
                 Sample testSrc:
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -932,12 +957,12 @@
                 Foo[] value();
                 }
 
-                @Foo
+                @Foo(0)
                 class SuperClass { }
 
                 @ExpectedBase
                 @ExpectedContainer
-                @FooContainer(value = {@Foo, @Foo})
+                @FooContainer(value = {@Foo(1), @Foo(2)})
                 class SubClass extends SuperClass {}
                  */
 
@@ -963,25 +988,27 @@
                 return files;
             }
         },
+        // @ignore 8025924: Several test cases in repeatingAnnotations/combo/ReflectionTest
+        // fail with ordering issues
         SingleOnSuperContainerAndSingleOnSub_Inherited_Legacy(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
+                + "getAnnotationVal = \"@Foo(value=3)\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=3)\"}, "
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"},"
-                + "getDeclAnnoVal = \"Foo\","
-                + "getAnnosArgs = {\"Foo\"},"
-                + "getDeclAnnosArgs = {\"Foo\"})",
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=3)\"},"
+                + "getDeclAnnoVal = \"@Foo(value=3)\","
+                + "getAnnosArgs = {\"@Foo(value=3)\"},"
+                + "getDeclAnnosArgs = {\"@Foo(value=3)\"})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=3)\"}, "
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"},"
-                + "getDeclAnnoVal = \"FooContainer\","
-                + "getAnnosArgs = {\"FooContainer\"},"
-                + "getDeclAnnosArgs = {\"FooContainer\"})") {
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=3)\"},"
+                + "getDeclAnnoVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\","
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getDeclAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"})") {
 
             @Override
             public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
@@ -1001,7 +1028,7 @@
                 Sample testSrc:
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -1009,12 +1036,12 @@
                 Foo[] value();
                 }
 
-                @Foo
+                @Foo(0)
                 class SuperClass { }
 
                 @ExpectedBase
                 @ExpectedContainer
-                @FooContainer(value = {@Foo, @Foo}) @Foo
+                @FooContainer(value = {@Foo(1), @Foo(2)}) @Foo(3)
                 class SubClass extends SuperClass {}
                  */
 
@@ -1028,7 +1055,7 @@
 
                     //Contents for SubClass that extends SuperClass
                     anno = Helper.ContentVars.LEGACYCONTAINER.getVal()
-                            + Helper.ContentVars.BASEANNO.getVal();
+                            + "@Foo(3)";
                     replaceVal = expectedVals + "\n" + anno;
                     String subClassContents = SrcType.CLASSEXTENDS.getTemplate()
                             .replace("#CN", className).replace("#SN", SUPERCLASS)
@@ -1044,18 +1071,18 @@
         BasicRepeatable(
         "@ExpectedBase(value=Foo.class, "
                 + "getAnnotationVal = \"NULL\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\" }, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"},"
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\" }, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
                 + "getDeclAnnoVal = \"NULL\","
-                + "getAnnosArgs = {\"Foo\", \"Foo\"},"
-                + "getDeclAnnosArgs = {\"Foo\", \"Foo\"})",
+                + "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"},"
+                + "getDeclAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\","
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"},"
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
-                + "getDeclAnnoVal = \"FooContainer\","
-                + "getAnnosArgs = {\"FooContainer\"},"
-                + "getDeclAnnosArgs = {\"FooContainer\"} )") {
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\","
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnoVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\","
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getDeclAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"} )") {
 
             @Override
             public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
@@ -1088,12 +1115,12 @@
                         Sample package-info.java
                         @ExpectedBase
                         @ExpectedContainer
-                        @Foo() @Foo()
+                        @Foo(1) @Foo(2)
                         package testpkg;
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @Repeatable(FooContainer.class)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @interface FooContainer {
@@ -1120,7 +1147,7 @@
                         Sample testSrc for class:
                         @Retention(RetentionPolicy.RUNTIME)
                         @Repeatable(FooContainer.class)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @interface FooContainer {
@@ -1129,7 +1156,7 @@
 
                         @ExpectedBase
                         @ExpectedContainer
-                        @Foo @Foo
+                        @Foo(1) @Foo(2)
                         class A { }
                          */
                         replaceVal = expectedVals + anno;
@@ -1146,21 +1173,21 @@
         "@ExpectedBase(value=Foo.class, "
                 + "getAnnotationVal = \"NULL\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"},"
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
                 + "getDeclAnnoVal = \"NULL\","
-                + "getAnnosArgs = {\"Foo\", \"Foo\"},"
-                + "getDeclAnnosArgs = {\"Foo\", \"Foo\"})",
+                + "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"},"
+                + "getDeclAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\","
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\","
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"},"
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
-                + "getDeclAnnoVal = \"FooContainer\","
-                + "getAnnosArgs = {\"FooContainer\"},"
-                + "getDeclAnnosArgs = {\"FooContainer\"} )") {
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnoVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\","
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getDeclAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"} )") {
 
             @Override
             public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
@@ -1193,12 +1220,12 @@
                         Sample package-info.java
                         @ExpectedBase
                         @ExpectedContainer
-                        @FooContainer(value = {@Foo, @Foo})
+                        @FooContainer(value = {@Foo(1), @Foo(2)})
                         package testpkg;
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @Repeatable(FooContainer.class)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @interface FooContainer {
@@ -1225,7 +1252,7 @@
                         Sample testSrc for class:
                         @Retention(RetentionPolicy.RUNTIME)
                         @Repeatable(FooContainer.class)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @interface FooContainer {
@@ -1234,7 +1261,7 @@
 
                         @ExpectedBase
                         @ExpectedContainer
-                        @FooContainer(value = {@Foo, @Foo})
+                        @FooContainer(value = {@Foo(1), @Foo(2)})
                         class A { }
                          */
                         replaceVal = expectedVals + anno;
@@ -1250,17 +1277,17 @@
         BasicContainerRepeatable_Inherited(
         "@ExpectedBase(value=Foo.class, "
                 + "getAnnotationVal = \"NULL\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
                 + "getDeclAnnoVal = \"NULL\", "
-                + "getAnnosArgs = {\"Foo\", \"Foo\"}, "
+                + "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"}, "
                 + "getDeclAnnosArgs = {})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = { \"ExpectedBase\", \"ExpectedContainer\"}, "
                 + "getDeclAnnoVal = \"NULL\", "
-                + "getAnnosArgs = {\"FooContainer\"}, "
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosArgs = {})") {
 
             @Override
@@ -1280,7 +1307,7 @@
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
                 @Repeatable(FooContainer.class)
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -1288,7 +1315,7 @@
                 Foo[] value();
                 }
 
-                @FooContainer(value = {@Foo, @Foo})
+                @FooContainer(value = {@Foo(1), @Foo(2)})
                 class SuperClass { }
 
                 @ExpectedBase
@@ -1323,21 +1350,21 @@
         RepeatableAnnoInherited(
         "@ExpectedBase(value=Foo.class, "
                 + "getAnnotationVal = \"NULL\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\"}, "
                 + // ignores inherited annotations
                 "getDeclAnnoVal = \"NULL\", "
                 + // ignores inherited
-                "getAnnosArgs = {\"Foo\", \"Foo\"}, "
+                "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\"}, "
                 + "getDeclAnnosArgs = {})", // ignores inherited
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"FooContainer\"}, "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosVals = { \"ExpectedBase\", \"ExpectedContainer\"}, "
                 + // ignores inherited annotations
                 "getDeclAnnoVal = \"NULL\", "
                 + // ignores inherited
-                "getAnnosArgs = {\"FooContainer\"}, "
+                "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
                 + "getDeclAnnosArgs = {})") { // ignores inherited
 
             @Override
@@ -1357,7 +1384,7 @@
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
                 @Repeatable(FooContainer.class)
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -1365,7 +1392,7 @@
                 Foo[] value();
                 }
 
-                @Foo() @Foo()
+                @Foo(1) @Foo(2)
                 class SuperClass { }
 
                 @ExpectedBase
@@ -1397,25 +1424,27 @@
                 return files;
             }
         },
+        // @ignore 8025924: Several test cases in repeatingAnnotations/combo/ReflectionTest
+        // fail with ordering issues
         SingleAnnoWithContainer(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
+                + "getAnnotationVal = \"@Foo(value=0)\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"},"
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"},"
-                + "getDeclAnnoVal = \"Foo\","
-                + "getAnnosArgs = {\"Foo\", \"Foo\", \"Foo\"},"
-                + "getDeclAnnosArgs = {\"Foo\", \"Foo\",\"Foo\"})",
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getDeclAnnoVal = \"@Foo(value=0)\","
+                + "getAnnosArgs = {\"@Foo(value=0)\", \"@Foo(value=1)\", \"@Foo(value=2)\"},"
+                + "getDeclAnnosArgs = {\"@Foo(value=0)\", \"@Foo(value=1)\",\"@Foo(value=2)\"})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"},"
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
-                + "getDeclAnnoVal = \"FooContainer\","
-                + "getDeclAnnosArgs = {\"FooContainer\"},"
-                + "getAnnosArgs = {\"FooContainer\"})") {
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=0)\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"}, "
+                + "getDeclAnnoVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\","
+                + "getDeclAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"})") {
 
             @Override
             public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
@@ -1449,12 +1478,12 @@
                         Sample package-info.java
                         @ExpectedBase
                         @ExpectedContainer
-                        @Foo @FooContainer(value = {@Foo, @Foo})
+                        @Foo(0) @FooContainer(value = {@Foo(1), @Foo(2)})
                         package testpkg;
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @Repeatable(FooContainer.class)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @interface FooContainer {
@@ -1482,7 +1511,7 @@
                         @Retention(RetentionPolicy.RUNTIME)
                         @Inherited
                         @Repeatable(FooContainer.class)
-                        @interface Foo {}
+                        @interface Foo {int value() default Integer.MAX_VALUE;}
 
                         @Retention(RetentionPolicy.RUNTIME)
                         @Inherited
@@ -1492,7 +1521,7 @@
 
                         @ExpectedBase
                         @ExpectedContainer
-                        @Foo @FooContainer(value = {@Foo, @Foo})
+                        @Foo(0) @FooContainer(value = {@Foo(1), @Foo(2)})
                         class A { }
                          */
                         replaceVal = expectedVals + anno;
@@ -1508,18 +1537,18 @@
         },
         AnnoOnSuperAndSubClass_Inherited(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\" }, "
+                + "getAnnotationVal = \"@Foo(value=1)\", "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=1)\" }, "
                 + // override every annotation on superClass
-                "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"}, "
+                "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=1)\"}, "
                 + // ignores inherited annotations
-                "getDeclAnnoVal = \"Foo\", " // ignores inherited
-                + "getAnnosArgs = {\"Foo\"}, "
-                + "getDeclAnnosArgs = { \"Foo\" })", // ignores inherited
+                "getDeclAnnoVal = \"@Foo(value=1)\", " // ignores inherited
+                + "getAnnosArgs = {\"@Foo(value=1)\"}, "
+                + "getDeclAnnosArgs = { \"@Foo(value=1)\" })", // ignores inherited
         "@ExpectedContainer(value=FooContainer.class, "
                 + "getAnnotationVal = \"NULL\", "
-                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\" }, "
-                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"Foo\"}, "
+                + "getAnnotationsVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=1)\" }, "
+                + "getDeclAnnosVals = {\"ExpectedBase\", \"ExpectedContainer\", \"@Foo(value=1)\"}, "
                 + // ignores inherited annotations
                 "getDeclAnnoVal = \"NULL\", " + // ignores inherited
                 "getAnnosArgs = {}, " + "getDeclAnnosArgs = {})") {
@@ -1542,7 +1571,7 @@
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
                 @Repeatable(FooContainer.class)
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -1550,12 +1579,12 @@
                 Foo[] value();
                 }
 
-                @Foo()
+                @Foo(0)
                 class SuperClass { }
 
                 @ExpectedBase
                 @ExpectedContainer
-                @Foo
+                @Foo(1)
                 class SubClass extends SuperClass { }
                  */
                 // @Inherited only works for classes, no switch cases for
@@ -1570,7 +1599,7 @@
                             .replace("#REPLACE", replaceVal);
 
                     // Contents for SubClass that extends SuperClass
-                    replaceVal = expectedVals + "\n" + anno;
+                    replaceVal = expectedVals + "\n" + "@Foo(1)";
                     String subClassContents = SrcType.CLASSEXTENDS.getTemplate()
                             .replace("#CN", className)
                             .replace("#SN", SUPERCLASS)
@@ -1623,7 +1652,7 @@
 //                 @Retention(RetentionPolicy.RUNTIME)
 //                 @Inherited
 //                 @Repeatable(FooContainer.class)
-//                 @interface Foo {}
+//                 @interface Foo {int value() default Integer.MAX_VALUE;}
 
 //                 @Retention(RetentionPolicy.RUNTIME)
 //                 @Inherited
@@ -1650,7 +1679,7 @@
 //                             .replace("#REPLACE", replaceVal);
 
 //                     //Contents for SubClass that extends SuperClass
-//                     anno = Helper.ContentVars.BASEANNO.getVal();
+//                     anno = "@Foo(0)";
 //                     replaceVal = expectedVals + "\n" + anno;
 //                     String subClassContents = SrcType.CLASSEXTENDS.getTemplate()
 //                             .replace("#CN", className)
@@ -1703,7 +1732,7 @@
 //                 @Retention(RetentionPolicy.RUNTIME)
 //                 @Inherited
 //                 @Repeatable(FooContainer.class)
-//                 @interface Foo {}
+//                 @interface Foo {int value() default Integer.MAX_VALUE;}
 
 //                 @Retention(RetentionPolicy.RUNTIME)
 //                 @Inherited
@@ -1723,7 +1752,7 @@
 //                 //@Inherited only works for classes, no switch cases for method, field, package
 //                 if (srcType == SrcType.CLASS) {
 //                     //Contents for SuperClass
-//                     anno = Helper.ContentVars.BASEANNO.getVal();
+//                     anno = "@Foo(0)";
 //                     replaceVal = commonStmts + "\n" + anno;
 //                     String superClassContents = srcType.getTemplate()
 //                             .replace("#CN", SUPERCLASS)
@@ -1781,7 +1810,7 @@
 //                 @Retention(RetentionPolicy.RUNTIME)
 //                 @Inherited
 //                 @Repeatable(FooContainer.class)
-//                 @interface Foo {}
+//                 @interface Foo {int value() default Integer.MAX_VALUE;}
 
 //                 @Retention(RetentionPolicy.RUNTIME)
 //                 @Inherited
@@ -1808,7 +1837,7 @@
 //                             .replace("#REPLACE", replaceVal);
 
 //                     //Contents for SubClass that extends SuperClass
-//                     anno = Helper.ContentVars.BASEANNO.getVal();
+//                     anno = "@Foo(0)";
 //                     replaceVal = expectedVals + "\n" + anno;
 //                     String subClassContents = SrcType.CLASSEXTENDS.getTemplate()
 //                             .replace("#CN", className)
@@ -1859,7 +1888,7 @@
 //                 @Retention(RetentionPolicy.RUNTIME)
 //                 @Inherited
 //                 @Repeatable(FooContainer.class)
-//                 @interface Foo {}
+//                 @interface Foo {int value() default Integer.MAX_VALUE;}
 
 //                 @Retention(RetentionPolicy.RUNTIME)
 //                 @Inherited
@@ -1879,7 +1908,7 @@
 //                 //@Inherited only works for classes, no switch cases for method, field, package
 //                 if (srcType == SrcType.CLASS) {
 //                     //Contents for SuperClass
-//                     anno = Helper.ContentVars.BASEANNO.getVal();
+//                     anno = "@Foo(0)";
 //                     replaceVal = commonStmts + "\n" + anno;
 //                     String superClassContents = srcType.getTemplate()
 //                             .replace("#CN", SUPERCLASS)
@@ -1900,25 +1929,27 @@
 //                 return files;
 //             }
 //         },
+        // @ignore 8025924: Several test cases in repeatingAnnotations/combo/ReflectionTest
+        // fail with ordering issues
         SingleOnSuperContainerAndSingleOnSub_Inherited(
         "@ExpectedBase(value=Foo.class, "
-                + "getAnnotationVal = \"Foo\", "
+                + "getAnnotationVal = \"@Foo(value=3)\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=3)\"}, "
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"},"
-                + "getDeclAnnoVal = \"Foo\","
-                + "getAnnosArgs = {\"Foo\", \"Foo\", \"Foo\"},"
-                + "getDeclAnnosArgs = {\"Foo\", \"Foo\", \"Foo\"})",
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=3)\"},"
+                + "getDeclAnnoVal = \"@Foo(value=3)\","
+                + "getAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\", \"@Foo(value=3)\"},"
+                + "getDeclAnnosArgs = {\"@Foo(value=1)\", \"@Foo(value=2)\", \"@Foo(value=3)\"})",
         "@ExpectedContainer(value=FooContainer.class, "
-                + "getAnnotationVal = \"FooContainer\", "
+                + "getAnnotationVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", "
                 + "getAnnotationsVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"}, "
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=3)\"}, "
                 + "getDeclAnnosVals = {"
-                +       "\"ExpectedBase\", \"ExpectedContainer\", \"Foo\", \"FooContainer\"},"
-                + "getDeclAnnoVal = \"FooContainer\","
-                + "getAnnosArgs = {\"FooContainer\"},"
-                + "getDeclAnnosArgs = {\"FooContainer\"})") {
+                +       "\"ExpectedBase\", \"ExpectedContainer\", \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\", \"@Foo(value=3)\"},"
+                + "getDeclAnnoVal = \"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\","
+                + "getAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"},"
+                + "getDeclAnnosArgs = {\"@FooContainer(value=[@Foo(value=1), @Foo(value=2)])\"})") {
 
             @Override
             public Iterable<? extends JavaFileObject> getTestFiles(SrcType srcType,
@@ -1936,7 +1967,7 @@
                 Sample testSrc:
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
-                @interface Foo {}
+                @interface Foo {int value() default Integer.MAX_VALUE;}
 
                 @Retention(RetentionPolicy.RUNTIME)
                 @Inherited
@@ -1945,12 +1976,12 @@
                 Foo[] value();
                 }
 
-                @Foo
+                @Foo(0)
                 class SuperClass { }
 
                 @ExpectedBase
                 @ExpectedContainer
-                @FooContainer(value = {@Foo, @Foo}) @Foo
+                @FooContainer(value = {@Foo(1), @Foo(2)}) @Foo(3)
                 class SubClass extends SuperClass {}
                  */
 
@@ -1964,7 +1995,7 @@
 
                     //Contents for SubClass that extends SuperClass
                     anno = Helper.ContentVars.LEGACYCONTAINER.getVal()
-                            + Helper.ContentVars.BASEANNO.getVal();
+                            + "@Foo(3)";
                     replaceVal = expectedVals + "\n" + anno;
                     String subClassContents = SrcType.CLASSEXTENDS.getTemplate()
                             .replace("#CN", className)
@@ -2015,7 +2046,7 @@
 //                  @Retention(RetentionPolicy.RUNTIME)
 //                  @Inherited
 //                  @Repeatable(FooContainer.class)
-//                  @interface Foo {}
+//                  @interface Foo {int value() default Integer.MAX_VALUE;}
 
 //                  @Retention(RetentionPolicy.RUNTIME)
 //                  @Inherited
@@ -2044,7 +2075,7 @@
 //                              .replace("#REPLACE", replaceVal);
 
 //                      //Contents for SubClass that extends SuperClass
-//                      anno = Helper.ContentVars.BASEANNO.getVal();
+//                      anno = "@Foo(0)";
 //                      replaceVal = expectedVals + "\n" + anno;
 //                      String subClassContents = SrcType.CLASSEXTENDS.getTemplate()
 //                              .replace("#CN", className)
@@ -2800,6 +2831,8 @@
     // should be present in actualAnno[].
     private static boolean compareAnnotations(Annotation[] actualAnnos,
             String[] expectedAnnos) {
+        boolean compOrder = false;
+
         // Length is different
         if (actualAnnos.length != expectedAnnos.length) {
             error("Length not same, Actual length = " + actualAnnos.length
@@ -2830,12 +2863,16 @@
             // Lengths are same, compare array contents
             String[] actualArr = new String[actualAnnos.length];
             for (Annotation a : actualAnnos) {
+                if (a.annotationType().getSimpleName().contains("Expected"))
                 actualArr[i++] = a.annotationType().getSimpleName();
+                 else if (a.annotationType().getName().contains(TESTPKG)) {
+                    String replaced = a.toString().replaceAll(Pattern.quote("testpkg."),"");
+                    actualArr[i++] = replaced;
+                } else
+                    actualArr[i++] = a.toString();
             }
-
-            List<String> actualList = Arrays.asList(actualArr);
-            List<String> expectedList = Arrays.asList(expectedAnnos);
-
+            List<String> actualList = new ArrayList<String>(Arrays.asList(actualArr));
+            List<String> expectedList = new ArrayList<String>(Arrays.asList(expectedAnnos));
             if (!actualList.containsAll(expectedList)) {
                 error("Array values are not same");
                 printArrContents(actualAnnos);
@@ -2843,10 +2880,63 @@
                 return false;
             } else {
                 debugPrint("Arr values are same as expected");
+                if (CHECKORDERING) {
+                    debugPrint("Checking if annotation ordering is as expected..");
+                    compOrder = compareOrdering(actualList, expectedList);
+                    if (compOrder)
+                        debugPrint("Arr values ordering is as expected");
+                    else
+                        error("Arr values ordering is not as expected! actual values: "
+                            + actualList + " expected values: " + expectedList);
+                } else
+                    compOrder = true;
             }
         }
+        return compOrder;
+    }
+
+    // Annotation ordering comparison
+    private static boolean compareOrdering(List<String> actualList, List<String> expectedList) {
+        boolean order = true;
+        // Discarding Expected* annotations before comparison of ordering
+        actualList = iterateList(actualList);
+        expectedList = iterateList(expectedList);
+        // Length is different
+        if (actualList.size() != expectedList.size()) {
+            error("Length not same, Actual list length = " + actualList.size()
+                    + " Expected list length = " + expectedList.size());
+            return false;
+        } else {
+            if (actualList.isEmpty() && expectedList.isEmpty()) {
         return true;
     }
+            boolean tmp = true;
+            for (int i = 0; i < actualList.size(); i++) {
+                // Checking ordering
+                if (order) {
+                    if (!actualList.get(i).equals(expectedList.get(i))) {
+                        tmp = false;
+                        debugPrint("Odering is false");
+                        debugPrint("actualList values: " + actualList
+                                + " expectedList values: " + expectedList);
+                    }
+                }
+            }
+            order = tmp;
+        }
+        return order;
+    }
+
+    private static List<String> iterateList(List<String> list) {
+        Iterator<String> iter = list.iterator();
+        while (iter.hasNext()) {
+            String anno = iter.next();
+            if (anno.contains("Expected")) {
+                iter.remove();
+            }
+        }
+        return list;
+    }
 
     private static void printArrContents(Annotation[] actualAnnos) {
         System.out.print("Actual Arr Values: ");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/TestAnonInnerInstance1.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2013, 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 8026286
+ * @summary This test previously forced an assertion to fail, due to
+ *          TypeAnnotationPosition visiting a tree node prior to
+ *          memberEnter.
+ * @compile TestAnonInnerInstance1.java
+ */
+
+import java.lang.annotation.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static java.lang.annotation.ElementType.*;
+import java.util.List;
+
+class TestAnonInnerInstance1<T> {
+    Object mtest(TestAnonInnerInstance1<T> t){ return null; }
+    Object mmtest(TestAnonInnerInstance1<T> t){ return null; }
+
+    public void test() {
+
+        mtest(new TestAnonInnerInstance1<T>() {
+                  class InnerAnon<U> { // Test1$1$InnerAnon.class
+                      @A @B @C @D String ia_m1(){ return null; };
+                  }
+    //If this is commented out, annotations are attributed correctly
+                  InnerAnon<String> IA = new InnerAnon< String>();
+              });
+   }
+}
+
+@Retention(RUNTIME) @Target({TYPE_USE,FIELD}) @interface A { }
+@Retention(RUNTIME) @Target({TYPE_USE,METHOD}) @interface B { }
+@Retention(CLASS) @Target({TYPE_USE,FIELD}) @interface C { }
+@Retention(CLASS) @Target({TYPE_USE,METHOD}) @interface D { }
--- a/test/tools/javac/annotations/typeAnnotations/classfile/ClassfileTestHelper.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/classfile/ClassfileTestHelper.java	Mon Oct 28 18:30:14 2013 -0400
@@ -36,7 +36,8 @@
 
     //Makes debugging much easier. Set to 'false' for less output.
     public Boolean verbose = true;
-    void println(String msg) { if(verbose) System.out.println(msg); }
+    void println(String msg) { if (verbose) System.out.println(msg); }
+    void print(String msg) { if (verbose) System.out.print(msg); }
 
     File writeTestFile(String fname, String source) throws IOException {
       File f = new File(fname);
@@ -183,6 +184,13 @@
                         (RuntimeTypeAnnotations_attribute)attr;
                 println(testtype + ": " + name + ", " + annName + ": " +
                         tAttr.annotations.length );
+                if (tAttr.annotations.length > 0) {
+                    for (int i = 0; i < tAttr.annotations.length; i++) {
+                        println("  types:" + tAttr.annotations[i].position.type);
+                    }
+                } else {
+                    println("");
+                }
                 allt += tAttr.annotations.length;
                 if (visible)
                     tvisibles += tAttr.annotations.length;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/classfile/Scopes.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.annotation.*;
+import java.io.*;
+import java.net.URL;
+import java.util.List;
+
+import com.sun.tools.classfile.*;
+
+/*
+ * @test
+ * @bug 6843077 8006775
+ * @summary Qualified inner type annotation accessible to the class.
+ */
+
+@Scopes.UniqueInner
+public class Scopes<T extends @Scopes.UniqueInner Object> extends ClassfileTestHelper{
+    public static void main(String[] args) throws Exception {
+        new Scopes().run();
+    }
+
+    public void run() throws Exception {
+        expected_tinvisibles = 1;
+        expected_invisibles = 1;
+
+        ClassFile cf = getClassFile("Scopes.class");
+        test(cf);
+
+        countAnnotations();
+
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+        System.out.println("PASSED");
+    }
+
+    @Target({ElementType.TYPE_USE})
+    @interface UniqueInner { };
+}
--- a/test/tools/javac/annotations/typeAnnotations/classfile/T8008762.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/classfile/T8008762.java	Mon Oct 28 18:30:14 2013 -0400
@@ -24,7 +24,6 @@
 /*
  * @test
  * @bug 8008762
- * @ignore 8013409: test failures for type annotations
  * @summary Type annotation on inner class in anonymous class
  *          shows up as regular annotation
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) 2013 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 8005085 8008762 8008751 8013065 8015323 8015257
+ * @summary Type annotations on anonymous and inner class.
+ *  Six TYPE_USE annotations are repeated(or not); Four combinations create
+ *  four test files, and each results in the test class and 2 anonymous classes.
+ *  Each element of these three classes is checked for expected number of the
+ *  four annotation Attributes. Expected annotation counts depend on type of
+ *  annotation place on type of element (a FIELD&TYPE_USE element on a field
+ *  results in 2). Elements with no annotations expect 0.
+ *  Source template is read in from testanoninner.template
+ *
+ */
+import java.lang.annotation.*;
+import java.io.*;
+import java.util.List;
+import java.util.LinkedList;
+import com.sun.tools.classfile.*;
+import java.nio.file.Files;
+import java.nio.charset.*;
+import java.io.File;
+import java.io.IOException;
+
+
+import java.lang.annotation.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static java.lang.annotation.ElementType.*;
+
+/*
+ * A source template is read in and testname and annotations are inserted
+ * via replace().
+ */
+public class TestAnonInnerClasses extends ClassfileTestHelper {
+    // tally errors and test cases
+    int errors = 0;
+    int checks = 0;
+    //Note expected test count in case of skips due to bugs.
+    int tc = 0, xtc = 180; // 45 x 4 variations of repeated annotations.
+    File testSrc = new File(System.getProperty("test.src"));
+
+    String[] AnnoAttributes = {
+        Attribute.RuntimeVisibleTypeAnnotations,
+        Attribute.RuntimeInvisibleTypeAnnotations,
+        Attribute.RuntimeVisibleAnnotations,
+        Attribute.RuntimeInvisibleAnnotations
+    };
+
+    // template for source files
+    String srcTemplate = "testanoninner.template";
+
+    // Four test files generated based on combinations of repeating annotations.
+    Boolean As= false, Bs=true, Cs=false, Ds=false, TAs=false,TBs=false;
+    Boolean[][] bRepeat = new Boolean[][]{
+                 /* no repeats    */ {false, false, false, false, false, false},
+                 /* repeat A,C,TA */ {true,  false, true,  false, true,  false},
+                 /* repeat B,D,TB */ {false, true,  false, true,  false, true},
+                 /* repeat all    */ {true,  true,  true,  true,  true,  true}
+    };
+    // Save descriptions of failed test case; does not terminate upon a failure.
+    List<String> failed = new LinkedList<>();
+
+    public static void main(String[] args) throws Exception {
+        new TestAnonInnerClasses().run();
+    }
+
+    // Check annotation counts and make reports sufficiently descriptive to
+    // easily diagnose.
+    void check(String testcase, int vtaX, int itaX, int vaX, int iaX,
+                                int vtaA, int itaA, int vaA, int iaA) {
+
+        String descr = " checking " + testcase+" _TYPE_, expected: " +
+            vtaX + ", " + itaX + ", " + vaX + ", " + iaX + "; actual: " +
+            vtaA + ", " + itaA + ", " + vaA + ", " + iaA;
+        String description;
+        description=descr.replace("_TYPE_","RuntimeVisibleTypeAnnotations");
+        if (vtaX != vtaA) {
+            errors++;
+            failed.add(++checks + " " + testcase + ": (vtaX) " + vtaX +
+                       " != " + vtaA + " (vtaA)");
+            println(checks + " FAIL: " + description);
+        } else {
+            println(++checks + " PASS: " + description);
+        }
+        description=descr.replace("_TYPE_","RuntimeInvisibleTypeAnnotations");
+        if (itaX != itaA) {
+            errors++;
+            failed.add(++checks + " " + testcase + ": (itaX) " + itaX + " != " +
+                       itaA + " (itaA)");
+            println(checks + " FAIL: " + description);
+        } else {
+            println(++checks + " PASS: " + description);
+        }
+        description=descr.replace("_TYPE_","RuntimeVisibleAnnotations");
+        if (vaX != vaA) {
+            errors++;
+            failed.add(++checks + " " + testcase + ": (vaX) " + vaX + " != " +
+                       vaA + " (vaA)");
+            println(checks + " FAIL: " + description);
+        } else {
+            println(++checks + " PASS: " + description);
+        }
+        description=descr.replace("_TYPE_","RuntimeInvisibleAnnotations");
+        if (iaX != iaA) {
+            errors++;
+            failed.add(++checks + " " + testcase + ": (iaX) " + iaX + " != " +
+                       iaA + " (iaA)");
+            println(checks + " FAIL: " + description);
+        } else {
+            println(++checks + " PASS: " + description);
+        }
+        println("");
+    }
+
+    // Print failed cases (if any) and throw exception for fail.
+    void report() {
+        if (errors!=0) {
+            System.err.println("Failed tests: " + errors +
+                               "\nfailed test cases:\n");
+            for (String t: failed) System.err.println("  " + t);
+            throw new RuntimeException("FAIL: There were test failures.");
+        } else
+            System.out.println("PASSED all tests.");
+    }
+
+    void test(String ttype, ClassFile cf, Method m, Field f, boolean visible) {
+        int vtaActual = 0,
+            itaActual = 0,
+            vaActual = 0,
+            iaActual = 0,
+            vtaExp = 0,
+            itaExp = 0,
+            vaExp = 0,
+            iaExp = 0,
+            index = 0,
+            index2 = 0;
+        String memberName = null,
+            testcase = "undefined",
+            testClassName = null;
+        Attribute attr = null,
+            cattr = null;
+        Code_attribute CAttr = null;
+        // Get counts of 4 annotation Attributes on element being checked.
+        for (String AnnoType : AnnoAttributes) {
+            try {
+                switch (ttype) {
+                    case "METHOD":
+                        index = m.attributes.getIndex(cf.constant_pool,
+                                                      AnnoType);
+                        memberName = m.getName(cf.constant_pool);
+                        if (index != -1)
+                            attr = m.attributes.get(index);
+                        //fetch index annotations from code attribute.
+                        index2 = m.attributes.getIndex(cf.constant_pool,
+                                                       Attribute.Code);
+                        if (index2 != -1) {
+                            cattr = m.attributes.get(index2);
+                            assert cattr instanceof Code_attribute;
+                            CAttr = (Code_attribute)cattr;
+                            index2 = CAttr.attributes.getIndex(cf.constant_pool,
+                                                               AnnoType);
+                            if (index2 != -1)
+                                cattr = CAttr.attributes.get(index2);
+                        }
+                        break;
+                    case "FIELD":
+                        index = f.attributes.getIndex(cf.constant_pool,
+                                                      AnnoType);
+                        memberName = f.getName(cf.constant_pool);
+                        if (index != -1)
+                            attr = f.attributes.get(index);
+                        //fetch index annotations from code attribute.
+                        index2 = cf.attributes.getIndex(cf.constant_pool,
+                                                        Attribute.Code);
+                        if (index2!= -1) {
+                            cattr = cf.attributes.get(index2);
+                            assert cattr instanceof Code_attribute;
+                            CAttr = (Code_attribute)cattr;
+                            index2 = CAttr.attributes.getIndex(cf.constant_pool,
+                                                               AnnoType);
+                            if (index2!= -1)
+                                cattr = CAttr.attributes.get(index2);
+                        }
+                        break;
+
+                    default:
+                        memberName = cf.getName();
+                        index = cf.attributes.getIndex(cf.constant_pool,
+                                                       AnnoType);
+                        if (index!= -1) attr = cf.attributes.get(index);
+                        break;
+                }
+            }
+            catch (ConstantPoolException cpe) { cpe.printStackTrace(); }
+            try {
+                testClassName=cf.getName();
+                testcase = ttype + ": " + testClassName + ": " +
+                           memberName + ", ";
+            }
+            catch (ConstantPoolException cpe) { cpe.printStackTrace(); }
+            if (index != -1) {
+                switch (AnnoType) {
+                    case Attribute.RuntimeVisibleTypeAnnotations:
+                        //count RuntimeVisibleTypeAnnotations
+                        RuntimeVisibleTypeAnnotations_attribute RVTAa =
+                                (RuntimeVisibleTypeAnnotations_attribute)attr;
+                        vtaActual += RVTAa.annotations.length;
+                        break;
+                    case Attribute.RuntimeVisibleAnnotations:
+                        //count RuntimeVisibleAnnotations
+                        RuntimeVisibleAnnotations_attribute RVAa =
+                                (RuntimeVisibleAnnotations_attribute)attr;
+                        vaActual += RVAa.annotations.length;
+                        break;
+                    case Attribute.RuntimeInvisibleTypeAnnotations:
+                        //count RuntimeInvisibleTypeAnnotations
+                        RuntimeInvisibleTypeAnnotations_attribute RITAa =
+                                (RuntimeInvisibleTypeAnnotations_attribute)attr;
+                        itaActual += RITAa.annotations.length;
+                        break;
+                    case Attribute.RuntimeInvisibleAnnotations:
+                        //count RuntimeInvisibleAnnotations
+                        RuntimeInvisibleAnnotations_attribute RIAa =
+                                (RuntimeInvisibleAnnotations_attribute)attr;
+                        iaActual += RIAa.annotations.length;
+                        break;
+                }
+            }
+            // annotations from code attribute.
+            if (index2 != -1) {
+                switch (AnnoType) {
+                    case Attribute.RuntimeVisibleTypeAnnotations:
+                        //count RuntimeVisibleTypeAnnotations
+                        RuntimeVisibleTypeAnnotations_attribute RVTAa =
+                                (RuntimeVisibleTypeAnnotations_attribute)cattr;
+                        vtaActual += RVTAa.annotations.length;
+                        break;
+                    case Attribute.RuntimeVisibleAnnotations:
+                        //count RuntimeVisibleAnnotations
+                        RuntimeVisibleAnnotations_attribute RVAa =
+                                (RuntimeVisibleAnnotations_attribute)cattr;
+                        vaActual += RVAa.annotations.length;
+                        break;
+                    case Attribute.RuntimeInvisibleTypeAnnotations:
+                        //count RuntimeInvisibleTypeAnnotations
+                        RuntimeInvisibleTypeAnnotations_attribute RITAa =
+                                (RuntimeInvisibleTypeAnnotations_attribute)cattr;
+                        itaActual += RITAa.annotations.length;
+                        break;
+                    case Attribute.RuntimeInvisibleAnnotations:
+                        //count RuntimeInvisibleAnnotations
+                        RuntimeInvisibleAnnotations_attribute RIAa =
+                                (RuntimeInvisibleAnnotations_attribute)cattr;
+                        iaActual += RIAa.annotations.length;
+                        break;
+                }
+            }
+        }
+
+        switch (memberName) {
+            //METHODs
+            case "test" : vtaExp=4;  itaExp=4;  vaExp=0; iaExp=0; tc++; break;
+            case "mtest": vtaExp=4;  itaExp=4;  vaExp=1; iaExp=1; tc++; break;
+            case "m1":    vtaExp=2;  itaExp=2;  vaExp=1; iaExp=1; tc++; break;
+            case "m2":    vtaExp=4;  itaExp=4;  vaExp=1; iaExp=1; tc++; break;
+            case "m3":    vtaExp=10; itaExp=10; vaExp=1; iaExp=1; tc++; break;
+            case "tm":    vtaExp=6;  itaExp=6;  vaExp=1; iaExp=1; tc++; break;
+            //inner class
+            case "i_m1":  vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "i_m2":  vtaExp=4;  itaExp=4; vaExp=1; iaExp=1; tc++; break;
+            case "i_um":  vtaExp=6;  itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            //local class
+            case "l_m1":  vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "l_m2":  vtaExp=4;  itaExp=4; vaExp=1; iaExp=1; tc++; break;
+            case "l_um":  vtaExp=6;  itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            //anon class
+            case "mm_m1": vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "mm_m2": vtaExp=4;  itaExp=4; vaExp=1; iaExp=1; tc++; break;
+            case "mm_m3": vtaExp=10; itaExp=10;vaExp=1; iaExp=1; tc++; break;
+            case "mm_tm": vtaExp=6;  itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            //InnerAnon class
+            case "ia_m1": vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "ia_m2": vtaExp=4;  itaExp=4; vaExp=1; iaExp=1; tc++; break;
+            case "ia_um": vtaExp=6;  itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            //FIELDs
+            case "data":   vtaExp = 2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "odata1": vtaExp = 2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "pdata1": vtaExp = 2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "tdata":  vtaExp = 2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "sa1":    vtaExp = 6;  itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            //inner class
+            case "i_odata1":  vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "i_pdata1":  vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "i_udata":   vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "i_sa1":     vtaExp=6;  itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            case "i_tdata":   vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            //local class
+            case "l_odata1":  vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "l_pdata1":  vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "l_udata":   vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "l_sa1":     vtaExp=6;  itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            case "l_tdata":   vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            //anon class
+            case "mm_odata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "mm_pdata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "mm_sa1":    vtaExp = 6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            case "mm_tdata":  vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            // InnerAnon class
+            case "ia_odata1": vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "ia_pdata1": vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "ia_udata":  vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "ia_sa1":    vtaExp=6;  itaExp=6; vaExp=1; iaExp=1; tc++; break;
+            case "ia_tdata":  vtaExp=2;  itaExp=2; vaExp=1; iaExp=1; tc++; break;
+            case "IA":        vtaExp=4;  itaExp=4; vaExp=1; iaExp=1; tc++; break;
+            case "IN":        vtaExp=4;  itaExp=4; vaExp=1; iaExp=1; tc++; break;
+            // default cases are <init>, this$0, this$1, mmtest, atest
+            default:          vtaExp = 0;  itaExp=0; vaExp=0; iaExp=0;    break;
+        }
+        check(testcase,vtaExp,   itaExp,   vaExp,   iaExp,
+                       vtaActual,itaActual,vaActual,iaActual);
+    }
+
+    public void run() {
+        ClassFile cf   = null;
+        InputStream in = null;
+        int testcount  = 1;
+        File testFile  = null;
+        // Generate source, check methods and fields for each combination.
+        for (Boolean[] bCombo : bRepeat) {
+            As=bCombo[0]; Bs=bCombo[1]; Cs=bCombo[2];
+            Ds=bCombo[3]; TAs=bCombo[4]; TBs=bCombo[5];
+            String testname = "Test" + testcount++;
+            println("Combinations: " + As + ", " + Bs + ", " + Cs + ", " + Ds +
+                    ", " + TAs + ", " + TBs +
+                    "; see " + testname + ".java");
+            String[] classes = {testname + ".class",
+                                testname + "$Inner.class",
+                                testname + "$1Local1.class",
+                                testname + "$1.class",
+                                testname + "$1$1.class",
+                                testname + "$1$InnerAnon.class"
+            };
+            // Create test source, create and compile File.
+            String sourceString = getSource(srcTemplate, testname,
+                                            As, Bs, Cs, Ds, TAs, TBs);
+            System.out.println(sourceString);
+            try {
+                testFile = writeTestFile(testname+".java", sourceString);
+            }
+            catch (IOException ioe) { ioe.printStackTrace(); }
+            // Compile test source and read classfile.
+            File classFile = null;
+            try {
+                classFile = compile(testFile);
+            }
+            catch (Error err) {
+                System.err.println("FAILED compile. Source:\n" + sourceString);
+                throw err;
+            }
+            String testloc = classFile.getAbsolutePath().substring(
+                   0,classFile.getAbsolutePath().indexOf(classFile.getPath()));
+            for (String clazz : classes) {
+                try {
+                    cf = ClassFile.read(new File(testloc+clazz));
+                }
+                catch (Exception e) { e.printStackTrace();  }
+                // Test for all methods and fields
+                for (Method m: cf.methods) {
+                    test("METHOD", cf, m, null, true);
+                }
+                for (Field f: cf.fields) {
+                    test("FIELD", cf, null, f, true);
+                }
+            }
+        }
+        report();
+        if (tc!=xtc) System.out.println("Test Count: " + tc + " != " +
+                                       "expected: " + xtc);
+    }
+
+
+    String getSrcTemplate(String sTemplate) {
+        List<String> tmpl = null;
+        String sTmpl = "";
+        try {
+            tmpl = Files.readAllLines(new File(testSrc,sTemplate).toPath(),
+                                      Charset.defaultCharset());
+        }
+        catch (IOException ioe) {
+            String error = "FAILED: Test failed to read template" + sTemplate;
+            ioe.printStackTrace();
+            throw new RuntimeException(error);
+        }
+        for (String l : tmpl)
+            sTmpl=sTmpl.concat(l).concat("\n");
+        return sTmpl;
+    }
+
+    // test class template
+    String getSource(String templateName, String testname,
+                     Boolean Arepeats,  Boolean Brepeats,
+                     Boolean Crepeats,  Boolean Drepeats,
+                     Boolean TArepeats, Boolean TBrepeats) {
+        String As  = Arepeats  ? "@A @A":"@A",
+               Bs  = Brepeats  ? "@B @B":"@B",
+               Cs  = Crepeats  ? "@C @C":"@C",
+               Ds  = Drepeats  ? "@D @D":"@D",
+               TAs = TArepeats ? "@TA @TA":"@TA",
+               TBs = TBrepeats ? "@TB @TB":"@TB";
+
+        // split up replace() lines for readability
+        String testsource = getSrcTemplate(templateName).replace("testname",testname);
+        testsource = testsource.replace("_As",As).replace("_Bs",Bs).replace("_Cs",Cs);
+        testsource = testsource.replace("_Ds",Ds).replace("_TAs",TAs).replace("_TBs",TBs);
+        return testsource;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/classfile/testanoninner.template	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,108 @@
+import java.lang.annotation.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static java.lang.annotation.ElementType.*;
+import java.util.List;
+
+class testname <T> {                 // TestN.class
+    _As _Bs _Cs _Ds String data = "test";
+    _As _Bs _Cs _Ds Object mtest( _As _Bs _Cs _Ds testname <T> t){ return null;  }
+    Object mmtest( testname<T> t){ return null;  }
+
+    class Inner<U> {        // TestN$1$Inner.class
+         _As _Bs _Cs _Ds String i_odata1 = "test";
+         _As _Bs _Cs _Ds int    i_pdata1 = 0;
+         _As _Bs _Cs _Ds U      i_udata = null;
+//8015257
+         _As _Bs _Cs _Ds Object  _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds [] i_sa1 = null;
+         _As _Bs _Cs _Ds  T    i_tdata = null;
+         _As _Bs _Cs _Ds String i_m1(){ return null; };
+         _As _Bs _Cs _Ds int    i_m2( _As _Bs _Cs _Ds Object o){return 0;}
+         _As _Bs _Cs _Ds
+        <_TAs _TBs _Cs _Ds U> Object i_um( _As _Bs _Cs _Ds  U u) { return null; }
+    }
+//8015323
+    _As _Bs _Cs _Ds Inner< _As _Bs _Cs _Ds String> IN = new  Inner< String>();
+
+    public void test() {
+ 
+        class Local1<U> {                   // TestN$Local1.class
+            _As _Bs _Cs _Ds  String l_odata1 = "test";
+            _As _Bs _Cs _Ds  int    l_pdata1 = 0;
+            _As _Bs _Cs _Ds  U      l_udata = null;
+//8015257
+            _As _Bs _Cs _Ds  Object _As _Bs _Cs _Ds  []_As _Bs _Cs _Ds  [] l_sa1 = null;
+            _TAs _TBs _Cs _Ds  T    l_tdata = null;
+            _As _Bs _Cs _Ds  String l_m1(){ return null; };
+            _As _Bs _Cs _Ds  int    l_m2(_As _Bs _Cs _Ds  Object o){return 0;}
+            _As _Bs _Cs _Ds 
+            <_TAs _TBs _Cs _Ds  U> Object l_um(_As _Bs _Cs _Ds   U u) { return null; }
+        }
+        // The below, as a local variable, will show up on test()
+       _As _Bs _Cs _Ds  Local1<_As _Bs _Cs _Ds  String> LC = new Local1<String>();
+ 
+        mtest( new testname<T>() {  // TestN$1
+                class InnerAnon<U> {        // TestN$1$InnerAnon.class
+                    _As _Bs _Cs _Ds  String ia_odata1 = "test";
+                    _As _Bs _Cs _Ds  int    ia_pdata1 = 0;
+                    _As _Bs _Cs _Ds  U      ia_udata = null;
+//8015257
+                    _As _Bs _Cs _Ds  Object _As _Bs _Cs _Ds  []_As _Bs _Cs _Ds  [] ia_sa1 = null;
+                    _TAs _TBs _Cs _Ds  T    ia_tdata = null;
+                    _As _Bs _Cs _Ds  String ia_m1(){ return null; };
+                    _As _Bs _Cs _Ds  int    ia_m2(_As _Bs _Cs _Ds  Object o){return 0;}
+                    _As _Bs _Cs _Ds 
+                    <_TAs _TBs _Cs _Ds  U> Object ia_um(_As _Bs _Cs _Ds   U u) { return null; }
+                }
+//8015257
+                _As _Bs _Cs _Ds  InnerAnon<_As _Bs _Cs _Ds  String> IA = new InnerAnon< String>();
+
+                _As _Bs _Cs _Ds String odata1 = "test";
+                _As _Bs _Cs _Ds int    pdata1 = 0;
+//8015257
+                _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa1 = null;
+                _As _Bs _Cs _Ds T tdata = null;
+
+                _As _Bs _Cs _Ds String m1(){ return null; };
+                _As _Bs _Cs _Ds int    m2(_As _Bs _Cs _Ds Object o){return 0;}
+
+                _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds []
+                m3(String _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa){ return null; }
+
+                _As _Bs _Cs _Ds
+                <_TAs _TBs _Cs _Ds T> Object tm(_As _Bs _Cs _Ds  T t) { return null; }
+
+                public void atest( testname<T> t){
+                    t.mmtest( new testname<T>() {   // TestN$1$1.class 
+                        _As _Bs _Cs _Ds String mm_odata1 = "test";
+                        _As _Bs _Cs _Ds int    mm_pdata1 = 0;
+//8015257
+                        _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] mm_sa1 = null;
+                        _TAs _TBs _Cs _Ds T mm_tdata = null;
+
+                        _As _Bs _Cs _Ds String mm_m1(){ return null; };
+                        _As _Bs _Cs _Ds int    mm_m2(_As _Bs _Cs _Ds Object o){return 0;}
+
+                        _As _Bs _Cs _Ds String _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds []
+                        mm_m3(String _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa){ return null; }
+
+                        _As _Bs _Cs _Ds
+                        <_TAs _TBs _Cs _Ds T> Object mm_tm(_As _Bs _Cs _Ds  T t) { return null; }
+                    });
+                }
+           });
+   }
+}
+@Retention(RUNTIME) @Target({TYPE_USE,FIELD})  @Repeatable( AC.class ) @interface A { }
+@Retention(RUNTIME) @Target({TYPE_USE,METHOD}) @Repeatable( BC.class ) @interface B { }
+@Retention(RUNTIME) @Target({TYPE_USE,FIELD})  @interface AC { A[] value(); }
+@Retention(RUNTIME) @Target({TYPE_USE,METHOD}) @interface BC { B[] value(); }
+
+@Retention(CLASS)   @Target({TYPE_USE,FIELD})  @Repeatable( CC.class ) @interface C { }
+@Retention(CLASS)   @Target({TYPE_USE,METHOD}) @Repeatable( DC.class ) @interface D { }
+@Retention(CLASS)   @Target({TYPE_USE,FIELD})  @interface CC { C[] value(); }
+@Retention(CLASS)   @Target({TYPE_USE,METHOD}) @interface DC { D[] value(); }
+
+@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,FIELD})  @Repeatable( TAC.class ) @interface TA { }
+@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,METHOD}) @Repeatable( TBC.class ) @interface TB { }
+@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,FIELD})  @interface TAC { TA[] value(); }
+@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,METHOD}) @interface TBC { TB[] value(); }
--- a/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedImport.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedImport.java	Mon Oct 28 18:30:14 2013 -0400
@@ -3,13 +3,16 @@
  * @bug 8006775
  * @summary Import clauses cannot use annotations.
  * @author Werner Dietl
+ * @ignore
  * @compile/fail/ref=AnnotatedImport.out -XDrawDiagnostics AnnotatedImport.java
  */
 
+import java.lang.annotation.*;
 import java.@A util.List;
 import @A java.util.Map;
 import java.util.@A HashMap;
 
 class AnnotatedImport { }
 
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedPackage1.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedPackage1.java	Mon Oct 28 18:30:14 2013 -0400
@@ -3,11 +3,15 @@
  * @bug 8006775
  * @summary Package declarations cannot use annotations.
  * @author Werner Dietl
+ * @ignore
  * @compile/fail/ref=AnnotatedPackage1.out -XDrawDiagnostics AnnotatedPackage1.java
  */
 
 package name.@A p1.p2;
 
+import java.lang.annotation.*;
+
 class AnnotatedPackage1 { }
 
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedPackage1.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedPackage1.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,3 +1,3 @@
 AnnotatedPackage1.java:9:14: compiler.err.expected: token.identifier
-AnnotatedPackage1.java:9:15: compiler.err.expected3: class, interface, enum
+AnnotatedPackage1.java:9:16: compiler.err.expected3: class, interface, enum
 2 errors
--- a/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedPackage2.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedPackage2.java	Mon Oct 28 18:30:14 2013 -0400
@@ -8,6 +8,9 @@
 
 package @A p1.p2;
 
+import java.lang.annotation.*;
+
 class AnnotatedPackage2 { }
 
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/AnnotationVersion.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/AnnotationVersion.java	Mon Oct 28 18:30:14 2013 -0400
@@ -3,11 +3,13 @@
  * @bug 6843077 8006775
  * @summary test that only Java 8 allows type annotations
  * @author Mahmood Ali
+ * @compile AnnotationVersion.java
  * @compile/fail/ref=AnnotationVersion.out -XDrawDiagnostics -Xlint:-options -source 1.6 AnnotationVersion.java
  * @compile/fail/ref=AnnotationVersion7.out -XDrawDiagnostics -Xlint:-options -source 1.7 AnnotationVersion.java
  */
-class AnnotationVersion {
-  public void method(@A AnnotationVersion this) { }
-}
+import java.lang.annotation.*;
 
+class myNumber<T extends @A Number> { }
+
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/AnnotationVersion.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/AnnotationVersion.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,2 +1,2 @@
-AnnotationVersion.java:10:43: compiler.err.type.annotations.not.supported.in.source: 1.6
+AnnotationVersion.java:12:27: compiler.err.type.annotations.not.supported.in.source: 1.6
 1 error
--- a/test/tools/javac/annotations/typeAnnotations/failures/AnnotationVersion7.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/AnnotationVersion7.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,2 +1,2 @@
-AnnotationVersion.java:10:43: compiler.err.type.annotations.not.supported.in.source: 1.7
+AnnotationVersion.java:12:27: compiler.err.type.annotations.not.supported.in.source: 1.7
 1 error
--- a/test/tools/javac/annotations/typeAnnotations/failures/BadCast.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/BadCast.java	Mon Oct 28 18:30:14 2013 -0400
@@ -5,10 +5,13 @@
  * @author Werner Dietl
  * @compile/fail/ref=BadCast.out -XDrawDiagnostics BadCast.java
  */
+import java.lang.annotation.*;
+
 class BadCast {
   static void main() {
     Object o = (@A) "";
   }
 }
 
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/BadCast.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/BadCast.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,2 +1,2 @@
-BadCast.java:10:19: compiler.err.illegal.start.of.type
-1 error
\ No newline at end of file
+BadCast.java:12:19: compiler.err.illegal.start.of.type
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,27 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 1234567
+ * @summary The parts of a fully-qualified type can't be annotated.
+ * @author Werner Dietl
+ * @compile/fail/ref=CantAnnotatePackages.out -XDrawDiagnostics CantAnnotatePackages.java
+ */
+
+import java.lang.annotation.*;
+import java.util.List;
+
+class CantAnnotatePackages {
+    // Before a package component:
+    @TA java.lang.Object of1;
+
+    // These result in a different error.
+    // TODO: should this be unified?
+
+    List<@TA java.lang.Object> of2;
+    java. @TA lang.Object of3;
+    List<java. @TA lang.Object> of4;
+
+    // TODO: also note the order of error messages.
+}
+
+@Target(ElementType.TYPE_USE)
+@interface TA { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,5 @@
+CantAnnotatePackages.java:19:14: compiler.err.cant.resolve.location: kindname.class, java, , , (compiler.misc.location: kindname.class, CantAnnotatePackages, null)
+CantAnnotatePackages.java:20:9: compiler.err.cant.resolve.location: kindname.class, lang, , , (compiler.misc.location: kindname.package, java, null)
+CantAnnotatePackages.java:21:14: compiler.err.cant.resolve.location: kindname.class, lang, , , (compiler.misc.location: kindname.package, java, null)
+CantAnnotatePackages.java:14:18: compiler.err.cant.type.annotate.scoping.1: @TA
+4 errors
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,71 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8006733 8006775
+ * @summary Ensure behavior for nested types is correct.
+ * @author Werner Dietl
+ * @compile/fail/ref=CantAnnotateScoping.out -XDrawDiagnostics CantAnnotateScoping.java
+ */
+
+import java.util.List;
+import java.util.ArrayList;
+
+import java.lang.annotation.*;
+
+@Target({ElementType.TYPE_USE})
+@interface TA {}
+@Target({ElementType.TYPE_USE})
+@interface TA2 {}
+
+@Target({ElementType.FIELD})
+@interface DA {}
+@Target({ElementType.FIELD})
+@interface DA2 {}
+
+@Target({ElementType.TYPE_USE, ElementType.FIELD})
+@interface DTA {}
+@Target({ElementType.TYPE_USE, ElementType.FIELD})
+@interface DTA2 {}
+
+class Test {
+    static class Outer {
+        static class SInner {}
+    }
+
+    // Legal
+    List<Outer. @TA SInner> li;
+
+    // Illegal
+    @TA Outer.SInner osi;
+    // Illegal
+    List<@TA Outer.SInner> aloi;
+    // Illegal
+    Object o1 = new @TA @DA @TA2 Outer.SInner();
+    // Illegal
+    Object o = new ArrayList<@TA @DA Outer.SInner>();
+
+    // Illegal: @TA is only a type-use annotation
+    @TA java.lang.Object f1;
+
+    // Legal: @DA is only a declaration annotation
+    @DA java.lang.Object f2;
+
+    // Legal: @DTA is both a type-use and declaration annotation
+    @DTA java.lang.Object f3;
+
+    // Illegal: @TA and @TA2 are only type-use annotations
+    @DTA @DA @TA @DA2 @TA2 java.lang.Object f4;
+
+    // Illegal: Do we want one or two messages?
+    // 1: @DA in invalid location
+    // 2: Not finding class "lang"
+    java. @DA lang.Object f5;
+
+    // Illegal: Do we want one or two messages?
+    // 1: @DA in invalid location
+    // 2: Not finding class "XXX"
+    java. @DA XXX.Object f6;
+
+    // Illegal: Can't find class "lang".
+    // Would a different error message be desirable?
+    java. @TA lang.Object f7;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,11 @@
+CantAnnotateScoping.java:61:9: compiler.err.cant.resolve.location: kindname.class, lang, , , (compiler.misc.location: kindname.package, java, null)
+CantAnnotateScoping.java:66:9: compiler.err.cant.resolve.location: kindname.class, XXX, , , (compiler.misc.location: kindname.package, java, null)
+CantAnnotateScoping.java:70:9: compiler.err.cant.resolve.location: kindname.class, lang, , , (compiler.misc.location: kindname.package, java, null)
+CantAnnotateScoping.java:38:14: compiler.err.cant.type.annotate.scoping.1: @TA
+CantAnnotateScoping.java:47:18: compiler.err.cant.type.annotate.scoping.1: @TA
+CantAnnotateScoping.java:56:37: compiler.err.cant.type.annotate.scoping: @TA,@TA2
+CantAnnotateScoping.java:40:14: compiler.err.cant.type.annotate.scoping.1: @TA
+CantAnnotateScoping.java:42:34: compiler.err.cant.type.annotate.scoping: @TA,@DA,@TA2
+CantAnnotateScoping.java:44:38: compiler.err.cant.type.annotate.scoping: @TA,@DA
+CantAnnotateScoping.java:44:34: compiler.err.annotation.type.not.applicable
+10 errors
\ No newline at end of file
--- a/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,41 +1,96 @@
 /*
  * @test /nodynamiccopyright/
  * @bug 8006733 8006775
- * @ignore 8013409: test failures for type annotations
- * @summary A static outer class cannot be annotated.
+ * @summary Ensure behavior for nested types is correct.
  * @author Werner Dietl
- * @compile/fail/ref=CantAnnotateStaticClass.out -XDrawDiagnostics CantAnnotateStaticClass.java
+ * @compile CantAnnotateStaticClass.java
  */
 
 import java.util.List;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.lang.annotation.*;
 
-class CantAnnotateStaticClass {
+class Top {
+    @Target(ElementType.TYPE_USE)
+    @interface TA {}
+
+    @Target(ElementType.TYPE_USE)
+    @interface TB {}
+
     @Target(ElementType.TYPE_USE)
-    @interface A {}
+    @interface TC {}
 
-    static class Outer {
-        class Inner {}
+    class Outer {
+        class Inner {
+            Object o1 = Top.this;
+            Object o2 = Outer.this;
+            Object o3 = this;
+        }
+        // Illegal
+        // static class SInner {}
+        // interface IInner {}
     }
 
-    // 8 errors:
-    @A Outer.Inner f1;
-    @A Outer.Inner f1r() { return null; }
-    void f1p(@A Outer.Inner p) { }
-    void f1c(Object o) {
-        Object l = (@A Outer.Inner) o;
+    // All combinations are OK
+
+    Top.@TB Outer f1;
+    @TB Outer.Inner f1a;
+    Outer. @TC Inner f1b;
+    @TB Outer. @TC Inner f1c;
+
+    @TA Top. @TB Outer f2;
+    @TA Top. @TB Outer.Inner f2a;
+    @TA Top. Outer. @TC Inner f2b;
+    @TA Top. @TB Outer. @TC Inner f2c;
+
+    @TB Outer f1r() { return null; }
+    @TB Outer.Inner f1ra() { return null; }
+    Outer. @TC Inner f1rb() { return null; }
+    @TB Outer. @TC Inner f1rc() { return null; }
+
+    void f1param(@TB Outer p,
+            @TB Outer.Inner p1,
+            Outer. @TC Inner p2,
+            @TB Outer. @TC Inner p3) { }
+
+    void f1cast(Object o) {
+        Object l;
+        l = (@TB Outer) o;
+        l = (@TB Outer.Inner) o;
+        l = (Outer. @TC Inner) o;
+        l = (@TB Outer. @TC Inner) o;
     }
 
-    List<@A Outer.Inner> f2;
-    List<@A Outer.Inner> f2r() { return null; }
-    void f2p(List<@A Outer.Inner> p) { }
-    void f2c(Object o) {
-        Object l = (List<@A Outer.Inner>) o;
-    }
+    List<@TB Outer> g1;
+    List<@TB Outer.Inner> g1a;
+    List<Outer. @TC Inner> g1b;
+    List<@TB Outer. @TC Inner> g1c;
+
+    List<@TA Top. @TB Outer> g2;
+    List<@TA Top. @TB Outer.Inner> g2a;
+    List<@TA Top. Outer. @TC Inner> g2b;
+    List<@TA Top. @TB Outer. @TC Inner> g2c;
+
+    List<@TB Outer> g1r() { return null; }
+    List<@TB Outer.Inner> g1ra() { return null; }
+    List<Outer. @TC Inner> g1rb() { return null; }
+    List<@TB Outer. @TC Inner> g1rc() { return null; }
 
-    // OK:
-    @A Outer g1;
-    List<@A Outer> g2;
-    Outer. @A Inner g3;
-    List<Outer. @A Inner> g4;
+    void g1param(List<@TB Outer> p,
+            List<@TB Outer.Inner> p1,
+            List<Outer. @TC Inner> p2,
+            List<@TB Outer. @TC Inner> p3) { }
+
+    void g1new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TB Outer>();
+        l = new @TB ArrayList<@TB Outer.Inner>();
+        l = new @TB HashMap<String, Outer. @TC Inner>();
+        l = new @TB HashMap<String, @TB Outer. Inner>();
+        l = new @TB HashMap<String, @TB Outer. @TC Inner>();
+        l = new @TB HashMap<String, @TA Top. Outer. @TC Inner>();
+        l = new @TB HashMap<String, @TA Top. @TB Outer. Inner>();
+        l = new @TB HashMap<String, @TA Top. @TB Outer. @TC Inner>();
+    }
 }
--- a/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.out	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-dummy
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,206 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8006733 8006775
+ * @summary Ensure behavior for nested types is correct.
+ * @author Werner Dietl
+ * @compile/fail/ref=CantAnnotateStaticClass2.out -XDrawDiagnostics CantAnnotateStaticClass2.java
+ */
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.lang.annotation.*;
+
+class Top {
+    @Target(ElementType.TYPE_USE)
+    @interface TA {}
+
+    @Target(ElementType.TYPE_USE)
+    @interface TB {}
+
+    @Target(ElementType.TYPE_USE)
+    @interface TC {}
+
+    static class Outer {
+        class Inner {
+            // Object o1 = Top.this;
+            Object o2 = Outer.this;
+            Object o3 = this;
+        }
+        static class SInner {
+            // Object o1 = Top.this;
+            // Object o2 = Outer.this;
+            Object o3 = this;
+        }
+        interface IInner {
+            // Object o1 = Top.this;
+            // Object o2 = Outer.this;
+            // Object o3 = this;
+        }
+    }
+
+    @TB Outer f1;
+    @TB Outer.Inner f1a;
+    @TB Outer.SInner f2a; // err
+    @TB Outer.IInner f3a; // err
+
+    Outer. @TC Inner f1b;
+    Outer. @TC SInner f2b;
+    Outer. @TC IInner f3b;
+
+    @TB Outer. @TC Inner f1c;
+    @TB Outer. @TC SInner f2c; // err
+    @TB Outer. @TC IInner f3c; // err
+
+    @TA Top. @TB Outer g1; // err
+    @TA Top. @TB Outer.Inner g1a; // err
+    @TA Top. @TB Outer.SInner g2a; // err
+    @TA Top. @TB Outer.IInner g3a; // err
+
+    @TA Top. Outer. @TC Inner g1b; // err
+    @TA Top. Outer. @TC SInner g2b; // err
+    @TA Top. Outer. @TC IInner g3b; // err
+
+    @TA Top. @TB Outer. @TC Inner g1c; // err
+    @TA Top. @TB Outer. @TC SInner g2c; // err
+    @TA Top. @TB Outer. @TC IInner g3c; // err
+
+    @TB Outer f1r() { return null; }
+
+    @TB Outer.Inner f1ra() { return null; }
+    @TB Outer.SInner f2ra() { return null; } // err
+    @TB Outer.IInner f3ra() { return null; } // err
+
+    Outer. @TC Inner f1rb() { return null; }
+    Outer. @TC SInner f2rb() { return null; }
+    Outer. @TC IInner f3rb() { return null; }
+
+    @TB Outer. @TC Inner f1rc() { return null; }
+    @TB Outer. @TC SInner f2rc() { return null; } // err
+    @TB Outer. @TC IInner f3rc() { return null; } // err
+
+    void f1param(@TB Outer p,
+            @TB Outer.Inner p1,
+            Outer. @TC Inner p2,
+            @TB Outer. @TC Inner p3) { }
+    void f2param(@TB Outer p,
+            @TB Outer.SInner p1, // err
+            Outer. @TC SInner p2,
+            @TB Outer. @TC SInner p3) { } // err
+    void f3param(@TB Outer p,
+            @TB Outer.IInner p1, // err
+            Outer. @TC IInner p2,
+            @TB Outer. @TC IInner p3) { } // err
+
+    void f1cast(Object o) {
+        Object l;
+        l = (@TB Outer) o;
+        l = (@TB Outer.Inner) o;
+        l = (Outer. @TC Inner) o;
+        l = (@TB Outer. @TC Inner) o;
+    }
+    void f2cast(Object o) {
+        Object l;
+        l = (@TB Outer) o;
+        l = (@TB Outer.SInner) o; // err
+        l = (Outer. @TC SInner) o;
+        l = (@TB Outer. @TC SInner) o; // err
+    }
+    void f3cast(Object o) {
+        Object l;
+        l = (@TB Outer) o;
+        l = (@TB Outer.IInner) o; // err
+        l = (Outer. @TC IInner) o;
+        l = (@TB Outer. @TC IInner) o; // err
+    }
+
+    List<@TB Outer> h1;
+
+    List<@TB Outer.Inner> h1a;
+    List<@TB Outer.SInner> h2a; // err
+    List<@TB Outer.IInner> h3a; // err
+
+    List<Outer. @TC Inner> h1b;
+    List<Outer. @TC SInner> h2b;
+    List<Outer. @TC IInner> h3b;
+
+    List<@TB Outer. @TC Inner> h1c;
+    List<@TB Outer. @TC SInner> h2c; // err
+    List<@TB Outer. @TC IInner> h3c; // err
+
+    List<@TA Top. @TB Outer> k1; // err
+
+    List<@TA Top. @TB Outer.Inner> k1a; // err
+    List<@TA Top. @TB Outer.SInner> k2a; // err
+    List<@TA Top. @TB Outer.IInner> k3a; // err
+
+    List<@TA Top. Outer. @TC Inner> k1b; // err
+    List<@TA Top. Outer. @TC SInner> k2b; // err
+    List<@TA Top. Outer. @TC IInner> k3b; // err
+
+    List<@TA Top. @TB Outer. @TC Inner> k1c; // err
+    List<@TA Top. @TB Outer. @TC SInner> k2c; // err
+    List<@TA Top. @TB Outer. @TC IInner> k3c; // err
+
+
+    List<@TB Outer> g1r() { return null; }
+
+    List<@TB Outer.Inner> g1ra() { return null; }
+    List<@TB Outer.SInner> g2ra() { return null; } // err
+    List<@TB Outer.IInner> g3ra() { return null; } // err
+
+    List<Outer. @TC Inner> g1rb() { return null; }
+    List<Outer. @TC SInner> g2rb() { return null; }
+    List<Outer. @TC IInner> g3rb() { return null; }
+
+    List<@TB Outer. @TC Inner> g1rc() { return null; }
+    List<@TB Outer. @TC SInner> g2rc() { return null; } // err
+    List<@TB Outer. @TC IInner> g3rc() { return null; } // err
+
+    void g1param(List<@TB Outer> p,
+            List<@TB Outer.Inner> p1,
+            List<Outer. @TC Inner> p2,
+            List<@TB Outer. @TC Inner> p3) { }
+    void g2param(List<@TB Outer> p,
+            List<@TB Outer.SInner> p1, // err
+            List<Outer. @TC SInner> p2,
+            List<@TB Outer. @TC SInner> p3) { } // err
+    void g3param(List<@TB Outer> p,
+            List<@TB Outer.IInner> p1, // err
+            List<Outer. @TC IInner> p2,
+            List<@TB Outer. @TC IInner> p3) { } // err
+
+    void g1new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TB Outer>();
+        l = new @TB ArrayList<@TB Outer.Inner>();
+        l = new @TB HashMap<String, Outer. @TC Inner>();
+        l = new @TB HashMap<String, @TB Outer. Inner>();
+        l = new @TB HashMap<String, @TB Outer. @TC Inner>();
+    }
+    void g2new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TB Outer>();
+        l = new @TB ArrayList<@TB Outer.SInner>(); // err
+        l = new @TB HashMap<String, Outer. @TC SInner>();
+        l = new @TB HashMap<String, @TB Outer. SInner>(); // err
+        l = new @TB HashMap<String, @TB Outer. @TC SInner>(); // err
+    }
+    void g3new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TB Outer>();
+        l = new @TB ArrayList<@TB Outer.IInner>(); // err
+        l = new @TB HashMap<String, Outer. @TC IInner>();
+        l = new @TB HashMap<String, @TB Outer. IInner>(); // err
+        l = new @TB HashMap<String, @TB Outer. @TC IInner>(); // err
+    }
+    void g4new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TA Top. @TB Outer>(); // err
+        l = new @TB ArrayList<@TA Top. @TB Outer.IInner>(); // err
+        l = new @TB HashMap<String, @TA Top. Outer. @TC IInner>(); // err
+        l = new @TB HashMap<String, @TA Top. @TB Outer. IInner>(); // err
+        l = new @TB HashMap<String, @TA Top. @TB Outer. @TC IInner>(); // err
+        l = new @TB HashMap<String, @TA @TB @TC Top. Outer. IInner>(); // err
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,65 @@
+CantAnnotateStaticClass2.java:44:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:45:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:52:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:53:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:55:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:56:23: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:57:23: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:58:23: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:60:21: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:61:21: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:62:21: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:64:25: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:65:25: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:66:25: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:71:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:72:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:79:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:80:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:87:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:89:24: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:91:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:93:24: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:57:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:58:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:65:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:66:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:120:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:121:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:128:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:129:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:131:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:133:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:134:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:135:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:137:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:138:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:139:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:141:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:142:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:143:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:149:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:150:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:157:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:158:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:165:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:167:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:169:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:171:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:105:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:107:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:112:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:114:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:184:35: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:186:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:187:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:192:35: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:194:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:195:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:199:35: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:200:38: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:201:41: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass2.java:202:44: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:203:44: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass2.java:204:49: compiler.err.cant.type.annotate.scoping: @Top.TA,@Top.TB,@Top.TC
+64 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,207 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8006733 8006775
+ * @summary Ensure behavior for nested types is correct.
+ * @author Werner Dietl
+ * @ignore
+ * @compile/fail/ref=CantAnnotateStaticClass3.out -XDrawDiagnostics CantAnnotateStaticClass3.java
+ */
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.lang.annotation.*;
+
+class Top {
+    @Target(ElementType.TYPE_USE)
+    @interface TA {}
+
+    @Target(ElementType.TYPE_USE)
+    @interface TB {}
+
+    @Target(ElementType.TYPE_USE)
+    @interface TC {}
+
+    interface Outer {
+        class Inner {
+            // Object o1 = Top.this;
+            // Object o2 = Outer.this;
+            Object o3 = this;
+        }
+        static class SInner {
+            // Object o1 = Top.this;
+            // Object o2 = Outer.this;
+            Object o3 = this;
+        }
+        interface IInner {
+            // Object o1 = Top.this;
+            // Object o2 = Outer.this;
+            // Object o3 = this;
+        }
+    }
+
+
+    @TB Outer f1;
+    @TB Outer.Inner f1a; // err
+    @TB Outer.SInner f2a; // err
+    @TB Outer.IInner f3a; // err
+
+    Outer. @TC Inner f1b;
+    Outer. @TC SInner f2b;
+    Outer. @TC IInner f3b;
+
+    @TB Outer. @TC Inner f1c; // err
+    @TB Outer. @TC SInner f2c; // err
+    @TB Outer. @TC IInner f3c; // err
+
+    @TA Top. @TB Outer g1; // err
+    @TA Top. @TB Outer.Inner g1a; // err
+    @TA Top. @TB Outer.SInner g2a; // err
+    @TA Top. @TB Outer.IInner g3a; // err
+
+    @TA Top. Outer. @TC Inner g1b; // err
+    @TA Top. Outer. @TC SInner g2b; // err
+    @TA Top. Outer. @TC IInner g3b; // err
+
+    @TA Top. @TB Outer. @TC Inner g1c; // err
+    @TA Top. @TB Outer. @TC SInner g2c; // err
+    @TA Top. @TB Outer. @TC IInner g3c; // err
+
+    @TB Outer f1r() { return null; }
+
+    @TB Outer.Inner f1ra() { return null; } // err
+    @TB Outer.SInner f2ra() { return null; } // err
+    @TB Outer.IInner f3ra() { return null; } // err
+
+    Outer. @TC Inner f1rb() { return null; }
+    Outer. @TC SInner f2rb() { return null; }
+    Outer. @TC IInner f3rb() { return null; }
+
+    @TB Outer. @TC Inner f1rc() { return null; } // err
+    @TB Outer. @TC SInner f2rc() { return null; } // err
+    @TB Outer. @TC IInner f3rc() { return null; } // err
+
+    void f1param(@TB Outer p,
+            @TB Outer.Inner p1, // err
+            Outer. @TC Inner p2,
+            @TB Outer. @TC Inner p3) { } // err
+    void f2param(@TB Outer p,
+            @TB Outer.SInner p1, // err
+            Outer. @TC SInner p2,
+            @TB Outer. @TC SInner p3) { } // err
+    void f3param(@TB Outer p,
+            @TB Outer.IInner p1, // err
+            Outer. @TC IInner p2,
+            @TB Outer. @TC IInner p3) { } // err
+
+    void f1cast(Object o) {
+        Object l;
+        l = (@TB Outer) o;
+        l = (@TB Outer.Inner) o; // err
+        l = (Outer. @TC Inner) o;
+        l = (@TB Outer. @TC Inner) o; // err
+    }
+    void f2cast(Object o) {
+        Object l;
+        l = (@TB Outer) o;
+        l = (@TB Outer.SInner) o; // err
+        l = (Outer. @TC SInner) o;
+        l = (@TB Outer. @TC SInner) o; // err
+    }
+    void f3cast(Object o) {
+        Object l;
+        l = (@TB Outer) o;
+        l = (@TB Outer.IInner) o; // err
+        l = (Outer. @TC IInner) o;
+        l = (@TB Outer. @TC IInner) o; // err
+    }
+
+    List<@TB Outer> h1;
+
+    List<@TB Outer.Inner> h1a; // err
+    List<@TB Outer.SInner> h2a; // err
+    List<@TB Outer.IInner> h3a; // err
+
+    List<Outer. @TC Inner> h1b;
+    List<Outer. @TC SInner> h2b;
+    List<Outer. @TC IInner> h3b;
+
+    List<@TB Outer. @TC Inner> h1c; // err
+    List<@TB Outer. @TC SInner> h2c; // err
+    List<@TB Outer. @TC IInner> h3c; // err
+
+    List<@TA Top. @TB Outer> k1; // err
+
+    List<@TA Top. @TB Outer.Inner> k1a; // err
+    List<@TA Top. @TB Outer.SInner> k2a; // err
+    List<@TA Top. @TB Outer.IInner> k3a; // err
+
+    List<@TA Top. Outer. @TC Inner> k1b; // err
+    List<@TA Top. Outer. @TC SInner> k2b; // err
+    List<@TA Top. Outer. @TC IInner> k3b; // err
+
+    List<@TA Top. @TB Outer. @TC Inner> k1c; // err
+    List<@TA Top. @TB Outer. @TC SInner> k2c; // err
+    List<@TA Top. @TB Outer. @TC IInner> k3c; // err
+
+
+    List<@TB Outer> g1r() { return null; }
+
+    List<@TB Outer.Inner> g1ra() { return null; } // err
+    List<@TB Outer.SInner> g2ra() { return null; } // err
+    List<@TB Outer.IInner> g3ra() { return null; } // err
+
+    List<Outer. @TC Inner> g1rb() { return null; }
+    List<Outer. @TC SInner> g2rb() { return null; }
+    List<Outer. @TC IInner> g3rb() { return null; }
+
+    List<@TB Outer. @TC Inner> g1rc() { return null; } // err
+    List<@TB Outer. @TC SInner> g2rc() { return null; } // err
+    List<@TB Outer. @TC IInner> g3rc() { return null; } // err
+
+    void g1param(List<@TB Outer> p,
+            List<@TB Outer.Inner> p1, // err
+            List<Outer. @TC Inner> p2,
+            List<@TB Outer. @TC Inner> p3) { } // err
+    void g2param(List<@TB Outer> p,
+            List<@TB Outer.SInner> p1, // err
+            List<Outer. @TC SInner> p2,
+            List<@TB Outer. @TC SInner> p3) { } // err
+    void g3param(List<@TB Outer> p,
+            List<@TB Outer.IInner> p1, // err
+            List<Outer. @TC IInner> p2,
+            List<@TB Outer. @TC IInner> p3) { } // err
+
+    void g1new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TB Outer>();
+        l = new @TB ArrayList<@TB Outer.Inner>(); // err
+        l = new @TB HashMap<String, Outer. @TC Inner>();
+        l = new @TB HashMap<String, @TB Outer. Inner>(); // err
+        l = new @TB HashMap<String, @TB Outer. @TC Inner>(); // err
+    }
+    void g2new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TB Outer>();
+        l = new @TB ArrayList<@TB Outer.SInner>(); // err
+        l = new @TB HashMap<String, Outer. @TC SInner>();
+        l = new @TB HashMap<String, @TB Outer. SInner>(); // err
+        l = new @TB HashMap<String, @TB Outer. @TC SInner>(); // err
+    }
+    void g3new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TB Outer>();
+        l = new @TB ArrayList<@TB Outer.IInner>(); // err
+        l = new @TB HashMap<String, Outer. @TC IInner>();
+        l = new @TB HashMap<String, @TB Outer. IInner>(); // err
+        l = new @TB HashMap<String, @TB Outer. @TC IInner>(); // err
+    }
+    void g4new(Object o) {
+        Object l;
+        l = new @TB ArrayList<@TA Top. @TB Outer>(); // err
+        l = new @TB ArrayList<@TA Top. @TB Outer.IInner>(); // err
+        l = new @TB HashMap<String, @TA Top. Outer. @TC IInner>(); // err
+        l = new @TB HashMap<String, @TA Top. @TB Outer. IInner>(); // err
+        l = new @TB HashMap<String, @TA Top. @TB Outer. @TC IInner>(); // err
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,83 @@
+CantAnnotateStaticClass3.java:44:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:45:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:46:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:52:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:53:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:54:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:56:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:57:23: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:58:23: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:59:23: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:61:21: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:62:21: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:63:21: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:65:25: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:66:25: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:67:25: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:71:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:72:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:73:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:79:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:80:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:81:16: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:84:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:86:24: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:88:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:90:24: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:92:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:94:24: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:57:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:58:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:59:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:65:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:66:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:67:12: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:99:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:101:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:106:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:108:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:113:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:115:18: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:120:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:121:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:122:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:128:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:129:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:130:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:132:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:134:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:135:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:136:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:138:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:139:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:140:14: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:142:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:143:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:144:17: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:149:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:150:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:151:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:157:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:158:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:159:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:162:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:164:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:166:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:168:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:170:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:172:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:177:35: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:179:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:180:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:185:35: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:187:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:188:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:193:35: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:195:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:196:41: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:200:35: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:201:38: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:202:41: compiler.err.cant.type.annotate.scoping.1: @Top.TA
+CantAnnotateStaticClass3.java:203:44: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+CantAnnotateStaticClass3.java:204:44: compiler.err.cant.type.annotate.scoping.1: @Top.TB
+82 errors
\ No newline at end of file
--- a/test/tools/javac/annotations/typeAnnotations/failures/IncompleteArray.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/IncompleteArray.java	Mon Oct 28 18:30:14 2013 -0400
@@ -5,8 +5,11 @@
  * @author Mahmood Ali
  * @compile/fail/ref=IncompleteArray.out -XDrawDiagnostics IncompleteArray.java
  */
+import java.lang.annotation.*;
+
 class IncompleteArray {
   int @A [] @A var;
 }
 
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/IncompleteArray.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/IncompleteArray.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,2 +1,2 @@
-IncompleteArray.java:9:13: compiler.err.illegal.start.of.type
+IncompleteArray.java:11:13: compiler.err.illegal.start.of.type
 1 error
--- a/test/tools/javac/annotations/typeAnnotations/failures/IncompleteVararg.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @bug 6843077 8006775
- * @summary test incomplete vararg declaration
- * @author Mahmood Ali
- * @compile/fail/ref=IncompleteVararg.out -XDrawDiagnostics IncompleteVararg.java
- */
-class IncompleteArray {
-  // the last variable may be vararg
-  void method(int @A test) { }
-}
-
-@interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/IncompleteVararg.out	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-IncompleteVararg.java:10:19: compiler.err.illegal.start.of.type
-1 error
--- a/test/tools/javac/annotations/typeAnnotations/failures/IndexArray.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/IndexArray.java	Mon Oct 28 18:30:14 2013 -0400
@@ -5,9 +5,12 @@
  * @author Mahmood Ali
  * @compile/fail/ref=IndexArray.out -XDrawDiagnostics IndexArray.java
  */
+import java.lang.annotation.*;
+
 class IndexArray {
   int[] var;
   int a = var @A [1];
 }
 
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/IndexArray.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/IndexArray.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,2 +1,2 @@
-IndexArray.java:10:15: compiler.err.illegal.start.of.expr
+IndexArray.java:12:15: compiler.err.illegal.start.of.expr
 1 error
--- a/test/tools/javac/annotations/typeAnnotations/failures/LintCast.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/LintCast.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,11 +1,11 @@
 LintCast.java:15:21: compiler.warn.redundant.cast: java.lang.String
 LintCast.java:21:27: compiler.warn.redundant.cast: java.util.List<java.lang.String>
-LintCast.java:27:20: compiler.warn.redundant.cast: int @A []
+LintCast.java:27:20: compiler.warn.redundant.cast: int[]
 LintCast.java:39:24: compiler.warn.redundant.cast: java.lang.String
 LintCast.java:40:26: compiler.warn.redundant.cast: java.lang.String
-LintCast.java:45:23: compiler.warn.redundant.cast: java.lang.Object @A []
+LintCast.java:45:23: compiler.warn.redundant.cast: java.lang.Object[]
 LintCast.java:49:27: compiler.warn.redundant.cast: java.util.List<java.lang.String>
-LintCast.java:53:27: compiler.warn.redundant.cast: java.util.List<@A java.lang.String>
+LintCast.java:53:27: compiler.warn.redundant.cast: java.util.List<java.lang.String>
 LintCast.java:57:21: compiler.warn.redundant.cast: java.lang.Object
 LintCast.java:61:27: compiler.warn.redundant.cast: LintCast.Outer.Inner
 10 warnings
\ No newline at end of file
--- a/test/tools/javac/annotations/typeAnnotations/failures/OldArray.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/OldArray.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,35 +1,16 @@
 /*
- * Copyright (c) 2008, 2013, 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 /nodynamiccopyright/
  * @test
  * @bug 6843077 8006775
  * @summary test old array syntax
  * @author Mahmood Ali
- * @compile/fail -XDrawDiagnostics OldArray.java
+ * @compile/fail/ref=OldArray.out -XDrawDiagnostics OldArray.java
  */
+import java.lang.annotation.*;
+
 class OldArray {
   String [@A]  s() { return null; }
 }
 
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/OldArray.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,10 @@
+OldArray.java:12:11: compiler.err.expected: ']'
+OldArray.java:12:13: compiler.err.expected: token.identifier
+OldArray.java:12:14: compiler.err.expected: ';'
+OldArray.java:12:17: compiler.err.illegal.start.of.type
+OldArray.java:12:18: compiler.err.expected: token.identifier
+OldArray.java:12:19: compiler.err.expected: ';'
+OldArray.java:12:22: compiler.err.illegal.start.of.type
+OldArray.java:12:28: compiler.err.expected: token.identifier
+OldArray.java:13:1: compiler.err.expected3: class, interface, enum
+9 errors
--- a/test/tools/javac/annotations/typeAnnotations/failures/Scopes.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/Scopes.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,17 +1,16 @@
 /*
  * @test /nodynamiccopyright/
  * @bug 6843077 8006775
- * @summary check that A is accessible in the class type parameters
+ * @summary Unqualified inner type annotation not in scope.
  * @author Mahmood Ali
  * @compile/fail/ref=Scopes.out -XDrawDiagnostics Scopes.java
  */
-class Scopes<T extends @UniqueInner Object> {
-  // UniqueInner is not visible in the type parameters.
-  // One has to use Scopes.UniqueInner.
-  // Annotations with the default @Target are not allowed there,
-  // so we also get the second error about the invalid location.
-  // Adding the target here doesn't matter, as we don't resolve
-  // the annotation type.
-  // @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
-  @interface UniqueInner { };
+import java.lang.annotation.*;
+
+@InnerTA
+class Scopes<@InnerTA T extends @InnerTA Object> {
+    // The simple name TA is not in scope on header of class.
+    // One has to use @Scopes.TA.
+    @Target(ElementType.TYPE_USE)
+    @interface InnerTA { };
 }
--- a/test/tools/javac/annotations/typeAnnotations/failures/Scopes.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/Scopes.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,3 +1,4 @@
-Scopes.java:8:25: compiler.err.cant.resolve: kindname.class, UniqueInner, , 
-Scopes.java:8:24: compiler.err.annotation.type.not.applicable
-2 errors
+Scopes.java:10:2: compiler.err.cant.resolve: kindname.class, InnerTA, , 
+Scopes.java:11:34: compiler.err.cant.resolve: kindname.class, InnerTA, , 
+Scopes.java:11:15: compiler.err.cant.resolve: kindname.class, InnerTA, , 
+3 errors
--- a/test/tools/javac/annotations/typeAnnotations/failures/StaticFields.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/StaticFields.java	Mon Oct 28 18:30:14 2013 -0400
@@ -5,9 +5,23 @@
  * @author Mahmood Ali
  * @compile/fail/ref=StaticFields.out -XDrawDiagnostics StaticFields.java
  */
+import java.lang.annotation.*;
+
 class C {
-  int f;
+  static int f;
+  // static block
+  static {
+    @A C.f = 1;
+  }
+  // static ref
   int a = @A C.f;
+  // static method
+  static int f() { return @A C.f; }
+  // main
+  public static void main(String... args) {
+    int a = @A C.f;
+  }
 }
 
+@Target(ElementType.TYPE_USE)
 @interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/StaticFields.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/StaticFields.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,2 +1,5 @@
-StaticFields.java:10:17: compiler.err.illegal.start.of.expr
-1 error
+StaticFields.java:14:11: compiler.err.expected: token.identifier
+StaticFields.java:17:17: compiler.err.illegal.start.of.expr
+StaticFields.java:19:33: compiler.err.illegal.start.of.expr
+StaticFields.java:22:19: compiler.err.illegal.start.of.expr
+4 errors
\ No newline at end of file
--- a/test/tools/javac/annotations/typeAnnotations/failures/StaticMethods.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @bug 6843077 8006775
- * @summary static methods don't have receivers
- * @author Mahmood Ali
- * @compile/fail/ref=StaticMethods.out -XDrawDiagnostics StaticMethods.java
- */
-class StaticMethods {
-  static void main(StaticMethods this) { }
-}
-
-@interface A { }
--- a/test/tools/javac/annotations/typeAnnotations/failures/StaticMethods.out	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-StaticMethods.java:9:34: compiler.err.non-static.cant.be.ref: kindname.variable, this
-1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/TypeOnAnonClass.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,13 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8023682
+ * @summary Cannot annotate an anonymous class with a target type of TYPE
+ * @compile/fail/ref=TypeOnAnonClass.out -XDrawDiagnostics TypeOnAnonClass.java
+ */
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@interface X {}
+interface Foo {}
+class TypeOnAnonClass { void m() { new @X Foo() {}; } }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/TypeOnAnonClass.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,2 @@
+TypeOnAnonClass.java:13:40: compiler.err.annotation.type.not.applicable
+1 error
--- a/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableCycleTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableCycleTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,10 +35,12 @@
 
 class TypeVariableCycleTest<CTV> {
     <MTV extends  @TA CTV> MTV cast(CTV p) {
-        return (@TA MTV) p;
+        return (@TB MTV) p;
     }
 }
 
-@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Target(ElementType.TYPE_USE)
 @interface TA {}
 
+@Target(ElementType.TYPE_USE)
+@interface TB {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableMissingTA.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2013, 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 1234567
+ * @summary A missing annotation type in a type variable bound
+ *     should result in the same errors with and without an
+ *     annotation processor.
+ * @author Werner Dietl
+ *
+ * @compile DummyProcessor.java
+ * @compile/fail/ref=TypeVariableMissingTA.out -XDrawDiagnostics TypeVariableMissingTA.java
+ * @compile/fail/ref=TypeVariableMissingTA.out -XDrawDiagnostics -cp . -processor DummyProcessor TypeVariableMissingTA.java
+ */
+
+import java.lang.annotation.*;
+
+class TypeVariableMissingTA<T extends @MISSING Object> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableMissingTA.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,2 @@
+TypeVariableMissingTA.java:39:40: compiler.err.cant.resolve: kindname.class, MISSING, , 
+1 error
\ No newline at end of file
--- a/test/tools/javac/annotations/typeAnnotations/failures/common/arrays/DeclarationAnnotation.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/failures/common/arrays/DeclarationAnnotation.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,4 +1,5 @@
 DeclarationAnnotation.java:10:21: compiler.err.annotation.type.not.applicable
 DeclarationAnnotation.java:11:21: compiler.err.annotation.type.not.applicable
 DeclarationAnnotation.java:12:21: compiler.err.annotation.type.not.applicable
-3 errors
\ No newline at end of file
+DeclarationAnnotation.java:16:21: compiler.err.annotation.type.not.applicable
+4 errors
--- a/test/tools/javac/annotations/typeAnnotations/newlocations/AnonymousClass.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/newlocations/AnonymousClass.java	Mon Oct 28 18:30:14 2013 -0400
@@ -32,12 +32,9 @@
  */
 class AnonymousClass {
     Object o1 = new @TA Object() { };
-    // Declaration annotations are also allowed.
-    Object o2 = new @TA @DA Object() { };
+    Object o2 = new @TA Object() { };
 }
 
-@interface DA { }
-
 @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
 @interface TA { }
 
--- a/test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java	Mon Oct 28 18:30:14 2013 -0400
@@ -21,14 +21,16 @@
  * questions.
  */
 
-import static com.sun.tools.classfile.TypeAnnotation.TargetType.*;
-
 /*
  * @test
+ * @bug 8026791
  * @summary Test population of reference info for constructor results
  * @compile -g Driver.java ReferenceInfoUtil.java Constructors.java
  * @run main Driver Constructors
  */
+
+import static com.sun.tools.classfile.TypeAnnotation.TargetType.*;
+
 public class Constructors {
 
     @TADescriptions({
@@ -42,8 +44,8 @@
     }
 
     @TADescriptions({
-        @TADescription(annotation = "TA", type = METHOD_RETURN),
-        @TADescription(annotation = "TB", type = METHOD_RETURN),
+        @TADescription(annotation = "TA", type = METHOD_RETURN, genericLocation = {1, 0}),
+        @TADescription(annotation = "TB", type = METHOD_RETURN, genericLocation = {1, 0}),
         @TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, paramIndex = 0)
     })
     @TestClass("Test$Inner")
@@ -56,9 +58,9 @@
 
     @TADescriptions({
         @TADescription(annotation = "TA", type = METHOD_RECEIVER),
-        @TADescription(annotation = "TB", type = METHOD_RETURN),
+        @TADescription(annotation = "TB", type = METHOD_RETURN, genericLocation = {1, 0}),
         @TADescription(annotation = "TC", type = METHOD_RECEIVER),
-        @TADescription(annotation = "TD", type = METHOD_RETURN),
+        @TADescription(annotation = "TD", type = METHOD_RETURN, genericLocation = {1, 0}),
         @TADescription(annotation = "TE", type = METHOD_FORMAL_PARAMETER, paramIndex = 0)
     })
     @TestClass("Test$Inner")
@@ -72,9 +74,9 @@
     @TADescriptions({
         @TADescription(annotation = "TA", type = METHOD_RECEIVER),
         @TADescription(annotation = "TB", type = METHOD_RECEIVER, genericLocation = {1, 0}),
-        @TADescription(annotation = "TC", type = METHOD_RETURN),
+        @TADescription(annotation = "TC", type = METHOD_RETURN, genericLocation = {1, 0, 1, 0}),
         @TADescription(annotation = "TD", type = METHOD_RECEIVER, genericLocation = {1, 0}),
-        @TADescription(annotation = "TE", type = METHOD_RETURN),
+        @TADescription(annotation = "TE", type = METHOD_RETURN, genericLocation = {1, 0, 1, 0}),
         @TADescription(annotation = "TF", type = METHOD_FORMAL_PARAMETER, paramIndex = 0)
     })
     @TestClass("Outer$Middle$Inner")
--- a/test/tools/javac/api/TestJavacTask.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/api/TestJavacTask.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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,8 +23,8 @@
 
 /*
  * @test
- * @bug     4813736
- * @summary Provide a basic test of access to the Java Model from javac
+ * @bug     4813736 8015073
+ * @summary Provide a basic test of access to the Java Model from javac, and error messages
  * @author  Peter von der Ah\u00e9
  * @run main TestJavacTask TestJavacTask.java
  */
@@ -40,21 +40,36 @@
 import javax.tools.ToolProvider;
 
 public class TestJavacTask {
-
-    static JavacTaskImpl getTask(JavaCompiler compiler, File... file) {
+    static final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+    static JavacTaskImpl getTask(File... file) {
         StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null);
         Iterable<? extends JavaFileObject> files =
             fm.getJavaFileObjectsFromFiles(Arrays.asList(file));
         return (JavacTaskImpl)compiler.getTask(null, fm, null, null, null, files);
     }
 
-    public static void main(String... args) throws IOException {
-        JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+    static void basicTest(String... args) throws IOException {
         String srcdir = System.getProperty("test.src");
         File file = new File(srcdir, args[0]);
-        JavacTaskImpl task = getTask(tool, file);
+        JavacTaskImpl task = getTask(file);
         for (TypeElement clazz : task.enter(task.parse()))
             System.out.println(clazz.getSimpleName());
     }
 
+    static void checkKindError() {
+        final File testFile = new File("Test.java "); // <-note trailing space!
+        try {
+            getTask(testFile);
+        } catch (IllegalArgumentException iae) {
+            if (!iae.getMessage().contains("\"" + testFile.getName() + "\"")) {
+                System.err.println("Got message: " + iae.getMessage());
+                throw new RuntimeException("Error: expected string not found");
+            }
+        }
+    }
+
+    public static void main(String... args) throws IOException {
+        basicTest(args);
+        checkKindError();
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/defaultMethods/Assertions.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2013, 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 test;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/*
+ * @test
+ * @bug 8025141
+ * @summary Interfaces must not contain non-public fields, ensure $assertionsDisabled
+ *          is not generated into an interface
+ * @compile Assertions.java
+ * @run main/othervm -da test.Assertions
+ * @run main/othervm -ea:test.Assertions test.Assertions Inner
+ * @run main/othervm -ea:test.Outer test.Assertions Outer
+ * @run main/othervm -ea:test.Another test.Assertions Another.Inner
+ * @run main/othervm -ea:test... test.Assertions Inner Outer Another.Inner
+ */
+
+public class Assertions {
+    interface Inner {
+        default void testInner() {
+            assert false;
+        }
+    }
+
+    static class InnerImpl implements Inner {}
+
+    static class OuterImpl implements Outer {}
+
+    static class AnotherInnerImpl implements Another.Inner {}
+
+    public static void main(String... args) {
+        Set<String> shouldThrowAssert = new HashSet<String>(Arrays.asList(args));
+        try {
+            new InnerImpl().testInner();
+            if (shouldThrowAssert.contains("Inner")) {
+                throw new IllegalStateException("AssertionError expected, but not thrown.");
+            }
+        } catch (AssertionError e) {
+            if (!shouldThrowAssert.contains("Inner")) {
+                throw new IllegalStateException("AssertionError not expected, but thrown.");
+            }
+        }
+        try {
+            new OuterImpl().testOuter();
+            if (shouldThrowAssert.contains("Outer")) {
+                throw new IllegalStateException("AssertionError expected, but not thrown.");
+            }
+        } catch (AssertionError e) {
+            if (!shouldThrowAssert.contains("Outer")) {
+                throw new IllegalStateException("AssertionError not expected, but thrown.");
+            }
+        }
+        try {
+            new AnotherInnerImpl().testAnotherInner();
+            if (shouldThrowAssert.contains("Another.Inner")) {
+                throw new IllegalStateException("AssertionError expected, but not thrown.");
+            }
+        } catch (AssertionError e) {
+            if (!shouldThrowAssert.contains("Another.Inner")) {
+                throw new IllegalStateException("AssertionError not expected, but thrown.");
+            }
+        }
+    }
+}
+
+interface Outer {
+    default void testOuter() {
+        assert false;
+    }
+}
+
+@interface Another {
+    interface Inner {
+        default void testAnotherInner() {
+            assert false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/defaultMethods/BadClassfile.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2013, 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 8025087
+ * @summary Verify that pre-JDK8 classfiles with default and/or static methods
+ *          are refused correctly.
+ * @build BadClassfile
+ * @run main BadClassfile
+ */
+
+import com.sun.tools.classfile.*;
+import com.sun.tools.javac.api.JavacTaskImpl;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.jvm.ClassReader.BadClassFile;
+import com.sun.tools.javac.jvm.Target;
+import com.sun.tools.javac.util.Assert;
+import com.sun.tools.javac.util.JCDiagnostic;
+import java.io.File;
+import java.util.Arrays;
+import java.util.Objects;
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+
+public class BadClassfile {
+    public static void main(String... args) throws Exception {
+        test("BadClassfile$DefaultMethodTest", "compiler.misc.invalid.default.interface");
+        test("BadClassfile$StaticMethodTest", "compiler.misc.invalid.static.interface");
+    }
+
+    private static void test(String classname, String expected) throws Exception {
+        File classfile = new File(System.getProperty("test.classes", "."), classname + ".class");
+        ClassFile cf = ClassFile.read(classfile);
+
+        cf = new ClassFile(cf.magic, Target.JDK1_7.minorVersion,
+                 Target.JDK1_7.majorVersion, cf.constant_pool, cf.access_flags,
+                cf.this_class, cf.super_class, cf.interfaces, cf.fields,
+                cf.methods, cf.attributes);
+
+        new ClassWriter().write(cf, classfile);
+
+        JavaCompiler c = ToolProvider.getSystemJavaCompiler();
+        JavacTaskImpl task = (JavacTaskImpl) c.getTask(null, null, null, Arrays.asList("-classpath", System.getProperty("test.classes", ".")), null, null);
+
+        try {
+            Symbol clazz = com.sun.tools.javac.main.JavaCompiler.instance(task.getContext()).resolveIdent(classname);
+
+            clazz.complete();
+        } catch (BadClassFile f) {
+            JCDiagnostic embeddedDiag = (JCDiagnostic) f.diag.getArgs()[1];
+            assertEquals(expected, embeddedDiag.getCode());
+            assertEquals(Integer.toString(Target.JDK1_7.majorVersion), embeddedDiag.getArgs()[0]);
+            assertEquals(Integer.toString(Target.JDK1_7.minorVersion), embeddedDiag.getArgs()[1]);
+        }
+    }
+
+    private static void assertEquals(Object expected, Object actual) {
+        Assert.check(Objects.equals(expected, actual),
+                     "expected: " + expected + ", but was: " + actual);
+    }
+
+    interface DefaultMethodTest {
+        default void test() { }
+    }
+    interface StaticMethodTest {
+        static void test() { }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/defaultMethods/CannotChangeAssertionsStateAfterInitialized.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2013, 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 8025141
+ * @summary Ensure the assertion status cannot be changed once the class is initialized
+ * @compile CannotChangeAssertionsStateAfterInitialized.java
+ * @run main/othervm -da CannotChangeAssertionsStateAfterInitialized
+ */
+
+public interface CannotChangeAssertionsStateAfterInitialized {
+    default void m() {
+        assert false;
+    }
+
+    public static void main(String[] args) {
+        ClassLoader cl = CannotChangeAssertionsStateAfterInitialized.class.getClassLoader();
+        cl.setClassAssertionStatus(CannotChangeAssertionsStateAfterInitialized.class.getName(), true);
+        new CannotChangeAssertionsStateAfterInitialized() {}.m();
+    }
+
+}
--- a/test/tools/javac/diags/examples.not-yet.txt	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/diags/examples.not-yet.txt	Mon Oct 28 18:30:14 2013 -0400
@@ -40,7 +40,6 @@
 compiler.err.type.var.more.than.once.in.result          # UNUSED
 compiler.err.unexpected.type
 compiler.err.unsupported.cross.fp.lit                   # Scanner: host system dependent
-compiler.misc.bad.class.file.header                     # bad class file
 compiler.misc.bad.class.signature                       # bad class file
 compiler.misc.bad.const.pool.tag                        # bad class file
 compiler.misc.bad.const.pool.tag.at                     # bad class file
--- a/test/tools/javac/diags/examples/CantAnnotateNestedType.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, 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.annotate.nested.type
-
-import java.lang.annotation.*;
-
-class CantAnnotateStaticClass {
-    @Target(ElementType.TYPE_USE)
-    @interface A {}
-
-    interface Outer {
-        interface Inner {}
-    }
-
-    // Error:
-    @A Outer.Inner f;
-
-    // OK:
-    @A Outer g;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/CantAnnotateScoping.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2012, 2013, 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.type.annotate.scoping
+
+import java.lang.annotation.*;
+
+class CantAnnotateScoping {
+    @Target(ElementType.TYPE_USE)
+    @interface TA {}
+    @Target(ElementType.TYPE_USE)
+    @interface TB {}
+
+    interface Outer {
+        interface Inner {}
+    }
+
+    // Error:
+    @TA @TB Outer.Inner f;
+
+    // OK:
+    @TA @TB Outer g;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/CantAnnotateScoping1.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2012, 2013, 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.type.annotate.scoping.1
+
+import java.lang.annotation.*;
+
+class CantAnnotateNestedType {
+    @Target(ElementType.TYPE_USE)
+    @interface TA {}
+
+    interface Outer {
+        interface Inner {}
+    }
+
+    // Error:
+    @TA Outer.Inner f;
+
+    // OK:
+    @TA Outer g;
+}
--- a/test/tools/javac/diags/examples/CantAnnotateStaticClass.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, 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.annotate.static.class
-
-import java.lang.annotation.*;
-
-class CantAnnotateStaticClass {
-    @Target(ElementType.TYPE_USE)
-    @interface A {}
-
-    static class Outer {
-        class Inner {}
-    }
-
-    // Error:
-    @A Outer.Inner f;
-
-    // OK:
-    @A Outer g;
-}
--- a/test/tools/javac/diags/examples/DuplicateAnnotation.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * 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
- * 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.duplicate.annotation
-// key: compiler.warn.source.no.bootclasspath
-// options: -source 7
-
-@interface Anno { }
-
-@Anno
-@Anno
-class DuplicateAnnotation { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/InterfaceOrArrayExpected.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.intf.or.array.expected.here
+
+import java.util.List;
+
+class InterfaceExpected<T extends List & String> { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.misc.invalid.default.interface
+// key: compiler.misc.bad.class.file.header
+// key: compiler.err.cant.access
+// options: -processor CreateBadClassFile
+
+/* The annotation processor will create an invalid classfile with version 51.0
+ * and a non-abstract method in an interface. Loading the classfile will produce
+ * the diagnostic.
+ */
+class InvalidDefaultInterface { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/InvalidDefaultInterface/processors/CreateBadClassFile.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.tools.classfile.*;
+import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info;
+import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info;
+import com.sun.tools.classfile.ConstantPool.CPInfo;
+import java.io.*;
+import java.util.*;
+import javax.annotation.processing.*;
+import javax.lang.model.*;
+import javax.lang.model.element.*;
+import javax.tools.*;
+
+/* Create an invalid classfile with version 51.0 and a non-abstract method in an interface.*/
+@SupportedAnnotationTypes("*")
+public class CreateBadClassFile extends AbstractProcessor {
+    public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv) {
+        if (++round == 1) {
+            ConstantPool cp = new ConstantPool(new CPInfo[] {
+                new CONSTANT_Utf8_info(""),                     //0
+                new CONSTANT_Utf8_info("Test"),                 //1
+                new CONSTANT_Class_info(null, 1),               //2
+                new CONSTANT_Utf8_info("java/lang/Object"),     //3
+                new CONSTANT_Class_info(null, 3),               //4
+                new CONSTANT_Utf8_info("test"),                 //5
+                new CONSTANT_Utf8_info("()V"),                  //6
+            });
+            ClassFile cf = new ClassFile(0xCAFEBABE,
+                          0,
+                          51,
+                          cp,
+                          new AccessFlags(AccessFlags.ACC_ABSTRACT |
+                                          AccessFlags.ACC_INTERFACE |
+                                          AccessFlags.ACC_PUBLIC),
+                          2,
+                          4,
+                          new int[0],
+                          new Field[0],
+                          new Method[] {
+                              //creating non-abstract method in 51.0 classfile:
+                              new Method(new AccessFlags(AccessFlags.ACC_PUBLIC),
+                                         5,
+                                         new Descriptor(6),
+                                         new Attributes(cp, new Attribute[0]))
+                          },
+                          new Attributes(cp, new Attribute[0]));
+            try {
+                JavaFileObject clazz = processingEnv.getFiler().createClassFile("Test");
+                try (OutputStream out = clazz.openOutputStream()) {
+                    new ClassWriter().write(cf, out);
+                }
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+        }
+        return false;
+    }
+
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    int round = 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.misc.invalid.static.interface
+// key: compiler.misc.bad.class.file.header
+// key: compiler.err.cant.access
+// options: -processor CreateBadClassFile
+
+/* The annotation processor will create an invalid classfile with version 51.0
+ * and a static method in an interface. Loading the classfile will produce
+ * the diagnostic.
+ */
+class InvalidDefaultInterface { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/InvalidStaticInterface/processors/CreateBadClassFile.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.tools.classfile.*;
+import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info;
+import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info;
+import com.sun.tools.classfile.ConstantPool.CPInfo;
+import java.io.*;
+import java.util.*;
+import javax.annotation.processing.*;
+import javax.lang.model.*;
+import javax.lang.model.element.*;
+import javax.tools.*;
+
+/* Create an invalid classfile with version 51.0 and a static method in an interface.*/
+@SupportedAnnotationTypes("*")
+public class CreateBadClassFile extends AbstractProcessor {
+    public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv) {
+        if (++round == 1) {
+            ConstantPool cp = new ConstantPool(new CPInfo[] {
+                new CONSTANT_Utf8_info(""),                     //0
+                new CONSTANT_Utf8_info("Test"),                 //1
+                new CONSTANT_Class_info(null, 1),               //2
+                new CONSTANT_Utf8_info("java/lang/Object"),     //3
+                new CONSTANT_Class_info(null, 3),               //4
+                new CONSTANT_Utf8_info("test"),                 //5
+                new CONSTANT_Utf8_info("()V"),                  //6
+            });
+            ClassFile cf = new ClassFile(0xCAFEBABE,
+                          0,
+                          51,
+                          cp,
+                          new AccessFlags(AccessFlags.ACC_ABSTRACT |
+                                          AccessFlags.ACC_INTERFACE |
+                                          AccessFlags.ACC_PUBLIC),
+                          2,
+                          4,
+                          new int[0],
+                          new Field[0],
+                          new Method[] {
+                              //creating static method in 51.0 classfile:
+                              new Method(new AccessFlags(AccessFlags.ACC_PUBLIC |
+                                                         AccessFlags.ACC_STATIC),
+                                         5,
+                                         new Descriptor(6),
+                                         new Attributes(cp, new Attribute[0]))
+                          },
+                          new Attributes(cp, new Attribute[0]));
+            try {
+                JavaFileObject clazz = processingEnv.getFiler().createClassFile("Test");
+                try (OutputStream out = clazz.openOutputStream()) {
+                    new ClassWriter().write(cf, out);
+                }
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+        }
+        return false;
+    }
+
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    int round = 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/RepeatableAnnotationsNotSupported.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,32 @@
+/*
+ * 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
+ * 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.repeatable.annotations.not.supported.in.source
+// key: compiler.warn.source.no.bootclasspath
+// options: -source 7
+
+@interface Anno { }
+
+@Anno
+@Anno
+class RepeatableAnnotationsNotSupported { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/UnderscoreInLambdaExpression.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2013, 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.underscore.as.identifier.in.lambda
+public class UnderscoreInLambdaExpression {
+    java.util.function.Function<String,String> f = _ -> "x";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumAsIdentifier.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,16 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8025537
+ * @author  sogoel
+ * @summary enum keyword used as an identifier
+ * @compile/ref=EnumAsIdentifier4.out -XDrawDiagnostics -source 1.4 EnumAsIdentifier.java
+ * @compile/fail/ref=EnumAsIdentifier5.out -XDrawDiagnostics -source 1.5 EnumAsIdentifier.java
+ * @compile/fail/ref=EnumAsIdentifier.out -XDrawDiagnostics EnumAsIdentifier.java
+ */
+
+public class EnumAsIdentifier {
+
+    int enum = 0;
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumAsIdentifier.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,2 @@
+EnumAsIdentifier.java:13:9: compiler.err.enum.as.identifier
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumAsIdentifier4.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,6 @@
+- compiler.warn.source.no.bootclasspath: 1.4
+- compiler.warn.option.obsolete.source: 1.4
+- compiler.warn.option.obsolete.target: 1.4
+- compiler.warn.option.obsolete.suppression
+EnumAsIdentifier.java:13:9: compiler.warn.enum.as.identifier
+5 warnings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumAsIdentifier5.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,6 @@
+- compiler.warn.source.no.bootclasspath: 1.5
+- compiler.warn.option.obsolete.source: 1.5
+- compiler.warn.option.obsolete.suppression
+EnumAsIdentifier.java:13:9: compiler.err.enum.as.identifier
+1 error
+3 warnings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumMembersOrder.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,20 @@
+/**
+ * @test    /nodynamiccopyright/
+ * @bug     8025537 5028491
+ * @author  sogoel
+ * @summary enum constants should precede other enum members
+ * @compile/fail/ref=EnumMembersOrder.out -XDrawDiagnostics EnumMembersOrder.java
+ */
+
+enum Days {
+
+    Days(String d) { day = d; } // constructor
+
+    // enum constants
+    WEEKEND("SAT"),
+    WEEKDAY("MON");
+
+    private String day;
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumMembersOrder.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,7 @@
+EnumMembersOrder.java:11:16: compiler.err.expected: ')'
+EnumMembersOrder.java:11:17: compiler.err.expected3: ',', '}', ';'
+EnumMembersOrder.java:11:19: compiler.err.expected: '}'
+EnumMembersOrder.java:11:31: compiler.err.expected3: class, interface, enum
+EnumMembersOrder.java:17:13: compiler.err.expected3: class, interface, enum
+EnumMembersOrder.java:19:1: compiler.err.expected3: class, interface, enum
+6 errors
--- a/test/tools/javac/generics/OverrideBridge.java	Fri Oct 11 17:51:08 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, 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 6337171 6996415
- * @ignore 6996758: Investigate better override bridges strategy
- * @summary  javac should create bridge methods when type variable bounds restricted
- * @run main OverrideBridge
- */
-
-// fix, and test, has been disabled as a consequence of 6996415
-
-import java.io.*;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.ToolProvider;
-
-import com.sun.source.util.JavacTask;
-import com.sun.tools.classfile.ClassFile;
-import com.sun.tools.classfile.ConstantPoolException;
-import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
-import com.sun.tools.classfile.Method;
-
-public class OverrideBridge {
-
-    enum Implementation {
-        IMPLICIT(""),
-        EXPLICIT("@Override public abstract X m(X x);");
-
-        String impl;
-
-        Implementation(String impl) {
-            this.impl = impl;
-        }
-    }
-
-    static class JavaSource extends SimpleJavaFileObject {
-
-        final static String sourceStub =
-                        "abstract class A<X> {\n" +
-                        "   public abstract X m(X x);\n" +
-                        "}\n" +
-                        "interface I<X> {\n" +
-                        "X m(X x);\n" +
-                        "}\n" +
-                        "abstract class B<X extends B<X>> extends A<X> implements I<X> { #B }\n" +
-                        "abstract class C<X extends C<X>> extends B<X>  { #C }\n" +
-                        "abstract class D<X extends D<X>> extends C<X>  { #D }\n";
-
-        String source;
-
-        public JavaSource(Implementation implB, Implementation implC, Implementation implD) {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = sourceStub.replace("#B", implB.impl).replace("#C", implC.impl).replace("#D", implD.impl);
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
-    public static void main(String... args) throws Exception {
-        Map<ClassFile, List<Method>> refMembers =
-                compile(Implementation.EXPLICIT, Implementation.EXPLICIT, Implementation.EXPLICIT, "ref");
-        int i = 0;
-        for (Implementation implB : Implementation.values()) {
-            for (Implementation implC : Implementation.values()) {
-                for (Implementation implD : Implementation.values()) {
-                    Map<ClassFile, List<Method>> membersToCheck = compile(implB, implC, implD, "out_" + i++);
-                    check(refMembers, membersToCheck);
-                }
-            }
-        }
-    }
-
-    static String workDir = System.getProperty("user.dir");
-
-    static Map<ClassFile, List<Method>> compile(Implementation implB, Implementation implC, Implementation implD, String destPath) throws Exception {
-        File destDir = new File(workDir, destPath); destDir.mkdir();
-        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
-        JavaSource source = new JavaSource(implB, implC, implD);
-        JavacTask ct = (JavacTask)tool.getTask(null, null, null,
-                Arrays.asList("-d", destPath), null, Arrays.asList(source));
-        ct.generate();
-        Map<ClassFile, List<Method>> members = new HashMap<>();
-        addMembers(destDir, members);
-        return members;
-    }
-
-    static void addMembers(File destDir, Map<ClassFile, List<Method>> members) {
-        String[] names = { "B.class", "C.class", "D.class" };
-        try {
-            for (String name : names) {
-                File f = new File(destDir, name);
-                ClassFile cf = ClassFile.read(f);
-                members.put(cf, readMethod(cf, "m"));
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new Error("error reading classes");
-        }
-    }
-
-    static List<Method> readMethod(ClassFile cf, String name) throws ConstantPoolException {
-        List<Method> buf = new ArrayList<>();
-        for (Method m : cf.methods) {
-            if (m.getName(cf.constant_pool).equals(name)) {
-                buf.add(m);
-            }
-        }
-        return buf;
-    }
-
-    static void check(Map<ClassFile, List<Method>> refMembers, Map<ClassFile, List<Method>> membersToCheck) throws ConstantPoolException, InvalidDescriptor {
-        for (Map.Entry<ClassFile, List<Method>> ref : refMembers.entrySet()) {
-            ClassFile cRef = ref.getKey();
-            for (Method mRef : ref.getValue()) {
-                boolean ok = false;
-                for (Map.Entry<ClassFile, List<Method>> toCheck : membersToCheck.entrySet()) {
-                    ClassFile cToCheck = toCheck.getKey();
-                    for (Method mToCheck : toCheck.getValue()) {
-                        if (cRef.getName().equals(cToCheck.getName()) &&
-                                mRef.descriptor.getReturnType(cRef.constant_pool).equals(
-                                mToCheck.descriptor.getReturnType(cToCheck.constant_pool)) &&
-                                mRef.descriptor.getParameterTypes(cRef.constant_pool).equals(
-                                mToCheck.descriptor.getParameterTypes(cToCheck.constant_pool))) {
-                            ok = true;
-                        }
-                    }
-                }
-                if (!ok) {
-                    throw new AssertionError("Matching method descriptor for " + mRef.descriptor.getParameterTypes(cRef.constant_pool) + "not found");
-                }
-            }
-        }
-    }
-}
--- a/test/tools/javac/generics/typevars/6680106/T6680106.out	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/generics/typevars/6680106/T6680106.out	Mon Oct 28 18:30:14 2013 -0400
@@ -1,13 +1,7 @@
-T6680106.java:11:25: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:12:25: compiler.err.type.found.req: S[], (compiler.misc.type.req.class)
-T6680106.java:12:40: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:13:25: compiler.err.type.found.req: S[], (compiler.misc.type.req.class)
-T6680106.java:13:40: compiler.err.type.found.req: U[], (compiler.misc.type.req.class)
-T6680106.java:13:55: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:14:30: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:15:30: compiler.err.type.found.req: S[], (compiler.misc.type.req.class)
-T6680106.java:15:50: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-T6680106.java:16:30: compiler.err.type.found.req: S[], (compiler.misc.type.req.class)
-T6680106.java:16:50: compiler.err.type.found.req: U[], (compiler.misc.type.req.class)
-T6680106.java:16:70: compiler.err.type.found.req: T[], (compiler.misc.type.req.class)
-12 errors
+T6680106.java:11:14: compiler.err.cyclic.inheritance: T
+T6680106.java:12:14: compiler.err.cyclic.inheritance: T
+T6680106.java:13:14: compiler.err.cyclic.inheritance: T
+T6680106.java:14:14: compiler.err.cyclic.inheritance: T
+T6680106.java:15:14: compiler.err.cyclic.inheritance: T
+T6680106.java:16:14: compiler.err.cyclic.inheritance: T
+6 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/8012557/A.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+interface A {
+   default String u() { return "A"; }
+   default String name() {
+      SAM s = ()->u()+"A";
+      return s.m();
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/8012557/B.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+interface B {
+   default String u() { return "B"; }
+   default String name() {
+      SAM s = ()->u()+"B";
+      return s.m();
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/8012557/C.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+interface C {
+   default String u() { return "C"; }
+   default String name() {
+      SAM s = ()->u()+"C";
+      return s.m();
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/8012557/PrivateLambdas.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2013, 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 8012557
+ * @summary Check that 8012557 is fixed, that interface lambda
+ *          methods are private
+ * @author  Robert Field
+ * @compile SAM.java
+ * @compile A.java
+ * @compile B.java
+ * @compile C.java
+ * @run main PrivateLambdas
+ *
+ * Unless the lambda methods are private, this will fail with:
+ *  AbstractMethodError:
+ *        Conflicting default methods: A.lambda$0 B.lambda$0 C.lambda$0
+ */
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+interface X extends A, B, C {
+   default String u() { return " "; }
+   default String name() {
+      return A.super.name() + B.super.name() + C.super.name();
+   }
+}
+
+public class PrivateLambdas implements X {
+   public static void main(String[] args) throws Exception {
+
+      // Check that all the lambda methods are private instance synthetic
+      for (Class<?> k : new Class<?>[] { A.class, B.class, C.class }) {
+         Method[] methods = k.getDeclaredMethods();
+         int lambdaCount = 0;
+         for(Method m : methods) {
+            if (m.getName().startsWith("lambda$")) {
+               ++lambdaCount;
+               int mod = m.getModifiers();
+               if ((mod & Modifier.PRIVATE) == 0) {
+                  throw new Exception("Expected " + m + " to be private");
+               }
+               if (!m.isSynthetic()) {
+                  throw new Exception("Expected " + m + " to be synthetic");
+               }
+               if ((mod & Modifier.STATIC) != 0) {
+                  throw new Exception("Expected " + m + " to be instance method");
+               }
+            }
+         }
+         if (lambdaCount == 0) {
+            throw new Exception("Expected at least one lambda method");
+         }
+      }
+
+      /*
+       * Unless the lambda methods are private, this will fail with:
+       *  AbstractMethodError:
+       *        Conflicting default methods: A.lambda$0 B.lambda$0 C.lambda$0
+       */
+      X x = new PrivateLambdas();
+      if (!x.name().equals(" A B C")) {
+         throw new Exception("Expected ' A B C' got: " + x.name());
+      }
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/8012557/SAM.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+interface SAM {
+   String m();
+}
--- a/test/tools/javac/lambda/8016081/T8016081.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/lambda/8016081/T8016081.java	Mon Oct 28 18:30:14 2013 -0400
@@ -32,7 +32,7 @@
     interface fint { int get(); }
 
     @interface atype {
-        fint fld = ()->( fld == null ?0 : 1);
+        fint fld = ()->1;
     }
 
     @atype class T {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/8016320/IllegalBridgeModifier.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2013, 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 8016320
+ * @summary Check that 8016320 is fixed,
+ *          that bridges have valid modifier bits
+ * @author  Robert Field
+ * @run main IllegalBridgeModifier
+ */
+
+interface SAM {
+    int m();
+}
+
+interface SuperI {
+    public default int foo() { return 1234; }
+}
+
+interface I extends SuperI {
+}
+
+interface T extends I {
+    public default SAM boo() { return I.super::foo; }
+}
+
+public class IllegalBridgeModifier {
+    public static void main(String argv[])throws Exception {
+        T t = new T(){};
+        if (t.boo().m() != 1234) {
+            throw new Exception("Failed test");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/8024497/CrashUsingReturningThisRefLambdaFromDefaultMetTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013, 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 8024497
+ * @summary crash returning this-referencing lambda from default method
+ * @compile CrashUsingReturningThisRefLambdaFromDefaultMetTest.java
+ */
+
+interface SuperInterface {}
+
+interface CrashUsingReturningThisRefLambdaFromDefaultMetTest extends SuperInterface {
+    default Runnable getAction() {
+        return () -> {
+            SuperInterface.super.getClass();
+            this.getClass();
+            CrashUsingReturningThisRefLambdaFromDefaultMetTest.this.getClass();
+        };
+    }
+}
--- a/test/tools/javac/lambda/LambdaExpr13.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/lambda/LambdaExpr13.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,14 @@
  * @bug 8003280
  * @summary Add lambda tests
  *  check that recursive lambda (through field ref) is accepted in all contexts
+ *  but field initialization
  * @compile LambdaExpr13.java
  */
 
 class LambdaExpr13 {
 
-    Runnable ir = () -> { ir.run(); };;
-    static Runnable sr = () -> { sr.run(); };
+    Runnable ir;
+    static Runnable sr;
 
     { ir = () -> { ir.run(); }; }
     static { sr = () -> { sr.run(); }; }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/LocalVariableTable.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2013, 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 8025998 8026749
+ * @summary Missing LV table in lambda bodies
+ * @compile -g LocalVariableTable.java
+ * @run main LocalVariableTable
+ */
+
+import java.io.*;
+import java.lang.annotation.*;
+import java.util.*;
+import com.sun.tools.classfile.*;
+
+/*
+ * The test checks that a LocalVariableTable attribute is generated for the
+ * method bodies representing lambda expressions, and checks that the expected
+ * set of entries is found in the attribute.
+ *
+ * Since the bug was about missing entries in the LVT, not malformed entries,
+ * the test is not intended to be a detailed test of the contents of each
+ * LocalVariableTable entry: it is assumed that if a entry is present, it
+ * will have the correct contents.
+ *
+ * The test looks for test cases represented by nested classes whose
+ * name begins with "Lambda".  Each such class contains a lambda expression
+ * that will mapped into a lambda method, and because the test is compiled
+ * with -g, these methods should have a LocalVariableTable.  The set of
+ * expected names in the LVT is provided in an annotation on the class for
+ * the test case.
+ */
+public class LocalVariableTable {
+    public static void main(String... args) throws Exception {
+        new LocalVariableTable().run();
+    }
+
+    void run() throws Exception {
+        // the declared classes are returned in an unspecified order,
+        // so for neatness, sort them by name before processing them
+        Class<?>[] classes = getClass().getDeclaredClasses();
+        Arrays.sort(classes, (c1, c2) -> c1.getName().compareTo(c2.getName()));
+
+        for (Class<?> c : classes) {
+            if (c.getSimpleName().startsWith("Lambda"))
+                check(c);
+        }
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+    }
+
+    /** Check an individual test case. */
+    void check(Class<?> c) throws Exception {
+        System.err.println("Checking " + c.getSimpleName());
+
+        Expect expect = c.getAnnotation(Expect.class);
+        if (expect == null) {
+            error("@Expect not found for class " + c.getSimpleName());
+            return;
+        }
+
+        ClassFile cf = ClassFile.read(getClass().getResource(c.getName() + ".class").openStream());
+        Method m = getLambdaMethod(cf);
+        if (m == null) {
+            error("lambda method not found");
+            return;
+        }
+
+        Code_attribute code = (Code_attribute) m.attributes.get(Attribute.Code);
+        if (code == null) {
+            error("Code attribute not found");
+            return;
+        }
+
+        LocalVariableTable_attribute lvt =
+                (LocalVariableTable_attribute) code.attributes.get(Attribute.LocalVariableTable);
+        if (lvt == null) {
+            error("LocalVariableTable attribute not found");
+            return;
+        }
+
+        Set<String> foundNames = new LinkedHashSet<>();
+        for (LocalVariableTable_attribute.Entry e: lvt.local_variable_table) {
+            foundNames.add(cf.constant_pool.getUTF8Value(e.name_index));
+        }
+
+        Set<String> expectNames = new LinkedHashSet<>(Arrays.asList(expect.value()));
+        if (!foundNames.equals(expectNames)) {
+            Set<String> foundOnly = new LinkedHashSet<>(foundNames);
+            foundOnly.removeAll(expectNames);
+            for (String s: foundOnly)
+                error("Unexpected name found: " + s);
+            Set<String> expectOnly = new LinkedHashSet<>(expectNames);
+            expectOnly.removeAll(foundNames);
+            for (String s: expectOnly)
+                error("Expected name not found: " + s);
+        }
+    }
+
+    /** Get a method whose name begins "lambda$...". */
+    Method getLambdaMethod(ClassFile cf) throws ConstantPoolException {
+        for (Method m: cf.methods) {
+            if (m.getName(cf.constant_pool).startsWith("lambda$"))
+                return m;
+        }
+        return null;
+    }
+
+    /** Report an error. */
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+
+    /**
+     * Annotation used to provide the set of names expected in the LVT attribute.
+     */
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface Expect {
+        String[] value();
+    }
+
+    /** Functional interface with nullary method. */
+    interface Run0 {
+        public void run();
+    }
+
+    /** Functional interface with 1-ary method. */
+    interface Run1 {
+        public void run(int a0);
+    }
+
+    /** Functional interface with 2-ary method. */
+    interface Run2 {
+        public void run(int a0, int a1);
+    }
+
+    /*
+     * ---------- Test cases ---------------------------------------------------
+     */
+
+    @Expect({ "x" })
+    static class Lambda_Args0_Local1 {
+        Run0 r = () -> { int x = 0; };
+    }
+
+    @Expect({ "x", "this" })
+    static class Lambda_Args0_Local1_this {
+        int v;
+        Run0 r = () -> { int x = v; };
+    }
+
+    @Expect({ "a" })
+    static class Lambda_Args1_Local0 {
+        Run1 r = (a) -> { };
+    }
+
+    @Expect({ "a", "x" })
+    static class Lambda_Args1_Local1 {
+        Run1 r = (a) -> { int x = a; };
+    }
+
+    @Expect({ "a", "x" })
+    static class Lambda_Args1_Local1_Captured1 {
+        void m() {
+            int v = 0;
+            Run1 r = (a) -> { int x = a + v; };
+        }
+    }
+
+    @Expect({ "a1", "a2", "x1", "x2", "this" })
+    static class Lambda_Args2_Local2_Captured2_this {
+        int v;
+        void m() {
+            int v1 = 0;
+            int v2 = 0;
+            Run2 r = (a1, a2) -> {
+                int x1 = a1 + v1 + v;
+                int x2 = a2 + v2 + v;
+            };
+        }
+    }
+
+    @Expect({ "e" })
+    static class Lambda_Try_Catch {
+        private static Runnable asUncheckedRunnable(Closeable c) {
+            return () -> {
+                try {
+                    c.close();
+                } catch (IOException e) {
+                   throw new UncheckedIOException(e);
+                }
+            };
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8024809/SelfInitializerInLambdaTesta.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2013, 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 8024809
+ * @summary javac, some lambda programs are rejected by flow analysis
+ * @compile/fail/ref=SelfInitializerInLambdaTesta.out -XDrawDiagnostics SelfInitializerInLambdaTesta.java
+ */
+
+public class SelfInitializerInLambdaTesta {
+
+    final Runnable r1 = ()->System.out.println(r1);
+
+    final Object lock = new Object();
+
+    final Runnable r2 = ()->{
+        System.out.println(r2);
+        synchronized (lock){}
+    };
+
+    final Runnable r3 = ()->{
+        synchronized (lock){
+            System.out.println(r3);
+        }
+    };
+
+    final Runnable r4 = ()->{
+        System.out.println(r4);
+    };
+
+    interface SAM {
+        int m(String s);
+    }
+
+    final SAM s1 = (String s)->{
+        System.out.println(s + s1.toString());
+        return 0;
+    };
+
+    final SAM s2 = (s)->{
+        System.out.println(s + s2.toString());
+        return 0;
+    };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8024809/SelfInitializerInLambdaTesta.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,7 @@
+SelfInitializerInLambdaTesta.java:33:48: compiler.err.illegal.self.ref
+SelfInitializerInLambdaTesta.java:38:28: compiler.err.illegal.self.ref
+SelfInitializerInLambdaTesta.java:44:32: compiler.err.illegal.self.ref
+SelfInitializerInLambdaTesta.java:49:28: compiler.err.illegal.self.ref
+SelfInitializerInLambdaTesta.java:57:32: compiler.err.illegal.self.ref
+SelfInitializerInLambdaTesta.java:62:32: compiler.err.illegal.self.ref
+6 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8024809/SelfInitializerInLambdaTestb.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2013, 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 8024809
+ * @summary javac, some lambda programs are rejected by flow analysis
+ * @compile/fail/ref=SelfInitializerInLambdaTestb.out -XDrawDiagnostics SelfInitializerInLambdaTestb.java
+ */
+
+public class SelfInitializerInLambdaTestb {
+
+    final Runnable r1;
+
+    final Runnable r2 = ()-> System.out.println(r1);
+
+    SelfInitializerInLambdaTestb() {
+        r1 = ()->System.out.println(r1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8024809/SelfInitializerInLambdaTestb.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,3 @@
+SelfInitializerInLambdaTestb.java:35:49: compiler.err.var.might.not.have.been.initialized: r1
+SelfInitializerInLambdaTestb.java:38:37: compiler.err.var.might.not.have.been.initialized: r1
+2 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8024947/PotentiallyAmbiguousWarningTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2013, 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 8024947
+ * @summary javac should issue the potentially ambiguous overload warning only
+ * where the problem appears
+ * @compile/fail/ref=PotentiallyAmbiguousWarningTest.out -XDrawDiagnostics -Werror -Xlint:overloads PotentiallyAmbiguousWarningTest.java
+ * @compile PotentiallyAmbiguousWarningTest.java
+ */
+
+import java.util.function.*;
+
+public interface PotentiallyAmbiguousWarningTest {
+
+    //a warning should be fired
+    interface I1 {
+        void foo(Consumer<Integer> c);
+        void foo(IntConsumer c);
+    }
+
+    //a warning should be fired
+    class C1 {
+        void foo(Consumer<Integer> c) { }
+        void foo(IntConsumer c) { }
+    }
+
+    interface I2 {
+        void foo(Consumer<Integer> c);
+    }
+
+    //a warning should be fired, J1 is provoking the issue
+    interface J1 extends I2 {
+        void foo(IntConsumer c);
+    }
+
+    //no warning here, the issue is introduced in I1
+    interface I3 extends I1 {}
+
+    //no warning here, the issue is introduced in I1. I4 is just overriding an existing method
+    interface I4 extends I1 {
+        void foo(IntConsumer c);
+    }
+
+    class C2 {
+        void foo(Consumer<Integer> c) { }
+    }
+
+    //a warning should be fired, D1 is provoking the issue
+    class D1 extends C2 {
+        void foo(IntConsumer c) { }
+    }
+
+    //a warning should be fired, C3 is provoking the issue
+    class C3 implements I2 {
+        public void foo(Consumer<Integer> c) { }
+        public void foo(IntConsumer c) { }
+    }
+
+    //no warning here, the issue is introduced in C1
+    class C4 extends C1 {}
+
+    //no warning here, the issue is introduced in C1. C5 is just overriding an existing method
+    class C5 extends C1 {
+        void foo(IntConsumer c) {}
+    }
+
+    interface I5<T> {
+        void foo(T c);
+    }
+
+    //a warning should be fired, J2 is provoking the issue
+    interface J2 extends I5<IntConsumer> {
+        void foo(Consumer<Integer> c);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8024947/PotentiallyAmbiguousWarningTest.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,9 @@
+PotentiallyAmbiguousWarningTest.java:39:14: compiler.warn.potentially.ambiguous.overload: foo(java.util.function.Consumer<java.lang.Integer>), PotentiallyAmbiguousWarningTest.I1, foo(java.util.function.IntConsumer), PotentiallyAmbiguousWarningTest.I1
+PotentiallyAmbiguousWarningTest.java:45:14: compiler.warn.potentially.ambiguous.overload: foo(java.util.function.Consumer<java.lang.Integer>), PotentiallyAmbiguousWarningTest.C1, foo(java.util.function.IntConsumer), PotentiallyAmbiguousWarningTest.C1
+PotentiallyAmbiguousWarningTest.java:55:14: compiler.warn.potentially.ambiguous.overload: foo(java.util.function.IntConsumer), PotentiallyAmbiguousWarningTest.J1, foo(java.util.function.Consumer<java.lang.Integer>), PotentiallyAmbiguousWarningTest.I2
+PotentiallyAmbiguousWarningTest.java:72:14: compiler.warn.potentially.ambiguous.overload: foo(java.util.function.IntConsumer), PotentiallyAmbiguousWarningTest.D1, foo(java.util.function.Consumer<java.lang.Integer>), PotentiallyAmbiguousWarningTest.C2
+PotentiallyAmbiguousWarningTest.java:78:21: compiler.warn.potentially.ambiguous.overload: foo(java.util.function.IntConsumer), PotentiallyAmbiguousWarningTest.C3, foo(java.util.function.Consumer<java.lang.Integer>), PotentiallyAmbiguousWarningTest.C3
+PotentiallyAmbiguousWarningTest.java:95:14: compiler.warn.potentially.ambiguous.overload: foo(java.util.function.Consumer<java.lang.Integer>), PotentiallyAmbiguousWarningTest.J2, foo(T), PotentiallyAmbiguousWarningTest.I5
+- compiler.err.warnings.and.werror
+1 error
+6 warnings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8025290/ExplicitVSImplicitLambdaTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2013, 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 8025290
+ * @summary javac implicit versus explicit lambda compilation error
+ * @compile ExplicitVSImplicitLambdaTest.java
+ */
+
+import java.util.function.*;
+
+public class ExplicitVSImplicitLambdaTest {
+    private void test()
+    {
+        /* in the explicit case "e" is inferred to String so we can use a String
+         * only method.
+         */
+        MyComparator.mycomparing1((String e) -> e.concat(""));
+        MyComparator.mycomparing2((String e) -> e.concat(""));
+        MyComparator.mycomparing3((String e) -> e.concat(""));
+        MyComparator.mycomparing4((String e) -> e.concat(""));
+
+        /* in the implicit case "e" is inferred to Object so toString() is OK.
+         */
+        MyComparator.mycomparing1((e) -> e.toString());
+        MyComparator.mycomparing2((e) -> e.toString());
+        MyComparator.mycomparing3((e) -> e.toString());
+        MyComparator.mycomparing4((e) -> e.toString());
+    }
+}
+
+interface MyComparator<T> {
+    public static <T, U extends Comparable<? super U>> MyComparator<T> mycomparing1(
+            Function<? super T, ? extends U> keyExtractor) {
+        return null;
+    }
+
+    public static <T, U extends Comparable<? super U>> MyComparator<T> mycomparing2(
+            Function<? super T, ? super U> keyExtractor) {
+        return null;
+    }
+
+    public static <T, U extends Comparable<? super U>> MyComparator<T> mycomparing3(
+            Function<? extends T, ? extends U> keyExtractor) {
+        return null;
+    }
+
+    public static <T, U extends Comparable<? super U>> MyComparator<T> mycomparing4(
+            Function<? extends T, ? super U> keyExtractor) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/T8025816/CrashMethodReferenceWithSiteTypeVarTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2013, 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 8025816
+ * @summary Compiler crash when default method call with method reference
+ * @compile CrashMethodReferenceWithSiteTypeVarTest.java
+ */
+
+import java.util.Collection;
+import java.util.Comparator;
+
+public class CrashMethodReferenceWithSiteTypeVarTest {
+    public <T> void m1(Collection<T> c, Comparator<T> comp) {}
+
+    public <T extends Comparable> void m2(Collection<T> c) {
+        m1(c, T::compareTo);
+    }
+}
--- a/test/tools/javac/lambda/TargetType58.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/lambda/TargetType58.java	Mon Oct 28 18:30:14 2013 -0400
@@ -35,7 +35,7 @@
 class TargetType58 {
 
     void test(List<Integer> li) {
-        g(li, s -> s.substream(200), Collections.emptyList());
+        g(li, s -> s.skip(200), Collections.emptyList());
     }
 
     <T, U, S_OUT extends Stream<U>,
--- a/test/tools/javac/lambda/TestSelfRef.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/lambda/TestSelfRef.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, 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
@@ -29,7 +29,6 @@
  *          consistently w.r.t. local inner classes
  */
 
-import com.sun.source.util.JavacTask;
 import java.net.URI;
 import java.util.Arrays;
 import javax.tools.Diagnostic;
@@ -38,6 +37,7 @@
 import javax.tools.SimpleJavaFileObject;
 import javax.tools.StandardJavaFileManager;
 import javax.tools.ToolProvider;
+import com.sun.source.util.JavacTask;
 
 public class TestSelfRef {
 
@@ -176,10 +176,16 @@
         check();
     }
 
-    void check() {
+    boolean isErrorExpected() {
         //illegal forward ref
-        boolean errorExpected = ik.inMethodContext(sk) &&
-                (rk.selfRef || rk.forwardRef);
+        boolean result = ik.inMethodContext(sk) && (rk.selfRef || rk.forwardRef);
+        result |= (rk == RefKind.SELF_LAMBDA || rk == RefKind.FORWARD_LAMBDA);
+        return result;
+    }
+
+    void check() {
+        checkCount++;
+        boolean errorExpected = isErrorExpected();
         if (diagChecker.errorFound != errorExpected) {
             throw new Error("invalid diagnostics for source:\n" +
                 source.getCharContent(true) +
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/TestSerializedLambdaNameStability.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2013, 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 8023668
+ * @summary Desugar serializable lambda bodies using more robust naming scheme
+ * @library /tools/javac/lib
+ * @build ToolBox
+ * @run main TestSerializedLambdaNameStability
+ */
+
+import java.io.*;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.file.*;
+
+public class TestSerializedLambdaNameStability {
+
+    final ClassLoader writingClassLoader;
+    final ClassLoader clonedClassLoader;
+    final ClassLoader checkingClassLoader;
+
+    TestSerializedLambdaNameStability()  {
+        writingClassLoader = new TestClassLoader("before");
+        clonedClassLoader = new TestClassLoader("before");
+        checkingClassLoader = new TestClassLoader("after");
+    }
+
+    public static void main(String... args) throws Exception {
+        new TestSerializedLambdaNameStability().doit("NameOfCapturedArgs", true);
+        new TestSerializedLambdaNameStability().doit("TypesOfCapturedArgs", true);
+        new TestSerializedLambdaNameStability().doit("OrderOfCapturedArgs", true);
+        new TestSerializedLambdaNameStability().doit("VariableAssignmentTarget", false);
+        new TestSerializedLambdaNameStability().doit("TargetName", true);
+        new TestSerializedLambdaNameStability().doit("TargetType", true);
+    }
+
+    public void doit(String name, boolean expectFail) throws Exception {
+        String iName = "I" + name;
+        String testName = "TEST" + name;
+        Class<?> kw = writingClassLoader.loadClass(testName);
+        Object instw = getInstance(kw);
+        Method mw = getMethod(kw, "write", ObjectOutput.class);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (ObjectOutput out = new ObjectOutputStream(baos)) {
+            mw.invoke(instw, out);
+        }
+        byte[] ser = baos.toByteArray();
+
+        // Read and check clone
+        readCheck(iName, testName, clonedClassLoader, ser);
+        System.err.printf("cloned test readCheck %s\n", testName);
+
+        // Read and check other
+        if (expectFail) {
+            try {
+                readCheck(iName, testName, checkingClassLoader, ser);
+            } catch (InvocationTargetException ite) {
+                Throwable underlying = ite;
+                while (underlying != null && !(underlying instanceof IllegalArgumentException)) {
+                    underlying = underlying.getCause();
+                }
+                if (underlying != null) {
+                    if (underlying.getMessage().contains("deserialization")) {
+                        System.err.printf("PASS: other test %s got expected exception %s\n", testName, underlying);
+                        return;
+                    }
+                }
+                System.err.printf("FAIL: other test %s got unexpected exception %s\n", testName, ite);
+                throw new Exception("unexpected exception ", ite);
+            }
+            System.err.printf("FAIL: other test %s expected an exception", testName);
+            throw new Exception("expected an exception" + testName);
+        } else {
+            readCheck(iName, testName, checkingClassLoader, ser);
+            System.err.printf("PASS: other test %s readCheck\n", testName);
+        }
+    }
+
+    void readCheck(String iName, String testName, ClassLoader loader, byte[] ser) throws Exception {
+        Class<?> k = loader.loadClass(testName);
+        Object inst = getInstance(k);
+        Method mrc = getMethod(k, "readCheck", ObjectInput.class);
+        ByteArrayInputStream bais = new ByteArrayInputStream(ser);
+        try (ObjectInput in = new ObjectInputStream(bais)) {
+            mrc.invoke(inst, in);
+        }
+    }
+
+    Method getMethod(Class<?> k, String name, Class<?> argTypes) throws Exception {
+        Method meth = k.getDeclaredMethod(name, argTypes);
+        meth.setAccessible(true);
+        return meth;
+    }
+
+    Object getInstance(Class<?> k) throws Exception {
+        Constructor<?> cons = k.getConstructors()[0];
+        cons.setAccessible(true);
+        return cons.newInstance();
+    }
+
+    static class TestClassLoader extends ClassLoader  {
+        static final String compiledDir = System.getProperty("user.dir");
+        static final String sourceBaseDir = System.getProperty("test.src");
+
+        final String context;
+
+        public TestClassLoader(String context) {
+            super();
+            this.context = context;
+        }
+
+        @Override
+        public Class findClass(String name) throws ClassNotFoundException {
+            byte[] b;
+
+            try {
+                b = loadClassData(name);
+            } catch (Throwable th) {
+                // th.printStackTrace();
+                throw new ClassNotFoundException("Loading error", th);
+            }
+            return defineClass(name, b, 0, b.length);
+        }
+
+        private byte[] loadClassData(String name) throws Exception {
+            String srcName;
+            if (name.startsWith("TEST"))
+                srcName = name;
+            else if (name.startsWith("I"))
+                srcName = "TEST" + name.substring(1);
+            else
+                throw new Exception("Did not expect to load " + name);
+            Path srcFile = Paths.get(sourceBaseDir, context, srcName + ".java");
+            String testSource = new String(Files.readAllBytes(srcFile));
+            ToolBox.JavaToolArgs javacSuccessArgs =
+                    new ToolBox.JavaToolArgs().setSources(testSource);
+            ToolBox.javac(javacSuccessArgs);
+            Path cfFile = Paths.get(compiledDir, name + ".class");
+            byte[] bytes = Files.readAllBytes(cfFile);
+            return bytes;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/after/TESTNameOfCapturedArgs.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface INameOfCapturedArgs extends Serializable {
+    int get();
+}
+
+class TESTNameOfCapturedArgs {
+
+    public TESTNameOfCapturedArgs() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        int y = 44;
+        INameOfCapturedArgs res = () -> y;
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        INameOfCapturedArgs lam = (INameOfCapturedArgs) in.readObject();
+        int val = lam.get();
+        if (val != 44) {
+            throw new IllegalArgumentException("Expected 44");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/after/TESTOrderOfCapturedArgs.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface IOrderOfCapturedArgs extends Serializable {
+    String get();
+}
+
+class TESTOrderOfCapturedArgs {
+
+    public TESTOrderOfCapturedArgs() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        String a = "fu";
+        String b = "bar";
+        IOrderOfCapturedArgs res = () -> b + a;
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        IOrderOfCapturedArgs lam = (IOrderOfCapturedArgs) in.readObject();
+        Object val = lam.get();
+        if (!val.equals("fubar")) {
+            throw new IllegalArgumentException("Expected 'fubar'");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/after/TESTTargetName.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface ITargetName extends Serializable {
+    String get();
+}
+
+class TESTTargetName {
+
+    public TESTTargetName() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        ITargetName resist = () -> "fubar";
+        out.writeObject(resist);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        ITargetName lam = (ITargetName) in.readObject();
+        Object val = lam.get();
+        if (!val.equals("fubar")) {
+            throw new IllegalArgumentException("Expected 'fubar'");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/after/TESTTargetType.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+import java.util.function.*;
+
+class TESTTargetType {
+
+    public TESTTargetType() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        Object res = (Predicate<String> & Serializable) ((str) -> str.length() > 3);
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        in.readObject();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/after/TESTTypesOfCapturedArgs.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface ITypesOfCapturedArgs extends Serializable {
+    Object get();
+}
+
+class TESTTypesOfCapturedArgs {
+
+    public TESTTypesOfCapturedArgs() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        Object x = "hi";
+        ITypesOfCapturedArgs res = () -> x;
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        ITypesOfCapturedArgs lam = (ITypesOfCapturedArgs) in.readObject();
+        Object val = lam.get();
+        if (!val.equals("hi")) {
+            throw new IllegalArgumentException("Expected 'hi'");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/after/TESTVariableAssignmentTarget.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface IVariableAssignmentTarget extends Serializable {
+    String get();
+}
+
+class TESTVariableAssignmentTarget {
+
+    public TESTVariableAssignmentTarget() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        IVariableAssignmentTarget res2 = () -> "bar";
+        IVariableAssignmentTarget res1 = () -> "fu";
+        out.writeObject(res1);
+        out.writeObject(res2);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        IVariableAssignmentTarget lam = (IVariableAssignmentTarget) in.readObject();
+        Object val = lam.get();
+        if (!val.equals("fu")) {
+            throw new IllegalArgumentException("Expected 'fu'");
+        }
+        lam = (IVariableAssignmentTarget) in.readObject();
+        val = lam.get();
+        if (!val.equals("bar")) {
+            throw new IllegalArgumentException("Expected 'bar'");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/before/TESTNameOfCapturedArgs.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface INameOfCapturedArgs extends Serializable {
+    int get();
+}
+
+class TESTNameOfCapturedArgs {
+
+    public TESTNameOfCapturedArgs() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        int x = 44;
+        INameOfCapturedArgs res = () -> x;
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        INameOfCapturedArgs lam = (INameOfCapturedArgs) in.readObject();
+        int val = lam.get();
+        if (val != 44) {
+            throw new IllegalArgumentException("Expected 44");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/before/TESTOrderOfCapturedArgs.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface IOrderOfCapturedArgs extends Serializable {
+    String get();
+}
+
+class TESTOrderOfCapturedArgs {
+
+    public TESTOrderOfCapturedArgs() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        String a = "fu";
+        String b = "bar";
+        IOrderOfCapturedArgs res = () -> a + b;
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        IOrderOfCapturedArgs lam = (IOrderOfCapturedArgs) in.readObject();
+        Object val = lam.get();
+        if (!val.equals("fubar")) {
+            throw new IllegalArgumentException("Expected 'fubar'");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/before/TESTTargetName.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface ITargetName extends Serializable {
+    String get();
+}
+
+class TESTTargetName {
+
+    public TESTTargetName() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        ITargetName res = () -> "fubar";
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        ITargetName lam = (ITargetName) in.readObject();
+        Object val = lam.get();
+        if (!val.equals("fubar")) {
+            throw new IllegalArgumentException("Expected 'fubar'");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/before/TESTTargetType.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+import java.util.function.*;
+
+class TESTTargetType {
+
+    public TESTTargetType() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        Object res = (Function<String, Boolean> & Serializable) ((str) -> str.length() > 3);
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        in.readObject();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/before/TESTTypesOfCapturedArgs.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface ITypesOfCapturedArgs extends Serializable {
+    Object get();
+}
+
+class TESTTypesOfCapturedArgs {
+
+    public TESTTypesOfCapturedArgs() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        String x = "hi";
+        ITypesOfCapturedArgs res = () -> x;
+        out.writeObject(res);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        ITypesOfCapturedArgs lam = (ITypesOfCapturedArgs) in.readObject();
+        Object val = lam.get();
+        if (!val.equals("hi")) {
+            throw new IllegalArgumentException("Expected 'hi'");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/lambdaNaming/before/TESTVariableAssignmentTarget.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+
+interface IVariableAssignmentTarget extends Serializable {
+    String get();
+}
+
+class TESTVariableAssignmentTarget {
+
+    public TESTVariableAssignmentTarget() {
+    }
+
+    public void write(ObjectOutput out) throws IOException {
+        IVariableAssignmentTarget res1 = () -> "fu";
+        IVariableAssignmentTarget res2 = () -> "bar";
+        out.writeObject(res1);
+        out.writeObject(res2);
+    }
+
+    public void readCheck(ObjectInput in) throws Exception {
+        IVariableAssignmentTarget lam = (IVariableAssignmentTarget) in.readObject();
+        Object val = lam.get();
+        if (!val.equals("fu")) {
+            throw new IllegalArgumentException("Expected 'fu'");
+        }
+        lam = (IVariableAssignmentTarget) in.readObject();
+        val = lam.get();
+        if (!val.equals("bar")) {
+            throw new IllegalArgumentException("Expected 'bar'");
+        }
+    }
+}
--- a/test/tools/javac/lambda/methodReference/BridgeMethod.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/lambda/methodReference/BridgeMethod.java	Mon Oct 28 18:30:14 2013 -0400
@@ -108,9 +108,10 @@
         System.out.println("methods in SAM conversion of N:");
         for(Method m : methods) {
             System.out.println(m.toGenericString());
-            assertTrue(m.getName().equals("m"));
-            Class<?> returnType = m.getReturnType();
-            assertTrue(types.remove(returnType.getName()));
+            if (m.getName().equals("m")) {
+                Class<?> returnType = m.getReturnType();
+                assertTrue(types.remove(returnType.getName()));
+            }
         }
         assertTrue(types.size() == 1); //there's a bridge
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/privateMethodReferences/MethodInvoker.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013, 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 8022720
+ * @summary private method should be accessible (nested classes)
+ * @run main MethodInvoker
+ */
+
+interface MyFunctionalInterface1 {
+    int invokeMethodReference();
+}
+
+public class MethodInvoker {
+    public static void main(String[] args) throws Exception {
+        MethodInvoker.invoke();
+        System.out.println("Passed!");
+    }
+    public static void invoke() throws Exception {
+        MethodSupplier ms = new MethodSupplier();
+        MyFunctionalInterface1 fi = ms::m;
+        if (fi.invokeMethodReference() != 123) {
+            throw new Exception();
+        }
+    }
+    static class MethodSupplier {
+        private int m() {
+            return 123;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/privateMethodReferences/MethodSupplier.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013, 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 8022720
+ * @summary private method should be accessible (nested classes)
+ * @run main MethodSupplier
+ */
+
+interface MyFunctionalInterface2 {
+    int invokeMethodReference();
+}
+
+public class MethodSupplier {
+    public static void main(String[] args) throws Exception {
+        MethodInvoker.invoke();
+        System.out.println("Passed!");
+    }
+    private int m() {
+        return 4321;
+    }
+    static class MethodInvoker {
+        public static void invoke() throws Exception {
+            MethodSupplier ms = new MethodSupplier();
+            MyFunctionalInterface2 fi = ms::m;
+            if (fi.invokeMethodReference() != 4321) {
+                throw new Exception();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/privateMethodReferences/ThirdClass.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2013, 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 8022720
+ * @summary private method should be accessible (nested classes)
+ * @run main ThirdClass
+ */
+
+interface MyFunctionalInterface3 {
+    int invokeMethodReference();
+}
+
+public class ThirdClass {
+    public static void main(String[] args) throws Exception {
+        MethodInvoker.invoke();
+        System.out.println("Passed!");
+    }
+    static class MethodSupplier {
+        private int m() {
+            return 999;
+        }
+    }
+
+    static class MethodInvoker {
+        public static void invoke() throws Exception {
+            MethodSupplier ms = new MethodSupplier();
+            MyFunctionalInterface3 fi = ms::m;
+            if (fi.invokeMethodReference() != 999) {
+                throw new Exception();
+            }
+        }
+    }
+}
--- a/test/tools/javac/lambdaShapes/org/openjdk/tests/separate/TestHarness.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/lambdaShapes/org/openjdk/tests/separate/TestHarness.java	Mon Oct 28 18:30:14 2013 -0400
@@ -300,7 +300,7 @@
             if (verboseLocal.get() == Boolean.TRUE) {
                 System.out.println(e.getCause());
             }
-            assertEquals(e.getCause().getClass(), exceptionType);
+            assertTrue(exceptionType.isAssignableFrom(e.getCause().getClass()));
         }
         compiler.cleanup();
     }
--- a/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, 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
@@ -255,7 +255,7 @@
      * interface J { default int m() { return 88; } }
      * class C implements I, J {}
      *
-     * TEST: C c = new C(); c.m() throws AME
+     * TEST: C c = new C(); c.m() throws ICCE
      */
     public void testConflict() {
         // debugTest();
@@ -263,7 +263,7 @@
         Interface J = new Interface("J", DefaultMethod.std("88"));
         Class C = new Class("C", I, J);
 
-        assertThrows(AbstractMethodError.class, C);
+        assertThrows(IncompatibleClassChangeError.class, C);
     }
 
     /**
@@ -271,14 +271,14 @@
      * interface J { default int m() { return 88; } }
      * class C implements I, J {}
      *
-     * TEST: C c = new C(); c.m() throws AME
+     * TEST: C c = new C(); c.m() == 88
      */
     public void testAmbiguousReabstract() {
         Interface I = new Interface("I", AbstractMethod.std());
         Interface J = new Interface("J", DefaultMethod.std("88"));
         Class C = new Class("C", I, J);
 
-        assertThrows(AbstractMethodError.class, C);
+        assertInvokeVirtualEquals(88, C);
     }
 
     /**
@@ -555,8 +555,8 @@
      * interface I extends J, K { int m() default { J.super.m(); } }
      * class C implements I {}
      *
-     * TEST: C c = new C(); c.m() throws AME
-     * TODO: add case for K k = new C(); k.m() throws AME
+     * TEST: C c = new C(); c.m() throws ICCE
+     * TODO: add case for K k = new C(); k.m() throws ICCE
      */
     public void testSuperConflict() {
         // debugTest();
@@ -571,7 +571,7 @@
         I.addCompilationDependency(Jstub.findMethod(stdMethodName));
         Class C = new Class("C", I);
 
-        assertThrows(AbstractMethodError.class, C);
+        assertThrows(IncompatibleClassChangeError.class, C);
     }
 
     /**
@@ -579,8 +579,8 @@
      * interface J extends I { default int m() { return 55; } }
      * class C implements I, J { public int m() { return I.super.m(); } }
      *
-     * TEST: C c = new C(); c.m() throws AME
-     * TODO: add case for J j = new C(); j.m() throws AME
+     * TEST: C c = new C(); c.m() == 99
+     * TODO: add case for J j = new C(); j.m() == ???
      */
     public void testSuperDisqual() {
         Interface I = new Interface("I", DefaultMethod.std("99"));
@@ -590,7 +590,7 @@
                 AccessFlag.PUBLIC));
         C.addCompilationDependency(I.findMethod(stdMethodName));
 
-        assertThrows(AbstractMethodError.class, C);
+        assertInvokeVirtualEquals(99, C);
     }
 
     /**
@@ -646,7 +646,7 @@
      *     public int m(String s) { return I.super.m(s); }
      * }
      *
-     * TEST: C c = new C(); c.m("string") throws AME
+     * TEST: C c = new C(); c.m("string") == 44
      */
     public void testSuperGenericDisqual() {
         MethodParameter t = new MethodParameter("T", "t");
@@ -661,7 +661,7 @@
                 "return I.super.m(s);", AccessFlag.PUBLIC, s));
         C.addCompilationDependency(I.findMethod(stdMethodName));
 
-        assertThrows(AbstractMethodError.class, C,
+        assertInvokeVirtualEquals(44, C,
             new ConcreteMethod(
                 "int", stdMethodName, "return -1;", AccessFlag.PUBLIC, s),
             "-1", "\"string\"");
--- a/test/tools/javac/lib/DPrinter.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/lib/DPrinter.java	Mon Oct 28 18:30:14 2013 -0400
@@ -946,8 +946,8 @@
      */
     public class TypeVisitor implements Type.Visitor<Void,Void> {
         public Void visitAnnotatedType(AnnotatedType type, Void ignore) {
-            printList("typeAnnotations", type.typeAnnotations);
-            printType("underlyingType", type.underlyingType, Details.FULL);
+            printList("typeAnnotations", type.getAnnotationMirrors());
+            printType("underlyingType", type.unannotatedType(), Details.FULL);
             return visitType(type, null);
         }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Processor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.IOException;
+import java.io.Writer;
+import java.lang.annotation.*;
+import java.util.Set;
+import javax.annotation.processing.*;
+import javax.lang.model.element.*;
+import javax.lang.model.util.ElementFilter;
+import javax.tools.*;
+import com.sun.tools.javac.util.Assert;
+
+public class Processor extends JavacTestingAbstractProcessor {
+
+    private boolean seenGenerated;
+
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+        for (Element e : roundEnv.getElementsAnnotatedWith(Gen.class)) {
+            Gen gen = e.getAnnotation(Gen.class);
+            try {
+                JavaFileObject source = processingEnv.getFiler().createSourceFile(gen.fileName());
+
+                try (Writer out = source.openWriter()) {
+                    out.write(gen.content());
+                }
+            } catch (IOException ex) {
+                throw new IllegalStateException(ex);
+            }
+        }
+
+        TypeElement generated = processingEnv.getElementUtils().getTypeElement("Generated");
+
+        if (generated != null) {
+            Check check = ElementFilter.methodsIn(generated.getEnclosedElements()).get(0).getAnnotation(Check.class);
+
+            checkCorrectException(check::classValue, "java.lang.Class<java.lang.String>");
+            checkCorrectException(check::intConstValue, "boolean");
+            checkCorrectException(check::enumValue, "java.lang.String");
+            checkCorrectException(check::incorrectAnnotationValue, "java.lang.Deprecated");
+            checkCorrectException(check::incorrectArrayValue, "<any>");
+            checkCorrectException(check::incorrectClassValue, "<any>");
+
+            seenGenerated = true;
+        }
+
+        if (roundEnv.processingOver() && !seenGenerated) {
+            Assert.error("Did not see the generated class!");
+        }
+
+        return true;
+    }
+
+    private static void checkCorrectException(Runnable runCheck, String expectedType) {
+        try {
+            runCheck.run();
+            Assert.check(false); //Should not reach here
+        } catch (AnnotationTypeMismatchException ex) {
+            Assert.check(expectedType.equals(ex.foundType()), ex.foundType());
+        }
+    }
+
+}
+
+@interface Gen {
+    String fileName();
+    String content();
+}
+
+@interface Check {
+    Class<? extends Number> classValue();
+    int intConstValue();
+    E enumValue();
+    int incorrectAnnotationValue();
+    int incorrectArrayValue();
+    Class<?> incorrectClassValue();
+}
+
+enum E {
+    A;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Source.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,25 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 6278240
+ * @summary Ensure AnnotationTypeMismatchException is thrown when appropriate
+ *          with reasonable foundType filled.
+ * @library /tools/javac/lib
+ * @build JavacTestingAbstractProcessor Processor
+ * @compile/fail/ref=Source.out -XDrawDiagnostics -processor Processor Source.java
+ */
+
+@Gen(fileName="Generated",
+     content=
+"class Generated {\n" +
+"    @Check(classValue=String.class,\n" +
+"           intConstValue=false,\n" +
+"           enumValue=\"a\",\n" +
+"           incorrectAnnotationValue=@Deprecated,\n" +
+"           incorrectArrayValue={1, \"a\"},\n" +
+"           incorrectClassValue=get())\n" +
+"    public static Class<?> get() {\n" +
+"        return null;\n" +
+"    }\n" +
+"}\n")
+class Source {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Source.out	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,7 @@
+Generated.java:2:29: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.Class<java.lang.String>, java.lang.Class<? extends java.lang.Number>)
+Generated.java:3:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: boolean, int)
+Generated.java:4:22: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+Generated.java:5:37: compiler.err.annotation.not.valid.for.type: int
+Generated.java:6:32: compiler.err.annotation.value.not.allowable.type
+Generated.java:7:35: compiler.err.annotation.value.must.be.class.literal
+6 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/errors/StopOnInapplicableAnnotations/GenerateFunctionalInterface.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2013, 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 8014016
+ * @summary Ensure that an annotation processor can generate a super-interface
+ *          which will make the current interface functional
+ * @build GenerateSuperInterfaceProcessor
+ * @compile -processor GenerateSuperInterfaceProcessor GenerateFunctionalInterface.java
+ */
+
+import java.lang.FunctionalInterface;
+
+@FunctionalInterface
+@Generate(fileName="SuperInterface.java", content="interface SuperInterface { public void run(); }")
+interface GenerateFunctionalInterface extends SuperInterface {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/errors/StopOnInapplicableAnnotations/GenerateSuperInterfaceProcessor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.tools.javac.util.Assert;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Set;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+@SupportedAnnotationTypes("*")
+public class GenerateSuperInterfaceProcessor extends AbstractProcessor {
+
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+        for (Element el : roundEnv.getElementsAnnotatedWith(Generate.class)) {
+            Generate g = el.getAnnotation(Generate.class);
+
+            Assert.checkNonNull(g);
+
+            try (OutputStream out =
+                    processingEnv.getFiler().createSourceFile(g.fileName()).openOutputStream()) {
+                out.write(g.content().getBytes());
+            } catch (IOException ex) {
+                throw new IllegalStateException(ex);
+            }
+        }
+
+        return false;
+    }
+
+}
+
+@interface Generate {
+    String fileName();
+    String content();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/errors/StopOnInapplicableAnnotations/Processor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.source.tree.AnnotationTree;
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TreeScanner;
+import com.sun.source.util.Trees;
+import com.sun.tools.javac.api.JavacTool;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.util.Assert;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Set;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.element.TypeElement;
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticListener;
+import javax.tools.FileObject;
+import javax.tools.ForwardingJavaFileManager;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+
+@SupportedAnnotationTypes("*")
+public class Processor extends AbstractProcessor {
+
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+        throw new IllegalStateException("Should not be invoked.");
+    }
+
+    public static void main(String... args) throws IOException, URISyntaxException {
+        if (args.length != 1) throw new IllegalStateException("Must provide class name!");
+        String testContent = null;
+        List<File> sourcePath = new ArrayList<>();
+        for (String sourcePaths : System.getProperty("test.src.path").split(":")) {
+            sourcePath.add(new File(sourcePaths));
+        }
+        JavacFileManager fm = JavacTool.create().getStandardFileManager(null, null, null);
+        for (File sp : sourcePath) {
+            File inp = new File(sp, args[0]);
+
+            if (inp.canRead()) {
+                testContent = fm.getRegularFile(inp).getCharContent(true).toString();
+            }
+        }
+        if (testContent == null) throw new IllegalStateException();
+        DiagnosticListener<JavaFileObject> devNull = new DiagnosticListener<JavaFileObject>() {
+            @Override public void report(Diagnostic<? extends JavaFileObject> diagnostic) { }
+        };
+        JavaFileObject testFile = new TestFO(new URI("mem://" + args[0]), testContent);
+        JavacTask task = JavacTool.create().getTask(null,
+                                                    new TestFM(fm),
+                                                    devNull,
+                                                    Arrays.asList("-Xjcov"),
+                                                    null,
+                                                    Arrays.asList(testFile));
+        final Trees trees = Trees.instance(task);
+        final CompilationUnitTree cut = task.parse().iterator().next();
+        task.analyze();
+
+        final List<int[]> annotations = new ArrayList<>();
+
+        new TreeScanner<Void, Void>() {
+            @Override
+            public Void visitAnnotation(AnnotationTree node, Void p) {
+                int endPos = (int) trees.getSourcePositions().getEndPosition(cut, node);
+
+                Assert.check(endPos >= 0);
+
+                annotations.add(new int[] {(int) trees.getSourcePositions().getStartPosition(cut, node), endPos});
+                return super.visitAnnotation(node, p);
+            }
+        }.scan(cut.getTypeDecls().get(0), null);
+
+        Collections.sort(annotations, new Comparator<int[]>() {
+            @Override public int compare(int[] o1, int[] o2) {
+                return o2[0] - o1[0];
+            }
+        });
+
+        for (final int[] annotation : annotations) {
+            StringBuilder updatedContent = new StringBuilder();
+            int last = testContent.length();
+
+            for (int[] toRemove : annotations) {
+                if (toRemove == annotation) continue;
+                updatedContent.insert(0, testContent.substring(toRemove[1], last));
+                last = toRemove[0];
+            }
+
+            updatedContent.insert(0, testContent.substring(0, last));
+
+            JavaFileObject updatedFile = new TestFO(new URI("mem://" + args[0]), updatedContent.toString());
+            JavacTask testTask = JavacTool.create().getTask(null,
+                                                            new TestFM(fm),
+                                                            devNull,
+                                                            Arrays.asList("-processor", "Processor"),
+                                                            null,
+                                                            Arrays.asList(updatedFile));
+
+            try {
+                testTask.analyze();
+            } catch (Throwable e) {
+                System.out.println("error while processing:");
+                System.out.println(updatedContent);
+                throw e;
+            }
+        }
+    }
+
+    private static final class TestFO extends SimpleJavaFileObject {
+        private final String content;
+        public TestFO(URI uri, String content) {
+            super(uri, Kind.SOURCE);
+            this.content = content;
+        }
+
+        @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
+            return content;
+        }
+
+        @Override public boolean isNameCompatible(String simpleName, Kind kind) {
+            return true;
+        }
+    }
+
+    private static final class TestFM extends ForwardingJavaFileManager<JavaFileManager> {
+
+        public TestFM(JavaFileManager fileManager) {
+            super(fileManager);
+        }
+
+        @Override
+        public boolean isSameFile(FileObject a, FileObject b) {
+            return a.equals(b);
+        }
+
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/errors/StopOnInapplicableAnnotations/Source.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2013, 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 8014016
+ * @summary Verify that annotation processors do not get invalid annotations
+ * @build Processor
+ * @run main Processor Source.java
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+@OnMethod
+@OnField
+class Class<@OnType @OnMethod @OnField T extends @OnType @OnMethod @OnField CharSequence & @OnType @OnMethod @OnField Runnable> extends @OnType @OnMethod @OnField Object {
+
+    @OnType
+    @OnTypeUse
+    @OnField
+    private void testMethod(@OnType @OnField @OnMethod int i) { }
+
+    @OnType
+    @OnMethod
+    private java.lang.@OnType @OnMethod @OnField String testField;
+}
+
+@Target(ElementType.TYPE)
+@interface OnType {}
+
+@Target(ElementType.METHOD)
+@interface OnMethod {}
+
+@Target(ElementType.TYPE_USE)
+@interface OnTypeUse {}
+
+@Target(ElementType.FIELD)
+@interface OnField {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/errors/TestBadProcessor.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2013, 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 8022163
+ * @summary javac exits with 0 status and no messages on error to construct an ann-procesor
+ */
+
+import java.io.*;
+
+public class TestBadProcessor {
+    public static void main(String... args) throws Exception {
+        new TestBadProcessor().run();
+    }
+
+    public static final String badAnnoProcSrc =
+        "import java.util.*;\n" +
+        "import javax.annotation.processing.*;\n" +
+        "import javax.lang.model.element.*;\n" +
+
+        "public class AnnoProc extends AbstractProcessor {\n" +
+        "    public AnnoProc() {\n" +
+        "        throw new Error();\n" +
+        "    }\n" +
+
+        "    public boolean process(Set<? extends TypeElement> elems, \n" +
+        "                        RoundEnvironment rEnv) {\n" +
+        "        return false;\n" +
+        "    }\n" +
+        "}\n";
+
+    public void run() throws Exception {
+        // setup
+        File srcDir = new File("src");
+        File classesDir = new File("classes");
+        classesDir.mkdirs();
+        File srcFile = writeFile(srcDir, "AnnoProc.java", badAnnoProcSrc);
+        compile("-d", classesDir.getPath(), srcFile.getPath());
+        writeFile(classesDir, "META-INF/services/javax.annotation.processing.Processor", "AnnoProc");
+
+        // run the primary compilation
+        int rc;
+        StringWriter sw = new StringWriter();
+        try (PrintWriter pw = new PrintWriter(sw)) {
+            String[] args = { "-processorpath", classesDir.getPath(), srcFile.getPath() };
+            rc = com.sun.tools.javac.Main.compile(args, pw);
+        }
+
+        // verify that it failed as expected, with the expected message
+        String out = sw.toString();
+        System.err.println(out);
+        String expect = "error: Bad service configuration file, " +
+                "or exception thrown while constructing Processor object: " +
+                "javax.annotation.processing.Processor: " +
+                "Provider AnnoProc could not be instantiated: java.lang.Error";
+        if (!out.trim().equals(expect)) {
+            System.err.println("expected: " + expect);
+            error("output not as expected");
+        }
+
+        if (rc == 0) {
+            error("unexpected exit code: " + rc + "; expected: not zero");
+        }
+
+        // summary
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+    }
+
+    void compile(String... args) throws Exception {
+        int rc;
+        StringWriter sw = new StringWriter();
+        try (PrintWriter pw = new PrintWriter(sw)) {
+            rc = com.sun.tools.javac.Main.compile(args, pw);
+        }
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        if (rc != 0)
+            throw new Exception("compilation failed");
+    }
+
+    File writeFile(File dir, String path, String body) throws IOException {
+        File f = new File(dir, path);
+        f.getParentFile().mkdirs();
+        try (FileWriter out = new FileWriter(f)) {
+            out.write(body);
+        }
+        return f;
+    }
+
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/model/element/TestEmptyContainer.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, 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 8026857
+ * @summary Test that an empty container does not stop us from looking at
+ *          supertypes for inherited repeated annotations.
+ * @library /tools/javac/lib
+ * @build   JavacTestingAbstractProcessor TestEmptyContainer
+ * @compile -processor TestEmptyContainer -proc:only TestEmptyContainer.java
+ */
+
+import com.sun.tools.javac.util.Assert;
+
+import java.lang.annotation.*;
+import java.util.Arrays;
+import java.util.Set;
+import javax.annotation.processing.*;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+import static javax.lang.model.util.ElementFilter.*;
+
+@TestEmptyContainer.Foo(1)
+public class TestEmptyContainer extends JavacTestingAbstractProcessor {
+    public boolean process(Set<? extends TypeElement> annotations,
+                           RoundEnvironment roundEnv) {
+        if (!roundEnv.processingOver()) {
+            boolean hasRun = false;
+            for (Element element : roundEnv.getRootElements())
+                for (TypeElement te : typesIn(element.getEnclosedElements()))
+                    if (te.getQualifiedName().contentEquals("TestEmptyContainer.T2")) {
+                        hasRun = true;
+                        Foo[] foos = te.getAnnotationsByType(Foo.class);
+                        System.out.println("  " + te);
+                        System.out.println("  " + Arrays.asList(foos));
+                        Assert.check(foos.length == 1, "Should find one @Foo");
+                        Assert.check(foos[0].value() == 1, "Should find @Foo(1)");
+                    }
+            if (!hasRun)
+                throw new RuntimeException("Annotation processor couldn't find class T2, test broken!");
+        }
+        return true;
+    }
+
+    // This empty container should not stop us from finding @Foo(1) on TestEmptyContainer above
+    @TestEmptyContainer.FooContainer({})
+    public static class T2 extends TestEmptyContainer {
+    }
+
+    @Repeatable(FooContainer.class)
+    @Inherited
+    public static @interface Foo {
+        int value();
+    }
+
+    @Inherited
+    public static @interface FooContainer {
+        Foo[] value();
+    }
+}
--- a/test/tools/javac/processing/model/element/TestExecutableElement.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/processing/model/element/TestExecutableElement.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,54 +23,57 @@
 
 /*
  * @test
- * @bug 8005046 8011052
- * @summary Test basic properties of javax.lang.element.Element
+ * @bug 8005046 8011052 8025087
+ * @summary Test basic properties of javax.lang.element.ExecutableElement
  * @author  Joseph D. Darcy
  * @library /tools/javac/lib
  * @build   JavacTestingAbstractProcessor TestExecutableElement
- * @compile -processor TestExecutableElement -proc:only TestExecutableElement.java
+ * @compile -processor TestExecutableElement -proc:only -AexpectedMethodCount=7 TestExecutableElement.java
+ * @compile/process -processor TestExecutableElement -proc:only -AexpectedMethodCount=3 ProviderOfDefault
  */
 
 import java.lang.annotation.*;
 import java.util.Formatter;
 import java.util.Set;
-import java.util.Objects;
 import java.util.regex.*;
 import javax.annotation.processing.*;
-import javax.lang.model.SourceVersion;
-import static javax.lang.model.SourceVersion.*;
 import javax.lang.model.element.*;
-import javax.lang.model.util.*;
 import static javax.lang.model.util.ElementFilter.*;
 import static javax.tools.Diagnostic.Kind.*;
-import static javax.tools.StandardLocation.*;
 
 /**
  * Test some basic workings of javax.lang.element.ExecutableElement
  */
+@SupportedOptions("expectedMethodCount")
 public class TestExecutableElement extends JavacTestingAbstractProcessor implements ProviderOfDefault {
+    private int seenMethods = 0;
     @IsDefault(false)
     public boolean process(Set<? extends TypeElement> annotations,
                            RoundEnvironment roundEnv) {
-        int errors = 0;
         if (!roundEnv.processingOver()) {
-            boolean hasRun = false;
             for (Element element : roundEnv.getRootElements()) {
                 for (ExecutableElement method : methodsIn(element.getEnclosedElements())) {
-                    hasRun = true;
-                    errors += checkIsDefault(method);
+                    checkIsDefault(method);
+                    seenMethods++;
                 }
             }
+        } else {
+            String expectedMethodCountStr = processingEnv.getOptions().get("expectedMethodCount");
+            if (expectedMethodCountStr == null) {
+                messager.printMessage(ERROR, "No expected method count specified.");
+            } else {
+                int expectedMethodCount = Integer.parseInt(expectedMethodCountStr);
 
-            if (!hasRun) {
-                messager.printMessage(ERROR, "No test cases run; test fails.");
+                if (seenMethods != expectedMethodCount) {
+                    messager.printMessage(ERROR, "Wrong number of seen methods: " + seenMethods);
+                }
             }
         }
         return true;
     }
 
     @IsDefault(false)
-    int checkIsDefault(ExecutableElement method) {
+    void checkIsDefault(ExecutableElement method) {
         System.out.println("Testing " + method);
         IsDefault expectedIsDefault = method.getAnnotation(IsDefault.class);
 
@@ -116,9 +119,7 @@
                                                          expectedDefault,
                                                          methodIsDefault).toString(),
                                   method);
-            return 1;
         }
-        return 0;
     }
 }
 
@@ -142,4 +143,6 @@
 
     @IsDefault(value=true, expectedTextRegex="\\s*@IsDefault\\(.*\\)\\s*default strictfp void quux\\(\\);\\s*$")
     default strictfp void quux() {};
+    @IsDefault(false)
+    static void statik() {}
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/model/element/TestNonInherited.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2013, 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 8026855
+ * @summary Javac should only look on supertypes for repeatable annotations if
+ *          both container and containee are inherited.
+ * @library /tools/javac/lib
+ * @build   JavacTestingAbstractProcessor TestNonInherited
+ * @compile -processor TestNonInherited -proc:only TestNonInherited.java
+ */
+
+import com.sun.tools.javac.util.Assert;
+
+import java.lang.annotation.*;
+import java.util.Arrays;
+import java.util.Set;
+import javax.annotation.processing.*;
+import javax.lang.model.element.*;
+import javax.lang.model.util.*;
+
+import static javax.lang.model.util.ElementFilter.*;
+
+@TestNonInherited.Foo(1)
+public class TestNonInherited extends JavacTestingAbstractProcessor {
+    public boolean process(Set<? extends TypeElement> annotations,
+                           RoundEnvironment roundEnv) {
+        if (!roundEnv.processingOver()) {
+            boolean hasRun = false;
+            for (Element element : roundEnv.getRootElements())
+                for (TypeElement te : typesIn(element.getEnclosedElements()))
+                    if (te.getQualifiedName().contentEquals("TestNonInherited.T2")) {
+                        hasRun = true;
+                        Foo[] foos = te.getAnnotationsByType(Foo.class);
+                        System.out.println("  " + te);
+                        System.out.println("  " + Arrays.asList(foos));
+                        Assert.check(foos.length == 0, "Should not find any instance of @Foo");
+                    }
+            if (!hasRun)
+                throw new RuntimeException("The annotation processor could not find the declaration of T2, test broken!");
+        }
+        return true;
+    }
+
+    public static class T2 extends TestNonInherited {
+    }
+
+    @Repeatable(FooContainer.class)
+    public static @interface Foo {
+        int value();
+    }
+
+    @Inherited
+    public static @interface FooContainer {
+        Foo[] value();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/model/element/TestTypeElement.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2013, 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 8025118
+ * @summary Verify that TypeElement for interfaces does not have
+ *          Modifier.DEFAULT in getModifiers()
+ * @library /tools/javac/lib
+ * @build   JavacTestingAbstractProcessor TestTypeElement
+ * @compile -processor TestTypeElement -proc:only TestTypeElement.java
+ */
+
+import java.util.Set;
+import javax.annotation.processing.*;
+import javax.lang.model.element.*;
+import static javax.tools.Diagnostic.Kind.*;
+
+/**
+ * Verify that TypeElement for interfaces does not have Modifier.DEFAULT in getModifiers().
+ */
+public class TestTypeElement extends JavacTestingAbstractProcessor {
+    public boolean process(Set<? extends TypeElement> annotations,
+                           RoundEnvironment roundEnv) {
+        if (!roundEnv.processingOver()) {
+            for (Element element : roundEnv.getRootElements()) {
+                if (element.getKind().isClass() || element.getKind().isInterface()) {
+                    if (element.getModifiers().contains(Modifier.DEFAULT))
+                        messager.printMessage(ERROR, "Modifier.DEFAULT not expected on classes/interfaces");
+                }
+            }
+        }
+        return true;
+    }
+
+}
+
+/**
+ * Test interface to provide a default method.
+ */
+interface InterfaceWithDefaultMethod {
+    default void quux() {}
+}
--- a/test/tools/javac/processing/model/type/BasicAnnoTests.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/javac/processing/model/type/BasicAnnoTests.java	Mon Oct 28 18:30:14 2013 -0400
@@ -26,6 +26,7 @@
  * @bug     1234567
  * @summary Annotations on types
  * @library /tools/javac/lib
+ * @ignore
  * @build JavacTestingAbstractProcessor DPrinter BasicAnnoTests
  * @compile/process -processor BasicAnnoTests -proc:only BasicAnnoTests.java
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/model/type/InheritedAP.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2012, 2013, 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 8024513
+ * @library /tools/javac/lib
+ * @build InheritedAP
+ * @compile -cp . -processor InheritedAP -proc:only InheritedAP.java
+ * @summary NPE in annotation processing
+ */
+import java.util.*;
+import javax.annotation.processing.*;
+import javax.lang.model.element.*;
+import javax.lang.model.type.*;
+import javax.lang.model.util.*;
+import java.lang.annotation.*;
+import static javax.lang.model.type.TypeKind.*;
+import static javax.lang.model.SourceVersion.*;
+import static javax.lang.model.util.ElementFilter.*;
+
+@SupportedAnnotationTypes("testclass")
+@SupportedSourceVersion(RELEASE_8)
+public class InheritedAP extends AbstractProcessor {
+    static Types types;
+    public void init(ProcessingEnvironment penv) {super.init(penv);}
+    public static Types getTypes() { return types; }
+
+    public boolean process(Set<? extends TypeElement> typeElementSet,RoundEnvironment renv) {
+        if ( renv.errorRaised()) { System.out.println("Error!"); return false; }
+        if ( typeElementSet.size() <=0 && typesIn(renv.getRootElements()).size() <= 0 ) {
+            return true;
+        }
+        types=processingEnv.getTypeUtils();
+        for (TypeElement typeElem: typesIn(renv.getRootElements())) {
+            if (typeElem.getAnnotation(testclass.class) != null) {
+                new ElementScanner( new SimpleTypeMirrorVisitor()).scan(typeElem, null);
+            }
+        }
+        return true ;
+    }
+}
+
+class SimpleTypeMirrorVisitor extends SimpleTypeVisitor6 <Void, Void> {
+    protected Void defaultAction(TypeMirror mirror, Void p ) {
+        try {
+            System.out.println( "InheritedAP.getTypes().directSupertypes( "+mirror.toString()+" );" );
+            InheritedAP.getTypes().directSupertypes(mirror);
+            System.out.println("PASS");
+        }catch(java.lang.IllegalArgumentException iae) {/*stuff*/ }
+        return p;
+    }
+}
+
+class ElementScanner <T extends SimpleTypeVisitor6<Void, Void> >
+                    extends ElementScanner6<Void, Void> {
+    SimpleTypeVisitor6<Void, Void> typeVisitor;
+
+    public ElementScanner(T typeVisitor) { this.typeVisitor=typeVisitor;}
+
+    @Override
+    public Void scan(Element e, Void p) {
+         if (e instanceof TypeElement ) {
+            TypeElement te = (TypeElement) e;
+            te.getSuperclass().accept(typeVisitor,p);
+        }
+        return p;
+    }
+
+}
+
+
+@interface testclass { }
+
+@testclass
+@interface iface { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/tree/NoPrivateTypesExported.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2013, 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 8026180
+ * @summary Ensuring javax.lang.model.**, javax.tools.**, javax.annotation.processing.**
+ *          and com.sun.source.** don't export inappropriate types.
+ * @library /tools/javac/lib
+ * @build JavacTestingAbstractProcessor NoPrivateTypesExported
+ * @compile -processor NoPrivateTypesExported NoPrivateTypesExported.java
+ */
+import java.lang.annotation.Documented;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.TypeParameterElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.ArrayType;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.IntersectionType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.type.TypeVariable;
+import javax.lang.model.type.WildcardType;
+import javax.lang.model.util.ElementScanner8;
+import javax.lang.model.util.SimpleAnnotationValueVisitor8;
+import javax.tools.Diagnostic.Kind;
+
+public class NoPrivateTypesExported extends JavacTestingAbstractProcessor {
+
+    private static final String[] javaxLangModelPackages = new String[] {
+        "javax.lang.model",
+        "javax.lang.model.element",
+        "javax.lang.model.type",
+        "javax.lang.model.util",
+    };
+
+    private static final Set<String> javaxLangModelAcceptable;
+
+    private static final String[] javaxToolsProcessingPackages = new String[] {
+        "javax.annotation.processing",
+        "javax.tools",
+    };
+
+    private static final Set<String> javaxToolsProcessingAcceptable;
+
+    private static final String[] comSunSourcePackages = new String[] {
+        "com.sun.source.doctree",
+        "com.sun.source.tree",
+        "com.sun.source.util"
+    };
+
+    private static final Set<String> comSunSourceAcceptable;
+
+    static {
+        javaxLangModelAcceptable = new HashSet<>(Arrays.asList(
+            "java.io.",
+            "java.lang.",
+            "java.net.",
+            "java.nio.",
+            "java.util.",
+            "javax.lang.model.",
+            "javax.annotation.processing.SupportedSourceVersion",
+            "jdk.Exported"
+        ));
+        Set<String> javaxToolsProcessingAcceptableTemp = new HashSet<>();
+        javaxToolsProcessingAcceptableTemp.addAll(javaxLangModelAcceptable);
+        javaxToolsProcessingAcceptableTemp.addAll(Arrays.asList(
+                "javax.annotation.processing.",
+                "javax.tools."
+        ));
+        javaxToolsProcessingAcceptable = javaxToolsProcessingAcceptableTemp;
+        Set<String> comSunSourceAcceptableTemp = new HashSet<>();
+        comSunSourceAcceptableTemp.addAll(javaxToolsProcessingAcceptable);
+        comSunSourceAcceptableTemp.addAll(Arrays.asList(
+                "com.sun.source.doctree.",
+                "com.sun.source.tree.",
+                "com.sun.source.util."
+        ));
+        comSunSourceAcceptable = comSunSourceAcceptableTemp;
+    }
+
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations,
+                           RoundEnvironment roundEnv) {
+        if (roundEnv.processingOver()) {
+            verifyPackage(javaxLangModelPackages, javaxLangModelAcceptable);
+            verifyPackage(javaxToolsProcessingPackages, javaxToolsProcessingAcceptable);
+            verifyPackage(comSunSourcePackages, comSunSourceAcceptable);
+        }
+        return true;
+    }
+
+    private void verifyPackage(String[] packagesToTest, Set<String> acceptable) {
+        for (String packageToTest : packagesToTest) {
+            PackageElement packageElement = processingEnv.getElementUtils()
+                    .getPackageElement(packageToTest);
+
+            verifyReferredTypesAcceptable(packageElement, acceptable);
+        }
+    }
+
+    private void verifyReferredTypesAcceptable(Element rootElement,
+                                               final Set<String> acceptable) {
+        new ElementScanner8<Void, Void>() {
+            @Override public Void visitType(TypeElement e, Void p) {
+                verifyTypeAcceptable(e.getSuperclass(), acceptable);
+                verifyTypesAcceptable(e.getInterfaces(), acceptable);
+                scan(e.getTypeParameters(), p);
+                scan(e.getEnclosedElements(), p);
+                verifyAnnotations(e.getAnnotationMirrors(), acceptable);
+                return null;
+            }
+            @Override public Void visitTypeParameter(TypeParameterElement e, Void p) {
+                verifyTypesAcceptable(e.getBounds(), acceptable);
+                scan(e.getEnclosedElements(), p);
+                verifyAnnotations(e.getAnnotationMirrors(), acceptable);
+                return null;
+            }
+            @Override public Void visitPackage(PackageElement e, Void p) {
+                scan(e.getEnclosedElements(), p);
+                verifyAnnotations(e.getAnnotationMirrors(), acceptable);
+                return null;
+            }
+            @Override public Void visitVariable(VariableElement e, Void p) {
+                verifyTypeAcceptable(e.asType(), acceptable);
+                scan(e.getEnclosedElements(), p);
+                verifyAnnotations(e.getAnnotationMirrors(), acceptable);
+                return null;
+            }
+            @Override
+            public Void visitExecutable(ExecutableElement e, Void p) {
+                scan(e.getTypeParameters(), p);
+                verifyTypeAcceptable(e.getReturnType(), acceptable);
+                scan(e.getParameters(), p);
+                verifyTypesAcceptable(e.getThrownTypes(), acceptable);
+                scan(e.getEnclosedElements(), p);
+                verifyAnnotations(e.getAnnotationMirrors(), acceptable);
+                return null;
+            }
+        }.scan(rootElement, null);
+    }
+
+    private void verifyAnnotations(Iterable<? extends AnnotationMirror> annotations,
+                                   Set<String> acceptable) {
+        for (AnnotationMirror mirror : annotations) {
+            Element annotationElement = mirror.getAnnotationType().asElement();
+
+            if (annotationElement.getAnnotation(Documented.class) == null) {
+                note("Ignoring undocumented annotation: " + mirror.getAnnotationType());
+            }
+
+            verifyTypeAcceptable(mirror.getAnnotationType(), acceptable);
+
+            for (AnnotationValue value : mirror.getElementValues().values()) {
+                verifyAnnotationValue(value, acceptable);
+            }
+        }
+    }
+
+    private void verifyAnnotationValue(AnnotationValue value,
+                                       final Set<String> acceptable) {
+        value.accept(new SimpleAnnotationValueVisitor8<Void, Void>() {
+            @Override public Void visitType(TypeMirror t, Void p) {
+                verifyTypeAcceptable(t, acceptable);
+                return null;
+            }
+            @Override
+            public Void visitEnumConstant(VariableElement c, Void p) {
+                verifyReferredTypesAcceptable(c, acceptable);
+                return null;
+            }
+            @Override public Void visitArray(List<? extends AnnotationValue> vals,
+                                             Void p) {
+                for (AnnotationValue val : vals) {
+                    val.accept(this, p);
+                }
+                return null;
+            }
+            @Override protected Void defaultAction(Object o, Void p) {
+                error("Unexpected AnnotationValue: " + o.toString());
+                return super.defaultAction(o, p);
+            }
+        }, null);
+    }
+
+    private void verifyTypesAcceptable(Iterable<? extends TypeMirror> types,
+                                       Set<String> acceptable) {
+        if (types == null) return ;
+
+        for (TypeMirror type : types) {
+            verifyTypeAcceptable(type, acceptable);
+        }
+    }
+
+    private void verifyTypeAcceptable(TypeMirror type, Set<String> acceptable) {
+        if (type == null) return ;
+
+        verifyAnnotations(type.getAnnotationMirrors(), acceptable);
+
+        switch (type.getKind()) {
+            case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT:
+            case INT: case LONG: case SHORT: case VOID: case NONE: case NULL:
+                return ;
+            case DECLARED:
+                DeclaredType dt = (DeclaredType) type;
+                TypeElement outermostTypeElement = outermostTypeElement(dt.asElement());
+                String outermostType = outermostTypeElement.getQualifiedName().toString();
+                boolean isAcceptable = false;
+                for (String acceptablePackage : acceptable) {
+                    if (outermostType.startsWith(acceptablePackage)) {
+                        isAcceptable = true;
+                        break;
+                    }
+                }
+                if (!isAcceptable) {
+                    error("Type not acceptable for this API: " + dt.toString());
+                }
+
+                for (TypeMirror bound : dt.getTypeArguments()) {
+                    verifyTypeAcceptable(bound, acceptable);
+                }
+                break;
+            case ARRAY:
+                verifyTypeAcceptable(((ArrayType) type).getComponentType(), acceptable);
+                break;
+            case INTERSECTION:
+                for (TypeMirror element : ((IntersectionType) type).getBounds()) {
+                    verifyTypeAcceptable(element, acceptable);
+                }
+                break;
+            case TYPEVAR:
+                verifyTypeAcceptable(((TypeVariable) type).getLowerBound(), acceptable);
+                verifyTypeAcceptable(((TypeVariable) type).getUpperBound(), acceptable);
+                break;
+            case WILDCARD:
+                verifyTypeAcceptable(((WildcardType) type).getExtendsBound(), acceptable);
+                verifyTypeAcceptable(((WildcardType) type).getSuperBound(), acceptable);
+                break;
+            default:
+                error("Type not acceptable for this API: " + type.toString());
+                break;
+
+        }
+    }
+
+    private TypeElement outermostTypeElement(Element el) {
+        while (el.getEnclosingElement().getKind() != ElementKind.PACKAGE) {
+            el = el.getEnclosingElement();
+        }
+
+        return (TypeElement) el;
+    }
+
+    private void error(String text) {
+        processingEnv.getMessager().printMessage(Kind.ERROR, text);
+    }
+
+    private void note(String text) {
+        processingEnv.getMessager().printMessage(Kind.NOTE, text);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/tree/T8024415.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2013, 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 8024415
+ * @summary Pretty printing of JCConditional does not follow the precedence and
+ *          associativity rules of JCConditional
+ * @run testng T8024415
+ */
+
+
+import static org.testng.Assert.assertEquals;
+
+import java.io.IOException;
+import java.io.StringWriter;
+
+import org.testng.annotations.Test;
+
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.JCExpression;
+import com.sun.tools.javac.tree.Pretty;
+import com.sun.tools.javac.tree.TreeMaker;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Names;
+
+
+/*
+ * Test verifies that the precedence rules of conditional expressions
+ * (JCConditional) are correct.
+ */
+@Test
+public class T8024415 {
+
+    TreeMaker maker;
+    JCExpression x;
+
+
+    public T8024415() {
+        Context ctx = new Context();
+        JavacFileManager.preRegister(ctx);
+        maker = TreeMaker.instance(ctx);
+        Names names = Names.instance(ctx);
+        x = maker.Ident(names.fromString("x"));
+    }
+
+
+    // JLS 15.25: The conditional operator is syntactically right-associative
+    // (it groups right-to-left). Thus, a?b:c?d:e?f:g means the same as
+    // a?b:(c?d:(e?f:g)).
+    public void testAssociativity() throws IOException {
+
+        JCTree left   = maker.Conditional(maker.Conditional(x, x, x), x, x);
+        JCTree right  = maker.Conditional(x, x, maker.Conditional(x, x, x));
+
+        String prettyLeft   = prettyPrint(left);
+        String prettyRight  = prettyPrint(right);
+
+        assertEquals(prettyLeft.replaceAll("\\s", ""),  "(x?x:x)?x:x");
+        assertEquals(prettyRight.replaceAll("\\s", ""), "x?x:x?x:x");
+
+    }
+
+
+    // The true-part of of a conditional expression is surrounded by ? and :
+    // and can thus always be parsed unambiguously without surrounding
+    // parentheses.
+    public void testPrecedence() throws IOException {
+
+        JCTree left   = maker.Conditional(maker.Assign(x, x), x, x);
+        JCTree middle = maker.Conditional(x, maker.Assign(x, x), x);
+        JCTree right  = maker.Conditional(x, x, maker.Assign(x, x));
+
+        String prettyLeft   = prettyPrint(left);
+        String prettyMiddle = prettyPrint(middle);
+        String prettyRight  = prettyPrint(right);
+
+        assertEquals(prettyLeft.replaceAll("\\s", ""),   "(x=x)?x:x");
+        assertEquals(prettyMiddle.replaceAll("\\s", ""), "x?x=x:x");
+        assertEquals(prettyRight.replaceAll("\\s", ""),  "x?x:(x=x)");
+
+    }
+
+
+    // Helper method
+    private static String prettyPrint(JCTree tree) throws IOException {
+        StringWriter sw = new StringWriter();
+        new Pretty(sw, true).printExpr(tree);
+        return sw.toString();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javadoc/8025693/Test.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2013, 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 8025693
+ * @summary javadoc should ignore <clinit> methods found in classes on classpath
+ */
+
+import java.io.*;
+
+public class Test {
+    public static void main(String[] args) throws Exception {
+        new Test().run();
+    }
+
+    final File baseFile = new File("src/Base.java");
+    final String baseText =
+        "package p;\n" +
+        "public class Base { static { } }\n";
+
+    final File srcFile = new File("src/C.java");
+    final String srcText =
+        "package p;\n" +
+        "/** comment */\n" +
+        "public abstract class C extends Base { }\n";
+
+    void run() throws Exception {
+        File classesDir = new File("classes");
+        classesDir.mkdirs();
+        writeFile(baseFile, baseText);
+        String[] javacArgs = {
+            "-d", classesDir.getPath(),
+            baseFile.getPath()
+        };
+        com.sun.tools.javac.Main.compile(javacArgs);
+
+        writeFile(srcFile, srcText);
+        String[] args = {
+            "-d", "api",
+            "-classpath", classesDir.getPath(),
+            "-package", "p",
+            srcFile.getPath()
+        };
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        PrintStream ps = new PrintStream(baos);
+        PrintStream prev = System.err;
+        System.setErr(ps);
+        try {
+            int rc = com.sun.tools.javadoc.Main.execute(args);
+        } finally {
+            System.err.flush();
+            System.setErr(prev);
+        }
+        String out = baos.toString();
+        System.out.println(out);
+
+        String errorMessage = "java.lang.IllegalArgumentException: <clinit>";
+        if (out.contains(errorMessage))
+            throw new Exception("error message found: " + errorMessage);
+    }
+
+    void writeFile(File file, String body) throws IOException {
+        file.getParentFile().mkdirs();
+        try (FileWriter out = new FileWriter(file)) {
+            out.write(body);
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javap/BoundsTypeVariableTest.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2013, 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 8003537
+ * @summary javap should not use / in Bounds Type Variables
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+import static java.nio.file.StandardOpenOption.*;
+
+public class BoundsTypeVariableTest {
+    public static void main(String... args) throws Exception {
+        new BoundsTypeVariableTest().run();
+    }
+
+    void run() throws Exception {
+        File srcDir = new File("src");
+        srcDir.mkdirs();
+        File classesDir = new File("classes");
+        classesDir.mkdirs();
+        final String expect = "public abstract <U extends java.lang.Object> U doit();";
+        List<String> contents = new ArrayList<>();
+        contents.add("abstract class X {");
+        contents.add(expect);
+        contents.add("}");
+
+        File f = writeFile(new File(srcDir, "X.java"), contents);
+        javac("-d", classesDir.getPath(), f.getPath());
+        String out = javap("-p", "-v", new File(classesDir, "X.class").getPath());
+        if (!out.contains(expect)) {
+            throw new Exception("expected pattern not found: " + expect);
+        }
+    }
+
+    File writeFile(File f, List<String> body) throws IOException {
+        Files.write(f.toPath(), body, Charset.defaultCharset(),
+                CREATE, TRUNCATE_EXISTING);
+        return f;
+    }
+
+    void javac(String... args) throws Exception {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javac.Main.compile(args, pw);
+        pw.flush();
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        if (rc != 0)
+            throw new Exception("compilation failed");
+    }
+
+    String javap(String... args) throws Exception {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javap.Main.run(args, pw);
+        pw.flush();
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        if (rc != 0)
+            throw new Exception("javap failed");
+        return out;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/APIDeps.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,191 @@
+/*
+ * 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 8015912
+ * @summary find API dependencies
+ * @build m.Bar m.Foo m.Gee b.B c.C c.I d.D e.E f.F g.G
+ * @run main APIDeps
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
+import java.util.regex.*;
+
+public class APIDeps {
+    private static boolean symbolFileExist = initProfiles();
+    private static boolean initProfiles() {
+        // check if ct.sym exists; if not use the profiles.properties file
+        Path home = Paths.get(System.getProperty("java.home"));
+        if (home.endsWith("jre")) {
+            home = home.getParent();
+        }
+        Path ctsym = home.resolve("lib").resolve("ct.sym");
+        boolean symbolExists = ctsym.toFile().exists();
+        if (!symbolExists) {
+            Path testSrcProfiles =
+                Paths.get(System.getProperty("test.src", "."), "profiles.properties");
+            if (!testSrcProfiles.toFile().exists())
+                throw new Error(testSrcProfiles + " does not exist");
+            System.out.format("%s doesn't exist.%nUse %s to initialize profiles info%n",
+                ctsym, testSrcProfiles);
+            System.setProperty("jdeps.profiles", testSrcProfiles.toString());
+        }
+        return symbolExists;
+    }
+
+    public static void main(String... args) throws Exception {
+        int errors = 0;
+        errors += new APIDeps().run();
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+    }
+
+    int run() throws IOException {
+        File testDir = new File(System.getProperty("test.classes", "."));
+        String testDirBasename = testDir.toPath().getFileName().toString();
+        File mDir = new File(testDir, "m");
+        // all dependencies
+        test(new File(mDir, "Bar.class"),
+             new String[] {"java.lang.Object", "java.lang.String",
+                           "java.util.Set", "java.util.HashSet",
+                           "java.lang.management.ManagementFactory",
+                           "java.lang.management.RuntimeMXBean",
+                           "b.B", "c.C", "d.D", "f.F", "g.G"},
+             new String[] {"compact1", "compact3", testDirBasename},
+             new String[] {"-classpath", testDir.getPath(), "-verbose", "-P"});
+        test(new File(mDir, "Foo.class"),
+             new String[] {"c.I", "e.E", "f.F", "m.Bar"},
+             new String[] {testDirBasename},
+             new String[] {"-classpath", testDir.getPath(), "-verbose", "-P"});
+        test(new File(mDir, "Gee.class"),
+             new String[] {"g.G", "sun.misc.Lock"},
+             new String[] {testDirBasename, "JDK internal API"},
+             new String[] {"-classpath", testDir.getPath(), "-verbose"});
+        // parse only APIs
+        test(mDir,
+             new String[] {"java.lang.Object", "java.lang.String",
+                           "java.util.Set",
+                           "c.C", "d.D", "c.I", "e.E", "m.Bar"},
+             new String[] {"compact1", testDirBasename, mDir.getName()},
+             new String[] {"-classpath", testDir.getPath(), "-verbose", "-P", "-apionly"});
+        return errors;
+    }
+
+    void test(File file, String[] expect, String[] profiles) {
+        test(file, expect, profiles, new String[0]);
+    }
+
+    void test(File file, String[] expect, String[] profiles, String[] options) {
+        List<String> args = new ArrayList<>(Arrays.asList(options));
+        if (file != null) {
+            args.add(file.getPath());
+        }
+        checkResult("api-dependencies", expect, profiles,
+                    jdeps(args.toArray(new String[0])));
+    }
+
+    Map<String,String> jdeps(String... args) {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        System.err.println("jdeps " + Arrays.toString(args));
+        int rc = com.sun.tools.jdeps.Main.run(args, pw);
+        pw.close();
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        if (rc != 0)
+            throw new Error("jdeps failed: rc=" + rc);
+        return findDeps(out);
+    }
+
+    // Pattern used to parse lines
+    private static Pattern linePattern = Pattern.compile(".*\r?\n");
+    private static Pattern pattern = Pattern.compile("\\s+ -> (\\S+) +(.*)");
+
+    // Use the linePattern to break the given String into lines, applying
+    // the pattern to each line to see if we have a match
+    private static Map<String,String> findDeps(String out) {
+        Map<String,String> result = new HashMap<>();
+        Matcher lm = linePattern.matcher(out);  // Line matcher
+        Matcher pm = null;                      // Pattern matcher
+        int lines = 0;
+        while (lm.find()) {
+            lines++;
+            CharSequence cs = lm.group();       // The current line
+            if (pm == null)
+                pm = pattern.matcher(cs);
+            else
+                pm.reset(cs);
+            if (pm.find())
+                result.put(pm.group(1), pm.group(2).trim());
+            if (lm.end() == out.length())
+                break;
+        }
+        return result;
+    }
+
+    void checkResult(String label, String[] expect, Collection<String> found) {
+        List<String> list = Arrays.asList(expect);
+        if (!isEqual(list, found))
+            error("Unexpected " + label + " found: '" + found + "', expected: '" + list + "'");
+    }
+
+    void checkResult(String label, String[] expect, String[] profiles, Map<String,String> result) {
+        // check the dependencies
+        checkResult(label, expect, result.keySet());
+        // check profile information
+        Set<String> values = new TreeSet<>();
+        String internal = "JDK internal API";
+        for (String s: result.values()) {
+            if (s.startsWith(internal)){
+                values.add(internal);
+            } else {
+                values.add(s);
+            }
+        }
+        checkResult(label, profiles, values);
+    }
+
+    boolean isEqual(List<String> expected, Collection<String> found) {
+        if (expected.size() != found.size())
+            return false;
+
+        List<String> list = new ArrayList<>(found);
+        list.removeAll(expected);
+        return list.isEmpty();
+    }
+
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+}
--- a/test/tools/jdeps/Basic.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/jdeps/Basic.java	Mon Oct 28 18:30:14 2013 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8003562 8005428
+ * @bug 8003562 8005428 8015912
  * @summary Basic tests for jdeps tool
  * @build Test p.Foo
  * @run main Basic
@@ -79,40 +79,33 @@
              new String[] {"compact1", "compact1", "compact3"});
         // test class-level dependency output
         test(new File(testDir, "Test.class"),
-             new String[] {"java.lang.Object", "p.Foo"},
-             new String[] {"compact1", "not found"},
-             new String[] {"-V", "class"});
+             new String[] {"java.lang.Object", "java.lang.String", "p.Foo"},
+             new String[] {"compact1", "compact1", "not found"},
+             new String[] {"-verbose:class"});
         // test -p option
         test(new File(testDir, "Test.class"),
              new String[] {"p.Foo"},
              new String[] {"not found"},
-             new String[] {"--verbose-level=class", "-p", "p"});
+             new String[] {"-verbose:class", "-p", "p"});
         // test -e option
         test(new File(testDir, "Test.class"),
              new String[] {"p.Foo"},
              new String[] {"not found"},
-             new String[] {"-V", "class", "-e", "p\\..*"});
+             new String[] {"-verbose:class", "-e", "p\\..*"});
         test(new File(testDir, "Test.class"),
              new String[] {"java.lang"},
              new String[] {"compact1"},
-             new String[] {"-V", "package", "-e", "java\\.lang\\..*"});
-        // test -classpath and wildcard options
+             new String[] {"-verbose:package", "-e", "java\\.lang\\..*"});
+        // test -classpath and -include options
         test(null,
-             new String[] {"com.sun.tools.jdeps", "java.lang", "java.util",
-                           "java.util.regex", "java.io", "java.nio.file",
+             new String[] {"java.lang", "java.util",
                            "java.lang.management"},
-             new String[] {(symbolFileExist? "not found" : "JDK internal API (classes)"),
-                           "compact1", "compact1", "compact1",
-                           "compact1", "compact1", "compact3"},
-             new String[] {"--classpath", testDir.getPath(), "*"});
-        /* Temporary disable this test case.  Test.class has a dependency
-         * on java.lang.String on certain windows machine (8008479).
-         // -v shows intra-dependency
-         test(new File(testDir, "Test.class"),
-              new String[] {"java.lang.Object", "p.Foo"},
-              new String[] {"compact1", testDir.getName()},
-              new String[] {"-v", "--classpath", testDir.getPath(), "Test.class"});
-        */
+             new String[] {"compact1", "compact1", "compact3"},
+             new String[] {"-classpath", testDir.getPath(), "-include", "p.+|Test.class"});
+        test(new File(testDir, "Test.class"),
+             new String[] {"java.lang.Object", "java.lang.String", "p.Foo"},
+             new String[] {"compact1", "compact1", testDir.getName()},
+             new String[] {"-v", "-classpath", testDir.getPath(), "Test.class"});
         return errors;
     }
 
--- a/test/tools/jdeps/Test.java	Fri Oct 11 17:51:08 2013 -0700
+++ b/test/tools/jdeps/Test.java	Mon Oct 28 18:30:14 2013 -0400
@@ -25,4 +25,7 @@
     public void test() {
         p.Foo f = new p.Foo();
     }
+    private String name() {
+        return "this test";
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/b/B.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2013, 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 b;
+
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({TYPE, METHOD, FIELD})
+public @interface B {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/c/C.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2013, 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 c;
+
+public class C {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/c/I.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2013, 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 c;
+
+public interface I {
+    void run();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/d/D.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2013, 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 d;
+
+public class D {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/e/E.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2013, 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 e;
+
+// use compact2
+public class E extends java.rmi.RemoteException {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/f/F.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2013, 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 f;
+
+public class F {
+    public F() {
+        // jdk internal API
+        sun.misc.Unsafe.getUnsafe();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/g/G.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2013, 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 g;
+
+public class G {
+    // Full JRE
+    private static final boolean gui = java.beans.Beans.isGuiAvailable();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/m/Bar.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2013, 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 m;
+
+import java.util.*;
+
+@b.B
+public class Bar {
+    public final Set<String> set = new HashSet<>();
+    protected d.D d;
+    private f.F f;
+
+    public Bar() {
+        // compact3
+        java.lang.management.ManagementFactory.getRuntimeMXBean();
+    }
+
+    protected c.C c() {
+        return new c.C();
+    }
+
+    /* package private */ void setF(f.F o) {
+        f = o;
+    }
+
+    private g.G g() {
+        return new g.G();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/m/Foo.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2013, 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 m;
+
+public class Foo extends Bar implements c.I {
+   public void foo() throws e.E {
+   }
+   public void run() {
+      setF(new f.F());
+   }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jdeps/m/Gee.java	Mon Oct 28 18:30:14 2013 -0400
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2013, 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 m;
+
+
+class Gee extends g.G {
+    public sun.misc.Lock lock;
+}
+