javadoc crashes: class cast exception com.sun.tools.javac.code.Symtab$6
authorVladimir Petko <vladimir.petko@canonical.com>
Sat, 10 Aug 2024 08:08:49 +0000 (10:08 +0200)
committerMatthias Klose <doko@ubuntu.com>
Sat, 10 Aug 2024 08:08:49 +0000 (10:08 +0200)
commit9875f8227945a27b183cb8ad1b633cb4ac2978bb
tree596e6e68ad036a18e69a73779257a65adc5d2901
parent5702946f36e08dc12b487e4afc4691001e1a1751
javadoc crashes: class cast exception 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

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