src/share/classes/com/sun/tools/javac/tree/TreeInfo.java

changeset 1281
067f51db3402
parent 1280
5c0b3faeb0b0
child 1300
f071cd32d297
equal deleted inserted replaced
1280:5c0b3faeb0b0 1281:067f51db3402
283 283
284 public static String getCommentText(Env<?> env, JCTree tree) { 284 public static String getCommentText(Env<?> env, JCTree tree) {
285 DocCommentTable docComments = (tree.hasTag(JCTree.Tag.TOPLEVEL)) 285 DocCommentTable docComments = (tree.hasTag(JCTree.Tag.TOPLEVEL))
286 ? ((JCCompilationUnit) tree).docComments 286 ? ((JCCompilationUnit) tree).docComments
287 : env.toplevel.docComments; 287 : env.toplevel.docComments;
288 return docComments.getCommentText(tree); 288 return (docComments == null) ? null : docComments.getCommentText(tree);
289 } 289 }
290 290
291 /** The position of the first statement in a block, or the position of 291 /** The position of the first statement in a block, or the position of
292 * the block itself if it is empty. 292 * the block itself if it is empty.
293 */ 293 */

mercurial