Name: laC46010 Date: 11/26/96
JDK1.1M Java crashes on several tests of the JCK1.1
with java.lang.NullPointerException at sun.tools.tree.MethodExpression.inline():
lang/CLSS/clss217/clss21715/clss21715.html
lang/CLSS/clss217/clss21708/clss21708.html
lang/CLSS/clss217/clss21710/clss21710.html
lang/CLSS/clss217/clss21702/clss21702.html
See log and test source below.
> /export/ld32/jdk_1.1M/bin/javac -d /export/ld12/java/leo/res/dev-jdk1.1-ff/classes tests/lang/CLSS/clss217/clss21715/clss21715.java
java.lang.NullPointerException
at sun.tools.tree.MethodExpression.inline(MethodExpression.java)
at sun.tools.tree.ExpressionStatement.inline(ExpressionStatement.java)
at sun.tools.tree.CompoundStatement.inline(CompoundStatement.java)
at sun.tools.javac.SourceField.inline(SourceField.java)
at sun.tools.javac.SourceField.code(SourceField.java)
at sun.tools.javac.SourceClass.compileClass(SourceClass.java)
at sun.tools.javac.SourceClass.compile(SourceClass.java)
at sun.tools.javac.Main.compile(Main.java)
at sun.tools.javac.Main.main(Main.java)
tests/lang/CLSS/clss217/clss21715/clss21715.java:20: Can't reference this before the superclass constructor has been called.
super(this.meth());
^
error: An exception has occurred in the compiler; please file a bug report (###@###.###).
1 error, 1 warning
Test source:
------------------------------------------------------------------
// Ident: @(#)clss21715.java 1.1 96/11/11
// Copyright 11 Nov 1996 Sun Microsystems, Inc. All Rights Reserved
package javasoft.sqe.tests.lang.clss217.clss21715;
import java.io.PrintStream;
class clss21715_b {
int field1;
clss21715_b(int arg) {
field1 = arg;
}
int meth() {
return 777;
}
}
class clss21715_a extends clss21715_b {
int field2;
clss21715_a() {
super(this.meth());
}
int meth() {
return 666;
}
}
public class clss21715 {
public static void main(String argv[])
{
System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
}
public static int run(String argv[],PrintStream out) {
clss21715_a x = new clss21715_a();
return 2;
}
}
------------------------------------------------------------------
======================================================================