Name: laC46010 Date: 01/26/99
The following funny corner case breaks javac (ver. 1.2.2) compilation
to NullPointerException. If you try javac (ver 1.1.6) you'll get
"segmentation fault" failure.
Test example and javac diagnostics follow:
-------------------------------------------------------
novo35% cat test.java
package java.lang;
class Object {
Object() {
super();
}
}
novo35% java -version
java version "1.2.2"
Classic VM (build JDK-1.2.2-C, green threads, sunwjit)
novo35% javac test.java
java.lang.NullPointerException
at sun.tools.tree.MethodExpression.checkValue(Compiled Code)
at sun.tools.tree.MethodExpression.check(Compiled Code)
at sun.tools.tree.ExpressionStatement.check(Compiled Code)
at sun.tools.tree.Statement.checkBlockStatement(Compiled Code)
at sun.tools.tree.CompoundStatement.check(Compiled Code)
at sun.tools.tree.Statement.checkMethod(Compiled Code)
at sun.tools.javac.SourceMember.check(Compiled Code)
at sun.tools.javac.SourceClass.checkMembers(Compiled Code)
at sun.tools.javac.SourceClass.checkInternal(Compiled Code)
at sun.tools.javac.SourceClass.check(Compiled Code)
at sun.tools.javac.Main.compile(Compiled Code)
at sun.tools.javac.Main.main(Compiled Code)
error: An exception has occurred in the compiler; please file a bug report (
http://java.sun.com/cgi-bin/bugreport.cgi).
1 error
-------------------------------------------------------
======================================================================
- duplicates
-
JDK-4093617 Object class has no superclass: javac dies on "super()" in Object constructor
- Closed