Commits

Anonymous committed 7a90b1a

Issue #206586: Memory leak - fixed. Do not create JavaDocs for local variables.

Comments (0)

Files changed (1)

src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java

     public void visitVarDef(JCVariableDecl tree) {
         super.visitVarDef(tree);
         if (tree.sym != null &&
-                tree.sym.kind == Kinds.VAR &&
-                !isParameter(tree.sym)) {
+                tree.sym.getKind().isField()) {
             String docComment = env.toplevel.docComments.get(tree);
             Position.LineMap lineMap = env.toplevel.lineMap;
             docenv.makeFieldDoc(tree.sym, docComment, tree, lineMap);