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

javac crash with improper overrider

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 5.0
    • 5.0
    • tools
    • b32
    • generic
    • solaris_8

      using TL from around b28 (early November 2003)

      abstract class ByteBuffer implements Comparable<ByteBuffer> {
          public int compareTo(Object o) {
              return 1;
          }
      }

      results in

      java.lang.NullPointerException
              at com.sun.tools.javac.comp.TransTypes.addBridgeIfNeeded(TransTypes.java:256)
              at com.sun.tools.javac.comp.TransTypes.addBridges(TransTypes.java:292)
              at com.sun.tools.javac.comp.TransTypes.addBridges(TransTypes.java:311)
              at com.sun.tools.javac.comp.TransTypes.translateClass(TransTypes.java:676)
              at com.sun.tools.javac.comp.TransTypes.visitClassDef(TransTypes.java:351)
              at com.sun.tools.javac.tree.Tree$ClassDef.accept(Tree.java:429)
              at com.sun.tools.javac.comp.TransTypes.translate(TransTypes.java:329)
              at com.sun.tools.javac.comp.TransTypes.translateTopLevelClass(TransTypes.java:693)
              at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:439)
              at com.sun.tools.javac.main.Main.compile(Main.java:598)
              at com.sun.tools.javac.main.Main.compile(Main.java:546)
              at com.sun.tools.javac.Main.compile(Main.java:41)
              at com.sun.tools.javac.Main.main(Main.java:32)

            gafter Neal Gafter (Inactive)
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: