United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7060926 Attr.PostAttrAnalyzer misses a case
JDK-7060926 : Attr.PostAttrAnalyzer misses a case

Details
Type:
Bug
Submit Date:
2011-06-30
Status:
Closed
Updated Date:
2012-02-24
Project Name:
JDK
Resolved Date:
2012-02-24
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
Attr.PostAttrAnalyzer is supposed to detect and fill in null values in a partially attributed tree resulting from Attr errors.   It misses the operator field in a JCAssignop tree.

                                    

Comments
EVALUATION

Ooops.   

Does not affect batch mode javac, but can affect downstream clients (such as NetBeans) that set the compilePolicy beyond the default value.
                                     
2011-06-30
SUGGESTED FIX

Add the following method to PostAttrAnalyzer

        @Override
        public void visitAssignop(JCAssignOp that) {
            if (that.operator == null)
                that.operator = new OperatorSymbol(names.empty, syms.unknownType, -1, syms.noSymbol);
            super.visitAssignop(that);
        }
                                     
2011-06-30



Hardware and Software, Engineered to Work Together