Name: skT45625 Date: 07/10/2000
C:\TEMP>javac -J-version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Server VM (build 2.0fcs-E, mixed mode)
C:\TEMP>javac MyDialog.java
An exception has occurred in the compiler (1.3.0). Please file a bug at the Java
Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your
program and the following diagnostic in your report. Thank you.
java.lang.InternalError: assertion failed
at com.sun.tools.javac.v8.util.Util.assert(Util.java:25)
at com.sun.tools.javac.v8.comp.Items$LocalItem.<init>(Items.java:375)
at com.sun.tools.javac.v8.comp.Items.makeLocalItem(Items.java:97)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:1286)
at com.sun.tools.javac.v8.tree.Tree$Ident.visit(Tree.java:983)
at com.sun.tools.javac.v8.comp.Gen.genExpr(Gen.java:418)
at com.sun.tools.javac.v8.comp.Gen.genArgs(Gen.java:440)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:928)
at com.sun.tools.javac.v8.tree.Tree$Apply.visit(Tree.java:785)
at com.sun.tools.javac.v8.comp.Gen.genExpr(Gen.java:418)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:873)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:401)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:507)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:477)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:452)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1366)
at com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:302)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:407)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
---- SOURCE ----
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.plaf.basic.BasicArrowButton;
import java.awt.*;
import java.awt.event.*;
import java.util.ResourceBundle;
import java.util.StringTokenizer;
public class MyDialog
{
public MyDialog()
{
}
public void setDetails( ResourceBundle resources, String addr, String
suite, String[][] data )
{
final JPanel jp = new JPanel( new GridBagLayout() );
class MyDefaultCellEditor extends DefaultCellEditor
{
MyDefaultCellEditor()
{
super( new JTextField() );
JButton mdcejb = new BasicArrowButton(
BasicArrowButton.SOUTH );
mdcejb.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent
ae )
{
JOptionPane.showMessageDialog(
jp, editorComponent, null, JOptionPane.PLAIN_MESSAGE );
}
});
delegate = new EditorDelegate() {
public void setValue( Object value )
{
super.setValue( value );
}
};
}
}
String[] headers = { "a", "b", "c" };
JTable jt = new JTable( data, headers );
for( int i = 0; i < headers.length; ++i )
{
TableColumn jtc = jt.getColumn( headers[i] );
if( headers[i].equals( "c" ) )
{
jtc.setCellEditor( new MyDefaultCellEditor() );
}
}
}
}
---- END SOURCE ----
The JDK 1.2.2 javac also fails to compile this class, for a completely different
reason. ( It can't see delegate and editorComponent from EditorDelegate. )
Not your responsibility, but the Symantec VisualCafe 3.0 compiler using the JDK
1.3 rt.jar also fails in a third different way. IBM's Jikes v1.06 compiles it
without complaint, using either the 1.2.2 or the 1.3 rt.jar.
(Review ID: 107002)
======================================================================
- duplicates
-
JDK-4257961 internal error in Items$LocalItem.<init>
-
- Closed
-