diff -r 5c0b3faeb0b0 -r 067f51db3402 src/share/classes/com/sun/tools/javac/tree/TreeInfo.java --- a/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java Wed Jun 20 13:23:26 2012 -0700 +++ b/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java Thu Jun 21 13:22:21 2012 -0700 @@ -285,7 +285,7 @@ DocCommentTable docComments = (tree.hasTag(JCTree.Tag.TOPLEVEL)) ? ((JCCompilationUnit) tree).docComments : env.toplevel.docComments; - return docComments.getCommentText(tree); + return (docComments == null) ? null : docComments.getCommentText(tree); } /** The position of the first statement in a block, or the position of