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

crash when accessing protected method from non-extending class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.0
    • 1.3.0
    • tools
    • kestrel
    • generic, sparc
    • generic, solaris_7

      Foo.java:
      ---------

      import java.net.*;

      public class Foo{
       public static void main(String[] args){
          String foo = URLConnection.guessContentTypeFromName("mike.html");
       }
      }

      Compiler output for 1.3.0-I:

      An exception has occurred in the compiler. (v0.8)
      Please file a bug report by sending your program and the following diagnostic to
      ###@###.###

      Thank you.

      java.lang.NullPointerException
      at com.sun.tools.javac.v8.comp.TransInner.accessClass(TransInner.java:555)
      at com.sun.tools.javac.v8.comp.TransInner.accessSymbol(TransInner.java:456)
      at com.sun.tools.javac.v8.comp.TransInner.access(TransInner.java:645)
      at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1535)
      at com.sun.tools.javac.v8.tree.Tree$Select.visit(Tree.java:813)
      at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:44)
      at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1448)
      at com.sun.tools.javac.v8.tree.Tree$Apply.visit(Tree.java:672)
      at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:44)
      at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:125)
      at com.sun.tools.javac.v8.tree.Tree$VarDef.visit(Tree.java:424)
      at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:44)
      at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:54)
      at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:130)
      at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:443)
      at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:44)
      at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:119)
      at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1357)
      at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:399)
      at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:44)
      at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1269)
      at com.sun.tools.javac.v8.tree.Tree$ClassDef.visit(Tree.java:365)
      at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:44)
      at com.sun.tools.javac.v8.comp.TransInner.translate(TransInner.java:1221)
      at com.sun.tools.javac.v8.comp.TransInner.translateTopLevelClass(TransInner.java:1563)
      at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:361)
      at com.sun.tools.javac.v8.Main.compile(Main.java:266)
      at com.sun.tools.javac.Main.main(Main.java:28)

      william.maddox@Eng 1999-10-01

            wmaddoxsunw William Maddox (Inactive)
            wmaddoxsunw William Maddox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: