RFR: 8242564: javadoc crashes:: class cast exception com.sun.tools.javac.code.Symtab$6 [v2]
Vladimir Petko
vpetko at openjdk.org
Sat Jan 27 04:32:33 UTC 2024
On Sat, 27 Jan 2024 00:00:36 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.
>
> Vladimir Petko has updated the pull request incrementally with two additional commits since the last revision:
>
> - rename test classes as per review comments
> - move test comments into method's javadoc comment
Thank you for reviewing PR!
I've updated as per comments, and if you find that test comments are not strictly necessary, i can remove those.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17435#issuecomment-1912980729
More information about the javadoc-dev
mailing list