diff -r 34e254ffd0e7 -r 5c0b3faeb0b0 src/share/classes/com/sun/tools/javac/model/JavacElements.java --- a/src/share/classes/com/sun/tools/javac/model/JavacElements.java Tue Jun 19 13:25:58 2012 +0100 +++ b/src/share/classes/com/sun/tools/javac/model/JavacElements.java Wed Jun 20 13:23:26 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,11 +28,14 @@ import java.lang.annotation.Annotation; import java.lang.annotation.Inherited; import java.util.Map; + import javax.lang.model.SourceVersion; import javax.lang.model.element.*; import javax.lang.model.type.DeclaredType; import javax.lang.model.util.Elements; import javax.tools.JavaFileObject; +import static javax.lang.model.util.ElementFilter.methodsIn; + import com.sun.tools.javac.code.*; import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.code.TypeTags; @@ -47,9 +50,7 @@ import com.sun.tools.javac.tree.TreeScanner; import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.Name; - import static com.sun.tools.javac.tree.JCTree.Tag.*; -import static javax.lang.model.util.ElementFilter.methodsIn; /** * Utility methods for operating on program elements. @@ -361,7 +362,7 @@ JCCompilationUnit toplevel = treeTop.snd; if (toplevel.docComments == null) return null; - return toplevel.docComments.get(tree); + return toplevel.docComments.getCommentText(tree); } public PackageElement getPackageOf(Element e) {