JDK-6923080 : TreeScanner.visitNewClass should scan tree.typeargs
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-02-03
  • Updated: 2012-01-13
  • Resolved: 2012-01-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b84Fixed
Related Reports
Relates :  
Description
com.sun.tools.javac.tree.TreeScanner visitNewClass omits to scan tree.typeargs, but should.

    public void visitNewClass(JCNewClass tree) {
        scan(tree.encl);
        scan(tree.clazz);
        scan(tree.args);
        scan(tree.def);
    }

Comments
EVALUATION visitApply also needs fixing. public void visitApply(JCMethodInvocation tree) { + scan(tree.typeargs); scan(tree.meth); scan(tree.args); }
03-02-2010

EVALUATION Note: com.sun.source.util.TreeScanner is OK. public R visitNewClass(NewClassTree node, P p) { R r = scan(node.getEnclosingExpression(), p); r = scanAndReduce(node.getIdentifier(), p, r); r = scanAndReduce(node.getTypeArguments(), p, r); r = scanAndReduce(node.getArguments(), p, r); r = scanAndReduce(node.getClassBody(), p, r); return r; }
03-02-2010

EVALUATION Ooops.
03-02-2010