RFR: JDK-8254796: Cleanup pervasive unnecessary parameter

Jonathan Gibbons jjg at openjdk.java.net
Mon Oct 19 17:07:20 UTC 2020


On Fri, 16 Oct 2020 00:41:05 GMT, Kumar Srinivasan <ksrini 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 ;-) )
>
> 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 ?

It's hard to believe the value was ever null, at least in normal operation.

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

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


More information about the javadoc-dev mailing list