8176331: Simplify new doclet packages
authorjjg
Thu, 09 Mar 2017 13:46:40 -0800
changeset 44189 dd311cfb920b
parent 44188 3f2047e62102
child 44190 8df2751b6247
8176331: Simplify new doclet packages Reviewed-by: ksrini
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/Taglet.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/Taglet.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/package-info.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/StandardDoclet.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/package-info.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AbstractDoclet.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java
langtools/src/jdk.javadoc/share/classes/module-info.java
langtools/test/jdk/javadoc/doclet/testLegacyTaglet/Check.java
langtools/test/jdk/javadoc/doclet/testLegacyTaglet/TestLegacyTaglet.java
langtools/test/jdk/javadoc/doclet/testLegacyTaglet/ToDoTaglet.java
langtools/test/jdk/javadoc/doclet/testLegacyTaglet/UnderlineTaglet.java
langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java
langtools/test/jdk/javadoc/tool/api/basic/taglets/UnderlineTaglet.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2003, 2016, 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.javadoc.doclet;
+
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
+
+/**
+ * This doclet generates HTML-formatted documentation for the specified modules, packages and types.
+ */
+public class StandardDoclet implements Doclet {
+
+    private final HtmlDoclet htmlDoclet;
+
+    public StandardDoclet() {
+        htmlDoclet = new HtmlDoclet();
+    }
+
+    @Override
+    public void init(Locale locale, Reporter reporter) {
+        htmlDoclet.init(locale, reporter);
+    }
+
+    @Override
+    public String getName() {
+        return "Standard";
+    }
+
+    @Override
+    public Set<Doclet.Option> getSupportedOptions() {
+        return htmlDoclet.getSupportedOptions();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return htmlDoclet.getSupportedSourceVersion();
+    }
+
+    @Override
+    public boolean run(DocletEnvironment docEnv) {
+        return htmlDoclet.run(docEnv);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/Taglet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2001, 2017, 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.javadoc.doclet;
+
+import java.util.List;
+import java.util.Set;
+
+import com.sun.source.doctree.DocTree;
+
+/**
+ * The interface for a custom taglet supported by doclets such as
+ * the {@link jdk.javadoc.doclet.StandardDoclet standard doclet}.
+ * Custom taglets are used to handle custom tags in documentation
+ * comments.
+ *
+ * <p>A custom taglet must implement this interface, and must have
+ * a public default constructor (i.e. a public constructor with no
+ * parameters), by which, the doclet will instantiate and
+ * register the custom taglet.
+ *
+ * @since 9
+ */
+
+public interface Taglet {
+
+    /**
+     * Returns the set of locations in which a tag may be used.
+     * @return the set of locations in which a tag may be used
+     */
+    Set<Location> getAllowedLocations();
+
+    /**
+     * Indicates whether this taglet is for inline tags or not.
+     * @return true if this taglet is for an inline tag, and false otherwise
+     */
+    boolean isInlineTag();
+
+    /**
+     * Returns the name of the tag.
+     * @return the name of this custom tag.
+     */
+    String getName();
+
+    /**
+     * Returns the string representation of a series of instances of
+     * this tag to be included in the generated output.
+     * If this taglet is for an {@link #isInlineTag inline} tag} it will
+     * be called once per instance of the tag, each time with a singleton list.
+     * Otherwise, if this tag is a block tag, it will be called once per
+     * comment, with a list of all the instances of the tag in the comment.
+     * @param tags the list of {@code DocTree} containing one or more
+     *  instances of this tag
+     * @return the string representation of the tags to be included in
+     *  the generated output
+     */
+    String toString(List<? extends DocTree> tags);
+
+    /**
+     * The kind of location in which a tag may be used.
+     */
+    public static enum Location {
+        /** In an Overview document. */
+        OVERVIEW,
+        /** In the documentation for a module. */
+        MODULE,
+        /** In the documentation for a package. */
+        PACKAGE,
+        /** In the documentation for a class, interface or enum. */
+        TYPE,
+        /** In the documentation for a constructor. */
+        CONSTRUCTOR,
+        /** In the documentation for a method. */
+        METHOD,
+        /** In the documentation for a field. */
+        FIELD
+    }
+}
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java	Thu Mar 09 13:46:40 2017 -0800
@@ -29,6 +29,12 @@
  * to inspect the source-level structures of programs and
  * libraries, including API comments embedded in the source.
  *
+ * <p>
+ * The {@link StandardDoclet standard doclet} can be used to
+ * generate HTML-formatted documentation. It supports user-defined
+ * {@link Taglet taglets}, which can be used to generate customized
+ * output for user-defined tags in documentation comments.
+ *
  * <p style="font-style: italic">
  * <b>Note:</b> The declarations in this package supersede those
  * in the older package {@code com.sun.javadoc}. For details on the
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/Taglet.java	Thu Mar 09 08:45:21 2017 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2001, 2017, 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.javadoc.doclet.taglet;
-
-import java.util.List;
-import java.util.Set;
-
-import com.sun.source.doctree.DocTree;
-
-/**
- * The interface for a custom taglet supported by doclets such as
- * the {@link jdk.javadoc.doclets.StandardDoclet standard doclet}.
- * Custom taglets are used to handle custom tags in documentation
- * comments.
- *
- * <p>A custom taglet must implement this interface, and must have
- * a public default constructor (i.e. a public constructor with no
- * parameters), by which, the doclet will instantiate and
- * register the custom taglet.
- *
- * @since 9
- */
-
-public interface Taglet {
-
-    /**
-     * Returns the set of locations in which a tag may be used.
-     * @return the set of locations in which a tag may be used
-     */
-    Set<Location> getAllowedLocations();
-
-    /**
-     * Indicates whether this taglet is for inline tags or not.
-     * @return true if this taglet is for an inline tag, and false otherwise
-     */
-    boolean isInlineTag();
-
-    /**
-     * Returns the name of the tag.
-     * @return the name of this custom tag.
-     */
-    String getName();
-
-    /**
-     * Returns the string representation of a series of instances of
-     * this tag to be included in the generated output.
-     * If this taglet is for an {@link #isInlineTag inline} tag} it will
-     * be called once per instance of the tag, each time with a singleton list.
-     * Otherwise, if this tag is a block tag, it will be called once per
-     * comment, with a list of all the instances of the tag in the comment.
-     * @param tags the list of {@code DocTree} containing one or more
-     *  instances of this tag
-     * @return the string representation of the tags to be included in
-     *  the generated output
-     */
-    String toString(List<? extends DocTree> tags);
-
-    /**
-     * The kind of location in which a tag may be used.
-     */
-    public static enum Location {
-        /** In an Overview document. */
-        OVERVIEW,
-        /** In the documentation for a module. */
-        MODULE,
-        /** In the documentation for a package. */
-        PACKAGE,
-        /** In the documentation for a class, interface or enum. */
-        TYPE,
-        /** In the documentation for a constructor. */
-        CONSTRUCTOR,
-        /** In the documentation for a method. */
-        METHOD,
-        /** In the documentation for a field. */
-        FIELD
-    }
-}
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/package-info.java	Thu Mar 09 08:45:21 2017 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2003, 2016, 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 Taglet API provides a way to declare custom tags that can be
- * used by the standard doclet.
- *
- * <p style="font-style: italic">
- * <b>Note:</b> The declarations in this package supersede those
- * in the older package {@code com.sun.tools.doclets}.
- * </p>
- *
- * @since 9
- */
-package jdk.javadoc.doclet.taglet;
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/StandardDoclet.java	Thu Mar 09 08:45:21 2017 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2003, 2016, 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.javadoc.doclets;
-
-import java.util.Locale;
-import java.util.Set;
-
-import javax.lang.model.SourceVersion;
-
-import jdk.javadoc.doclet.Doclet;
-import jdk.javadoc.doclet.DocletEnvironment;
-import jdk.javadoc.doclet.Reporter;
-import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
-
-/**
- * This doclet generates HTML-formatted documentation for the specified modules, packages and types.
- */
-public class StandardDoclet implements Doclet {
-
-    private final HtmlDoclet htmlDoclet;
-
-    public StandardDoclet() {
-        htmlDoclet = new HtmlDoclet();
-    }
-
-    @Override
-    public void init(Locale locale, Reporter reporter) {
-        htmlDoclet.init(locale, reporter);
-    }
-
-    @Override
-    public String getName() {
-        return "Standard";
-    }
-
-    @Override
-    public Set<Doclet.Option> getSupportedOptions() {
-        return htmlDoclet.getSupportedOptions();
-    }
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return htmlDoclet.getSupportedSourceVersion();
-    }
-
-    @Override
-    public boolean run(DocletEnvironment docEnv) {
-        return htmlDoclet.run(docEnv);
-    }
-}
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/package-info.java	Thu Mar 09 08:45:21 2017 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2016, 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 standard, supported doclets.
- */
-package jdk.javadoc.doclets;
-
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AbstractDoclet.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AbstractDoclet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -34,7 +34,7 @@
 
 import jdk.javadoc.doclet.Doclet;
 import jdk.javadoc.doclet.DocletEnvironment;
-import jdk.javadoc.doclets.StandardDoclet;
+import jdk.javadoc.doclet.StandardDoclet;
 import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
 import jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder;
 import jdk.javadoc.internal.doclets.toolkit.builders.BuilderFactory;
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java	Thu Mar 09 13:46:40 2017 -0800
@@ -251,7 +251,7 @@
             tagClassLoader = fileManager.getClassLoader(TAGLET_PATH);
             Class<?> customTagClass = tagClassLoader.loadClass(classname);
             Object instance = customTagClass.getConstructor().newInstance();
-            Taglet newLegacy = new UserTaglet((jdk.javadoc.doclet.taglet.Taglet)instance);
+            Taglet newLegacy = new UserTaglet((jdk.javadoc.doclet.Taglet)instance);
             String tname = newLegacy.getName();
             Taglet t = customTags.get(tname);
             if (t != null) {
@@ -315,8 +315,8 @@
     private void checkTaglet(Object taglet) {
         if (taglet instanceof Taglet) {
             checkTagName(((Taglet) taglet).getName());
-        } else if (taglet instanceof jdk.javadoc.doclet.taglet.Taglet) {
-            jdk.javadoc.doclet.taglet.Taglet legacyTaglet = (jdk.javadoc.doclet.taglet.Taglet) taglet;
+        } else if (taglet instanceof jdk.javadoc.doclet.Taglet) {
+            jdk.javadoc.doclet.Taglet legacyTaglet = (jdk.javadoc.doclet.Taglet) taglet;
             customTags.remove(legacyTaglet.getName());
             customTags.put(legacyTaglet.getName(), new UserTaglet(legacyTaglet));
             checkTagName(legacyTaglet.getName());
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -34,10 +34,10 @@
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.util.Utils;
 
-import static jdk.javadoc.doclet.taglet.Taglet.Location.*;
+import static jdk.javadoc.doclet.Taglet.Location.*;
 
 /**
- * A taglet wrapper, allows the public taglet {@link jdk.javadoc.doclet.taglet.Taglet}
+ * A taglet wrapper, allows the public taglet {@link jdk.javadoc.doclet.Taglet}
  * wrapped into an internal Taglet representation.
  *
  *  <p><b>This is NOT part of any supported API.
@@ -49,9 +49,9 @@
  */
 public class UserTaglet implements Taglet {
 
-    final private jdk.javadoc.doclet.taglet.Taglet userTaglet;
+    final private jdk.javadoc.doclet.Taglet userTaglet;
 
-    public UserTaglet(jdk.javadoc.doclet.taglet.Taglet t) {
+    public UserTaglet(jdk.javadoc.doclet.Taglet t) {
         userTaglet = t;
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Thu Mar 09 13:46:40 2017 -0800
@@ -93,7 +93,7 @@
             com.sun.tools.doclets.standard.Standard.class;
 
     private static final Class<?> StdDoclet =
-            jdk.javadoc.doclets.StandardDoclet.class;
+            jdk.javadoc.doclet.StandardDoclet.class;
     /** Context for this invocation. */
     private final Context context;
 
--- a/langtools/src/jdk.javadoc/share/classes/module-info.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/module-info.java	Thu Mar 09 13:46:40 2017 -0800
@@ -40,8 +40,6 @@
     exports com.sun.tools.javadoc;
 
     exports jdk.javadoc.doclet;
-    exports jdk.javadoc.doclet.taglet;
-    exports jdk.javadoc.doclets;
 
     provides java.util.spi.ToolProvider
         with jdk.javadoc.internal.tool.JavadocToolProvider;
--- a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/Check.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/Check.java	Thu Mar 09 13:46:40 2017 -0800
@@ -26,12 +26,11 @@
 import java.util.Set;
 
 import com.sun.source.doctree.DocTree;
-import jdk.javadoc.doclet.taglet.Taglet;
+import jdk.javadoc.doclet.Taglet;
 
 public class Check implements Taglet {
 
     private static final String TAG_NAME = "check";
-    private static final String TAG_HEADER = "Check:";
 
     private final EnumSet<Location> allowedSet = EnumSet.allOf(Location.class);
 
@@ -45,6 +44,7 @@
      *
      * @return false since the tag is not an inline tag.
      */
+    @Override
     public boolean isInlineTag() {
         return false;
     }
@@ -54,28 +54,19 @@
      *
      * @return the name of this tag.
      */
+    @Override
     public String getName() {
         return TAG_NAME;
     }
 
     /**
-     * Given the DocTree representation of this custom tag, return its string
-     * representation.
-     *
-     * @param tag the DocTree representing this custom tag.
-     */
-    public String toString(DocTree tag) {
-        return "<dt><span class=\"simpleTagLabel\">" + TAG_HEADER + ":</span></dt><dd>" +
-                tag.toString() + "</dd>\n";
-    }
-
-    /**
-     * Given an array of DocTrees representing this custom tag, return its string
+     * Given a list of DocTrees representing this custom tag, return its string
      * representation.
      *
      * @param tags the array of tags representing this custom tag.
      * @return null to test if the javadoc throws an exception or not.
      */
+    @Override
     public String toString(List<? extends DocTree> tags) {
         return null;
     }
--- a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/TestLegacyTaglet.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/TestLegacyTaglet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4638723 8015882 8176131
+ * @bug 4638723 8015882 8176131 8176331
  * @summary Test to ensure that the refactored version of the standard
  * doclet still works with Taglets that implement the 1.4.0 interface.
  * @author jamieh
--- a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/ToDoTaglet.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/ToDoTaglet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -32,9 +32,9 @@
 import com.sun.source.doctree.UnknownBlockTagTree;
 import com.sun.source.doctree.UnknownInlineTagTree;
 import com.sun.source.util.SimpleDocTreeVisitor;
-import jdk.javadoc.doclet.taglet.Taglet;
-import jdk.javadoc.doclet.taglet.Taglet.Location;
-import static jdk.javadoc.doclet.taglet.Taglet.Location.*;
+import jdk.javadoc.doclet.Taglet;
+import jdk.javadoc.doclet.Taglet.Location;
+import static jdk.javadoc.doclet.Taglet.Location.*;
 
 
 /**
--- a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/UnderlineTaglet.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/UnderlineTaglet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -26,8 +26,8 @@
 import java.util.Set;
 
 import com.sun.source.doctree.DocTree;
-import jdk.javadoc.doclet.taglet.Taglet;
-import static jdk.javadoc.doclet.taglet.Taglet.Location.*;
+import jdk.javadoc.doclet.Taglet;
+import static jdk.javadoc.doclet.Taglet.Location.*;
 
 /**
  * A sample Inline Taglet representing {@underline ...}.  The text
--- a/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8035473 8154482 8154399 8159096 8176131
+ * @bug 8035473 8154482 8154399 8159096 8176131 8176331
  * @summary make sure the javadoc tool responds correctly to Xold,
  *          old doclets and taglets.
  * @library /tools/lib
@@ -87,7 +87,7 @@
             CLASS_NAME + "\\$OldTaglet.*");
 
     final static String OLD_STDDOCLET = "com.sun.tools.doclets.standard.Standard";
-    final static String NEW_STDDOCLET = "jdk.javadoc.doclets.StandardDoclet";
+    final static String NEW_STDDOCLET = "jdk.javadoc.doclet.StandardDoclet";
 
 
     public EnsureNewOldDoclet() throws Exception {
@@ -340,7 +340,7 @@
         }
     }
 
-    public static class NewTaglet implements jdk.javadoc.doclet.taglet.Taglet {
+    public static class NewTaglet implements jdk.javadoc.doclet.Taglet {
 
         @Override
         public Set<Location> getAllowedLocations() {
--- a/langtools/test/jdk/javadoc/tool/api/basic/taglets/UnderlineTaglet.java	Thu Mar 09 08:45:21 2017 -0800
+++ b/langtools/test/jdk/javadoc/tool/api/basic/taglets/UnderlineTaglet.java	Thu Mar 09 13:46:40 2017 -0800
@@ -45,7 +45,7 @@
 import com.sun.source.doctree.UnknownBlockTagTree;
 import com.sun.source.doctree.UnknownInlineTagTree;
 import com.sun.source.util.SimpleDocTreeVisitor;
-import jdk.javadoc.doclet.taglet.Taglet;
+import jdk.javadoc.doclet.Taglet;
 
 /**
  * A sample Inline Taglet representing {@underline ...}. This tag can