Bug 117382

Summary: synthetic class$N fields generated unnecessarily
Product: [Eclipse Project] JDT Reporter: Art Dyer <art.dyer>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1.2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Art Dyer CLA 2005-11-21 17:07:08 EST
When compiling for a 1.5 target, class literals are compiled using the ldc bytecode and do not require the synthetic fields 'static Class class$0' etc.  These fields are generated anyway but never used.
Comment 1 Olivier Thomann CLA 2005-11-21 17:11:01 EST
I'll investigate this one.
Comment 2 Olivier Thomann CLA 2005-11-21 18:29:18 EST
Fixed and released in HEAD.
The synthetic field was created when the source level was lower or equals than 1.5 instead of lower than 1.5.
Added regression test in org.eclipse.jdt.core.tests.compiler.regression.Compliance_1_3.test103,
org.eclipse.jdt.core.tests.compiler.regression.Compliance_1_4.test103,
org.eclipse.jdt.core.tests.compiler.regression.Compliance_1_5.test103.
Comment 3 Philipe Mulet CLA 2005-11-22 10:18:23 EST
pls backport to 3.1.2
Comment 4 Olivier Thomann CLA 2005-12-13 10:37:26 EST
Verified for 3.2M4 in I20051212-2000
Comment 5 Maxime Daniel CLA 2006-01-10 05:18:18 EST
Verified for 3.1.2 using build M20060109-1200.
Comment 6 Frederic Fusier CLA 2006-01-10 05:26:02 EST
Verified for 3.1.2 using build M20060109-1200 (maxime)