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

crash: java.lang.NullPointerException at com.sun.tools.javac.comp.Check.checkCompatibleConcretes(Che

XMLWordPrintable

    • 5.0
    • b67
    • x86
    • linux, windows_2000, windows_xp
    • Verified

        FULL PRODUCT VERSION :
        java version "1.5.0_01"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
        Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        MS Windows 2000 [Version 5.00.2195]

        A DESCRIPTION OF THE PROBLEM :
        Javac crashes in compiling the test code below.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Create a file Test.java with the source code below. Then run javac Test.java.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        compiled classes
        ACTUAL -
        javac crash

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        An exception has occurred in the compiler (1.5.0_01). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
        java.lang.NullPointerException
                at com.sun.tools.javac.comp.Check.checkCompatibleConcretes(Check.java:1141)
                at com.sun.tools.javac.comp.Check.checkCompatibleSupertypes(Check.java:1495)
                at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2451)
                at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2406)
                at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2355)
                at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:444)
                at com.sun.tools.javac.main.Main.compile(Main.java:592)
                at com.sun.tools.javac.main.Main.compile(Main.java:544)
                at com.sun.tools.javac.Main.compile(Main.java:67)
                at com.sun.tools.javac.Main.main(Main.java:52)


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        interface Ac<S extends St<S,A>,A extends Ac<S,A>> { };

        interface St<S extends St<S,A>,A extends Ac<S,A>> { };

        abstract class CSS<X, Y> implements St<CSS<X, Y>, CSN<X, Y>> {};

        final class CSN<X, Y> extends CSS<X, Y> implements Ac<CSS<X, Y>, CSN<X, Y>> {};
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        If class CSN is defined in the file BEFORE class CSS, then the program compiles.
        ###@###.### 2005-1-17 17:38:56 GMT

              ahe Peter Ahe
              rmandalasunw Ranjith Mandala (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: