RFR: JDK-8254796: Cleanup pervasive unnecessary parameter

Kumar Srinivasan ksrini at openjdk.java.net
Fri Oct 16 00:47:12 UTC 2020


On Wed, 14 Oct 2020 22:32:52 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> This is a small cleanup to remove an annoying extra parameter (docEnv) being based around when creating the doclet.
> 
> (there's a hint of the old world too, when it is referred to as "rd" in one place, short for "RootDoc": the
> corresponding class in the old world ;-) )

Generally the changes are fine, I had a question about the old world specific to why RootDoc would be null if generate
was called, but again the old world had a lot of goofy things going on.

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java line 119:

> 117:
> 118:     void generate() throws DocFileIOException, SimpleDocletException {
> 119:         if (docEnv == null || outputdir == null) {

Why was it checking for docEnv or  RootDoc being null ? Was this ever being called without RootDoc being initialized ?

-------------

PR: https://git.openjdk.java.net/jdk/pull/672


More information about the javadoc-dev mailing list