Integrated: 8242564: javadoc crashes:: class cast exception com.sun.tools.javac.code.Symtab$6

Vladimir Petko vpetko at openjdk.org
Mon Jan 29 21:31:48 UTC 2024


On Tue, 16 Jan 2024 02:17:10 GMT, Vladimir Petko <vpetko at openjdk.org> wrote:

> '--ignore-source-errors' allows generating Javadoc for the packages that contain compilation errors. 
> 
> jdk.javadoc.internal.doclets.toolkit.util.ClassTree generates a type hierarchy for javadoc that may include error types such as 
> 
> class Foo extends Bar {
> }
> ``` 
> where Bar is undefined. 
> 
> The user still wants to generate documentation for Foo and have Bar as a text label. 
> 
> For the unknown class Bar it is impossible to detect the enclosing class/file and javadoc crashes with exception. 
> 
> This PR returns Kind.OTHER for the error types, avoiding the javadoc crash.

This pull request has now been integrated.

Changeset: 64c3642c
Author:    Vladimir Petko <vpetko at openjdk.org>
Committer: Jonathan Gibbons <jjg at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/64c3642c57719940855b220025b33758950b3980
Stats:     61 lines in 2 files changed: 56 ins; 0 del; 5 mod

8242564: javadoc crashes:: class cast exception com.sun.tools.javac.code.Symtab$6

Reviewed-by: jjg

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

PR: https://git.openjdk.org/jdk/pull/17435


More information about the javadoc-dev mailing list