6709246: ClassCastException in javadoc

Reviewed-by: jjg
This commit is contained in:
Peter von der Ahe 2009-09-08 14:08:26 -07:00 committed by Jonathan Gibbons
parent f4883897ce
commit 528f733b28
3 changed files with 89 additions and 1 deletions

View file

@ -60,7 +60,12 @@ public class AnnotationDescImpl implements AnnotationDesc {
*/
public AnnotationTypeDoc annotationType() {
ClassSymbol atsym = (ClassSymbol)annotation.type.tsym;
return (AnnotationTypeDoc)env.getClassDoc(atsym);
if (annotation.type.isErroneous()) {
env.warning(null, "javadoc.class_not_found", annotation.type.toString());
return new AnnotationTypeDocImpl(env, atsym);
} else {
return (AnnotationTypeDoc)env.getClassDoc(atsym);
}
}
/**