-
Bug
-
Resolution: Fixed
-
P2
-
5.0, 6, 6u14
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2133759 | 5.0 | Peter Ahe | P2 | Closed | Won't Fix |
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
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
- backported by
-
JDK-2133759 crash: java.lang.NullPointerException at com.sun.tools.javac.comp.Check.checkCompatibleConcretes(Che
- Closed
- duplicates
-
JDK-6747877 Complex use of generics does not compile (javac and javadoc both crash)
- Closed
-
JDK-6890041 java.lang.NullPointerException in Java compiler
- Closed
- relates to
-
JDK-6292765 java.lang.NullPointerException at Check.checkCompatibleConcretes
- Closed
-
JDK-6404691 Complicated Generic types crash the compiler
- Closed