Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023835

TreeMaker.QualIdent() too leafy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 7, 8
    • tools
    • None
    • b110
    • generic
    • generic
    • Verified

      The tree generated by treeMaker.QualIdent(syms.stringType.tsym) has one too many selects in it. Between TreeMaker.QualIdent and Treemaker.isUnqualifiable, the tree generation climbs up to the enclosing package of "java" because isUnqualifiable is stopping based on looking for the symbol's owner to be null which doesn't happen with the symbol for "java". Please see the attached test program.


      test : JCFieldAccess,SELECT,MEMBER_SELECT type:java.lang.String sym:java.lang.String
        src: .java.lang.String
        selected: JCFieldAccess,SELECT,MEMBER_SELECT type:java.lang sym:java.lang
          src: .java.lang
          selected: JCFieldAccess,SELECT,MEMBER_SELECT type:java sym:java
            src: .java
            selected: JCIdent,IDENT,IDENTIFIER type: sym:
              src:
              name:

        1. T.java
          2 kB
        2. T7.java
          1 kB

            jlahoda Jan Lahoda
            ahgross Andrew Gross
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: