Bug 13765

Summary: Compiler uses reflect for errors - won't work on CLDC
Product: [Eclipse Project] JDT Reporter: Peter Burka <peter_burka>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: 3.0 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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 ***