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

Check.checkDeprecated may call outermostClass for a PackageSymbol

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 8
    • tools
    • None
    • generic
    • generic

      The following stacktrace shows that Symbol.outmostClass is being called on a PackageSymbol.

      The NPE is a result of an edit in outermostClass that checks the kind of the result.

      If outermostClass is supposed to be valid on a PackageSymbol, and return null, it should be documented as such.

          [javac] java.lang.NullPointerException
          [javac] at com.sun.tools.javac.code.Symbol.outermostClass(Symbol.java:305)
          [javac] at com.sun.tools.javac.comp.Check.checkDeprecated(Check.java:2503)
          [javac] at com.sun.tools.javac.comp.Attr.checkId(Attr.java:2617)
          [javac] at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:2383)
          [javac] at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1809)
          [javac] at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:445)
          [javac] at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:432)
          [javac] at com.sun.tools.javac.comp.Attr.attribType(Attr.java:487)
          [javac] at com.sun.tools.javac.comp.Attr.attribType(Attr.java:480)
          [javac] at com.sun.tools.javac.comp.MemberEnter.attribImportType(MemberEnter.java:732)
          [javac] at com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:573)

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: