-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2fcs
-
sparc
-
solaris_2.4
-
Verified
Name: akC45999 Date: 05/21/98
The Java Virtual Machine Specification, 5.3.1 Loading Using the Default Class Loader
reads:
8.This phase of loading must also detect the following errors:
If the class or interface named as the direct superclass of C is in fact an
interface, loading throws an Incompatible-Class-Change-Error
But the following test shows that this check is not done at this
phase of loading.
----------------- file defaultLoader00601.java
import java.io.PrintStream;
public class defaultLoader00601 {
public static int run(String argv[], PrintStream out) {
try {
Class cl= Class.forName("defaultLoader00601a");
out.println("No exception");
return 2;
} catch (IncompatibleClassChangeError e) {
} catch (Throwable e) {
out.println("Wrong exception:"+e);
return 2;
}
return 0;
}
public static void main(String args[]) {
System.exit(run(args, System.out) + 95/*STATUS_TEMP*/);
}
}
----------------- file defaultLoader00601a.jasm
interface defaultLoader00601i {
}
class defaultLoader00601a extends defaultLoader00601i {
}
-------------------------
Test execution:
novo64% java -version
java version "1.2beta4"
Classic VM (build JDK-1.2beta4-F, green threads, sunwjit)
novo64% javac *java
novo64% jasm *jasm
novo64% java defaultLoader00601
No exception
novo64%
======================================================================