Name: saC57035 Date: 12/27/96
In some cases (I didn't find out the exact condition) internal error
occurs instead of reporting on cyclic inheritance.
Here is the example demonstrating the bug:
---- StubMenuComponentPeer.java ----------------------
package javasoft.sqe.tests.api.java.awt.Toolkit;
import java.awt.*;
import java.awt.peer.*;
import java.util.Vector;
public class StubMenuComponentPeer extends StubMenuComponentPeer implements MenuItemPeer {
private Vector log;
public StubMenuComponentPeer (Vector log) {
this.log = log;
}
void dispose() {
log.addElement("StubMenuComponentPeer dispose");
}
}
-- The output ----------------
java.lang.StackOverflowError
at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
at sun.tools.java.ClassDefinition.getInnerClass(ClassDefinition.java)
at sun.tools.java.ClassDefinition.getInnerClass(ClassDefinition.java)
<.......................>
at sun.tools.java.ClassDefinition.getInnerClass(ClassDefinition.java)
at sun.tools.java.ClassDefinition.getInnerClass(ClassDefinition.java)
at sun.tools.java.ClassDefinition.resolveName(ClassDefinition.java)
at sun.tools.java.Environment.resolveNames(Environment.java)
at sun.tools.javac.SourceField.resolveTypeStructure(SourceField.java)
at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java)
at sun.tools.javac.SourceClass.basicCheck(SourceClass.java)
at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
at sun.tools.javac.Main.compile(Main.java)
at sun.tools.javac.Main.main(Main.java)
error: An error has occurred in the compiler; please file a bug report (###@###.###).
1 error
------------------------------
======================================================================
allan.jacobs@Eng 1997-03-05
JCK test clss04905 has this problem. For that test, the problem goes
away when the package statement is removed.
- duplicates
-
JDK-4073739 The compiler falls into an infinite loop instead of giving an error.
- Closed