Bug 13765 - Compiler uses reflect for errors - won't work on CLDC
Summary: Compiler uses reflect for errors - won't work on CLDC
Status: RESOLVED DUPLICATE of bug 36718
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-14 23:10 EDT by Peter Burka CLA
Modified: 2003-06-18 10:31 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Burka CLA 2002-04-14 23:10:48 EDT
Tested against WSDD 4.0, but I suspect that the problem persists in the latest 
2.0 builds.

When the compiler compiles a problem class, it appears to generate code which 
depends on reflect.  This causes errors on configurations which do not include 
reflect (e.g. CLDC, MIDP and several Websphere Custom Environment configs).

Ideally, the compiler would detect that reflect classes are not available, and 
generate simpler error handling code.

The stack trace that results from problem classes on CLDC VMs is quite 
misleading:

java.lang.Error: IncompatibleClassChangeError: java/lang/Class.getConstructor
([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;

Stack trace:
   java/lang/Throwable.<init>()V
   java/lang/Throwable.<init>(Ljava/lang/String;)V
   com/ibm/oti/error/Error.<init>(Ljava/lang/String;)V
   com/ibm/oti/error/IncompatibleClassChangeError.<init>(Ljava/lang/String;)V
   net/quux/scrabble/ui/AddUserDialog.<init>
(Lnet/quux/scrabble/ui/ScoreCard;Lorg/eclipse/swt/widgets/Shell;)V
   net/quux/scrabble/ui/ScoreCard.<init>(Lorg/eclipse/swt/widgets/Composite;)V
   Main.main([Ljava/lang/String;)V
Comment 1 Philipe Mulet CLA 2002-04-15 07:15:30 EDT
Will consider post 2.0.
Comment 2 Philipe Mulet CLA 2003-06-13 04:39:01 EDT
Got addressed
Comment 3 Philipe Mulet CLA 2003-06-18 10:31:38 EDT

*** This bug has been marked as a duplicate of 36718 ***