Name: mc57594 Date: 03/12/97
The following code chucks an exception in the compiler:
class B {
{
try {
}
catch (Exception e) {}
}
}
The error thrown is:
sun.tools.java.CompilerError: copyInline
at sun.tools.tree.TryStatement.copyInline(TryStatement.java:180)
at sun.tools.tree.CompoundStatement.copyInline(CompoundStatement.java:137)
at
sun.tools.tree.InlineMethodExpression.copyInline(InlineMethodExpression.java
:75)
at sun.tools.tree.MethodExpression.makeVarInits(MethodExpression.java:559)
at sun.tools.tree.MethodExpression.checkValue(MethodExpression.java:298)
at sun.tools.tree.MethodExpression.check(MethodExpression.java:334)
at sun.tools.tree.ExpressionStatement.check(ExpressionStatement.java:46)
at sun.tools.tree.CompoundStatement.check(CompoundStatement.java:70)
at sun.tools.tree.Statement.checkMethod(Statement.java:98)
at sun.tools.javac.SourceField.check(SourceField.java:396)
at sun.tools.javac.SourceClass.checkFields(SourceClass.java:780)
at sun.tools.javac.SourceClass.checkInternal(SourceClass.java:554)
at sun.tools.javac.SourceClass.check(SourceClass.java:516)
at sun.tools.javac.Main.compile(Main.java:306)
at sun.tools.javac.Main.main(Main.java:456)
======================================================================
[chamness 5/25/97] Marimba reported the same thing:
Name: Klaas Waslander
Company: Marimba Inc.
Synopsis: copInLine error, when catching NoSuchMethodError in my class
Description:
The error:
sun.tools.java.CompilerError: copyInline
at sun.tools.tree.TryStatement.copyInline(TryStatement.java:180)
at sun.tools.tree.CompoundStatement.copyInline(CompoundStatement.java:137)
at sun.tools.tree.InlineMethodExpression.copyInline(InlineMethodExpression.java:75)
at sun.tools.tree.MethodExpression.makeVarInits(MethodExpression.java:565)
at sun.tools.tree.MethodExpression.checkValue(MethodExpression.java:304)
at sun.tools.tree.MethodExpression.check(MethodExpression.java:340)
at sun.tools.tree.ExpressionStatement.check(ExpressionStatement.java:46)
at sun.tools.tree.Statement.checkBlockStatement(Statement.java:120)
at sun.tools.tree.CompoundStatement.check(CompoundStatement.java:70)
at sun.tools.tree.Statement.checkMethod(Statement.java:98)
at sun.tools.javac.SourceField.check(SourceField.java:402)
at sun.tools.javac.SourceClass.checkFields(SourceClass.java:852)
at sun.tools.javac.SourceClass.checkInternal(SourceClass.java:615)
at sun.tools.javac.SourceClass.check(SourceClass.java:566)
at sun.tools.javac.Main.compile(Main.java:318)
at sun.tools.javac.Main.main(Main.java:473)
Example source code that gives the error:
import java.awt.*;
public class Test extends Panel {
{
try {
enableEvents(
AWTEvent.COMPONENT_EVENT_MASK |
AWTEvent.CONTAINER_EVENT_MASK |
AWTEvent.FOCUS_EVENT_MASK |
AWTEvent.KEY_EVENT_MASK |
AWTEvent.MOUSE_EVENT_MASK |
AWTEvent.MOUSE_MOTION_EVENT_MASK |
AWTEvent.WINDOW_EVENT_MASK |
AWTEvent.ACTION_EVENT_MASK |
AWTEvent.ADJUSTMENT_EVENT_MASK |
AWTEvent.ITEM_EVENT_MASK |
AWTEvent.TEXT_EVENT_MASK
);
} catch (NoSuchMethodError e) {
System.out.println("Not converting JDK11 events...");
}
}
}
Now: when commenting out the try/catch everything works fine!
company - Marimba Inc. , email - ###@###.###
============================================================================
roger.lewis@Eng 1997-07-16
elease: 1.1.3
Hardware: i586
OSversion: win_95
Synopsis: sun.tools.java.CompilerError: copyInline
Description:
Compiling my source code, which yields this exception:
javac c:\Dev\M1\src\liebert\dpg\framework\db\LxLogManager.java
sun.tools.java.CompilerError: copyInline
at sun.tools.tree.TryStatement.copyInline(TryStatement.java:180)
at sun.tools.tree.CompoundStatement.copyInline(CompoundStatement.java:137)
at sun.tools.tree.InlineMethodExpression.copyInline(InlineMethodExpression.java:75)
at sun.tools.tree.MethodExpression.makeVarInits(MethodExpression.java:565)
at sun.tools.tree.MethodExpression.checkValue(MethodExpression.java:304)
at sun.tools.tree.MethodExpression.check(MethodExpression.java:340)
at sun.tools.tree.ExpressionStatement.check(ExpressionStatement.java:46)
at sun.tools.tree.Statement.checkBlockStatement(Statement.java:120)
at sun.tools.tree.CompoundStatement.check(CompoundStatement.java:70)
at sun.tools.tree.Statement.checkMethod(Statement.java:98)
at sun.tools.javac.SourceField.check(SourceField.java:402)
at sun.tools.javac.SourceClass.checkFields(SourceClass.java:852)
at sun.tools.javac.SourceClass.checkInternal(SourceClass.java:615)
at sun.tools.javac.SourceClass.check(SourceClass.java:566)
at sun.tools.javac.Main.compile(Main.java:318)
at sun.tools.javac.Main.main(Main.java:473)
error: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
1 error
I have just added the folowwing class initializer:
public abstract class LxLogManager implements LxDebugScaffolding
{
{
s_PlugInManager =
new LxPlugInManager("liebert.dpg.framework.db.LxLogManager$LxLogger");
try
{
s_PlugInManager.loadPlugIns("liebert\\dpg\\framework\\db", false);
}
catch (Throwable oops)
{
LxDBG.log("loadEm(): Caught " + oops.toString());
}
}
// ....
protected static LxPlugInManager s_PlugInManager;
}
company - Liebert Systems , email - ###@###.###
============================================================================
- duplicates
-
JDK-4075158 sun.tools.java.CompilerError: copyInline: Using try in Instance Block
-
- Closed
-
-
JDK-4031754 compiler crashes on try within static initializer
-
- Closed
-
-
JDK-4064191 Compiler crushes when keyword "static" is missed before static block
-
- Closed
-
-
JDK-4066676 The compiler crashes on threads in initializers
-
- Closed
-
-
JDK-4082551 error: An error has occurred in the compiler; please file a bug report
-
- Closed
-
-
JDK-4094362 Javac aborts trying to compile inner class code derived from ciner079.
-
- Closed
-
-
JDK-4094388 Modena test ciner093 causes javac to abort.
-
- Closed
-
-
JDK-4094985 compiler crashes when it encounters try/catch statement in instance initializer
-
- Closed
-
-
JDK-4107436 Try-catch in instance initializer causes compiler error
-
- Closed
-
-
JDK-4052448 compiler crashed when trying to use fancy static initializer, ..TryStatement.cop
-
- Closed
-
-
JDK-4056174 missing static qualifier causes a compiler error
-
- Closed
-