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

javac dies with NullPointerException in com.sun.tools.javac.v8.comp.Resolve.find

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.1
    • tools
    • beta2
    • generic
    • linux_2.4

      javac dies with the following exception:
      ----------------------------------------------------------------------
      [th125165@thurka-linux Development]$ javac example/C.java
      example/C.java:18: cannot access example.a.A
      file example/a/A.class not found
              public CInner(Object o) {
                            ^
      An exception has occurred in the compiler (1.3.1-rc1). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your program and the following diagnostic in your report. Thank you.
      java.lang.NullPointerException
      at com.sun.tools.javac.v8.comp.Resolve.findMemberType(Resolve.java:489)
      at com.sun.tools.javac.v8.comp.Resolve.findMemberType(Resolve.java:507)
      at com.sun.tools.javac.v8.comp.Resolve.findMemberType(Resolve.java:501)
      at com.sun.tools.javac.v8.comp.Resolve.findType(Resolve.java:563)
      at com.sun.tools.javac.v8.comp.Resolve.findIdent(Resolve.java:610)
      at com.sun.tools.javac.v8.comp.Resolve.resolveIdent(Resolve.java:771)
      at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:1058)
      at com.sun.tools.javac.v8.tree.Tree$Ident.visit(Tree.java:983)
      at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:234)
      at com.sun.tools.javac.v8.comp.Attr.attribType(Attr.java:269)
      at com.sun.tools.javac.v8.comp.Enter$MemberEnter._case(Enter.java:730)
      at com.sun.tools.javac.v8.tree.Tree$VarDef.visit(Tree.java:470)
      at com.sun.tools.javac.v8.comp.Enter$MemberEnter.memberEnter(Enter.java:642)
      at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:397)
      at com.sun.tools.javac.v8.tree.Tree$VarDef.visit(Tree.java:470)
      at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:234)
      at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:276)
      at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:360)
      at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
      at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:234)
      at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:276)
      at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1429)
      at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:347)
      at com.sun.tools.javac.v8.tree.Tree$ClassDef.visit(Tree.java:402)
      at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:234)
      at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:276)
      at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1429)
      at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:378)
      at com.sun.tools.javac.v8.Main.compile(Main.java:247)
      at com.sun.tools.javac.Main.main(Main.java:16)
      [th125165@thurka-linux Development]$

      -----------------------------------------------------------------------------------------
      How to reproduce:
      I prepared the simplest example of this problem. This example is attached to this bug as file example.tar.gz. Unpack it for example to /tmp directory. Go to /tmp directory and issue "javac example/C.java" command. This should produce reported NPE.

            gafter Neal Gafter (Inactive)
            thurka Tomáš Hůrka
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: