[External] : RE: Docs generated by Java8 Javadoc are incompatible with "javadoc -source 8"

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri Dec 9 16:51:09 UTC 2022


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 
> <https://urldefense.com/v3/__https://github.com/openjdk/jdk/compare/master...wkia:jdk:fix-8297437__;!!ACWV5N9M2RV99hQ!Oo1QGcqNfPQkQgSk0twA8OLpeeyls4wp1DTAly44LtwabfZp6TB5yyhH5lKYS9Y9yAG8V_mAbmCmaMMFHXRUk55v$>
>
> If it’s appropriate I’d create a pull request.
>
> Thanks.
>
> - Roman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/javadoc-dev/attachments/20221209/59409cfd/attachment-0001.htm>


More information about the javadoc-dev mailing list