javadoc crashes: class cast exeception com.sun.tools.javac.code.Symtab$6
authorVladimir Petko <vladimir.petko@canonical.com>
Tue, 30 Jul 2024 06:37:36 +0000 (08:37 +0200)
committerMatthias Klose <doko@ubuntu.com>
Tue, 30 Jul 2024 06:37:36 +0000 (08:37 +0200)
commit43054c298f0444dab81ced794cc0e43d5db61ce2
tree4bcb214e0e44c760aeb0933a8ac3fdb7e8a6a665
parent9035fe3fc956a0ae227444ec55a06fb39bb517d1
javadoc crashes: class cast exeception com.sun.tools.javac.code.Symtab$6

Bug: https://github.com/openjdk/jdk/pull/17435
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057500
Applied-Upstream: commit, 64c3642c57719940855b220025b33758950b3980
Last-Update: 2024-01-24

This is a proposed fix for JDK-8242564. Javadoc option '--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 an exception.

Gbp-Pq: Name jdk-8242564.patch
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolEnvironment.java
test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java