Bug 38674 - 3.0 M1 - Preserve unused local variables doesn't seem to work
Summary: 3.0 M1 - Preserve unused local variables doesn't seem to work
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-09 20:33 EDT by Scott Eade CLA
Modified: 2003-06-10 06:42 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 Scott Eade CLA 2003-06-09 20:33:56 EDT
I have some static initialisers that I am forcing to execute from another class
using an unused local variable thus:

        Class c = Layout.class; // c is never used

When compiled with Eclipse 2.1 (actually one of the maintenance builds) this has
the desired effect of forcing the static initializers in my Layout class to be
executed, but in Eclipse 3.0-M1 it does not (even though the Java, Compiler,
Compliance and Classfiles, Preserve unused local variables preference is set).
Comment 1 Philipe Mulet CLA 2003-06-10 06:42:00 EDT
This has nothing to do with preservation of unused local variable. This is a 
consequence of fix for bug 37565. FYI, class literal is spec'ed to not perform 
class init, and we had a bug (as other compilers).

See related bug for link to spec.