[External] : RE: Docs generated by Java8 Javadoc are incompatible with "javadoc -source 8"
Hannes Wallnoefer
hannes.wallnoefer at oracle.com
Mon Dec 12 15:35:19 UTC 2022
Hi Roman,
In case you want to refine your fix, I think Jon’s comment on the JBS issue provides a good approach for detecting which format to use:
https://bugs.openjdk.org/browse/JDK-8297437
Package/element lists are read in class `jdk.javadoc.internal.doclets.toolkit.util.Extern`, so I guess this is where you would want to implement this.
Hannes
> On 9 Dec 2022, at 17:51, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
>
> Roman,
>
> You are welcome to file a PR, subject to OCA rules, etc, but that being said, your comparison does not seem like a valid fix for JDK-8297437.
>
> Once again, I emphasise to you that the `--source` option is not a valid way to determine the output format, as you do in these lines of getValidHtmlName.
>
> {
>
>
> SourceVersion srcVer = configuration.docEnv.getSourceVersion();
>
>
> if (SourceVersion.RELEASE_8 != srcVer && SourceVersion.RELEASE_9 != srcVer) {
>
>
> return name;
>
>
> }
>
>
> }
>
> If nothing else, the code above makes far too simple a choice: the correct choice will depend on the library being linked to. When running javadoc on some "recent" code, some of the libraries being linked to may have been generated by JDK8-era javadoc (with HTML4-style ids) and others may have been generated by more recent versions of javadoc (with HTML5-style ids).
>
> -- Jon
>
>
>
> On 12/9/22 4:48 AM, Roman Marchenko wrote:
>> Hi Jon,
>>
>> May I propose a fix for JDK-8297437?
>> I prepared the changes in my JDK fork, so here is the branch comparison:
>> https://github.com/openjdk/jdk/compare/master...wkia:jdk:fix-8297437
>> If it’s appropriate I’d create a pull request.
>>
>> Thanks.
>>
>> - Roman
More information about the javadoc-dev
mailing list