-
Bug
-
Resolution: Fixed
-
P4
-
5.0, 6, 6u21
-
b03
-
x86
-
linux, windows_xp, windows_vista
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2142599 | 7u40 | Unassigned | P4 | Closed | Fixed |
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows XP
A DESCRIPTION OF THE PROBLEM :
The following simple code causes a
java.lang.NullPointerException at Check.checkCompatibleConcretes:
class A<T> {}
class B<S> extends A< C<Object> > {}
class C<S> extends B<S> {}
// Note: The bug may be related to the bug with internal review ID: 478380
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just try to compile the following code:
class A<T> {}
class B<S> extends A< C<Object> > {}
class C<S> extends B<S> {}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Successful compilation
ACTUAL -
java.lang.NullPointerException at Check.checkCompatibleConcretes
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An exception has occurred in the compiler (1.5.0_04). 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 ----------
class A<T> {}
class B<S> extends A< C<Object> > {}
class C<S> extends B<S> {}
---------- END SOURCE ----------
###@###.### 2005-06-30 09:26:06 GMT
- backported by
-
JDK-2142599 java.lang.NullPointerException at Check.checkCompatibleConcretes
- Closed
- duplicates
-
JDK-6372782 possibly invalid "abstract method not implemented" emitted by compiler
- Closed
-
JDK-6404691 Complicated Generic types crash the compiler
- Closed
-
JDK-6974771 javac throws NullPointerException as a result of a static import
- Closed
-
JDK-7009524 Generic supertype not allowed to use generic subtype
- Closed
-
JDK-2139393 Complicated Generic types crash the compiler
- Closed
-
JDK-2165581 possibly invalid "abstract method not implemented" emitted by compiler
- Closed
-
JDK-2165582 Complicated Generic types crash the compiler
- Closed
- relates to
-
JDK-6218229 crash: java.lang.NullPointerException at com.sun.tools.javac.comp.Check.checkCompatibleConcretes(Che
- Closed