Bug 76874

Summary: [1.5] Out of memory reconciling some invalid enum source
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Philipe Mulet CLA 2004-10-23 09:39:33 EDT
Following source causes out of memory when reconciled:

public enum Enum1 {
	
	BLEU(){ 
		void foo() {
			System.out.println();
		}
	},
	BLANC,
	ROUGE;

	main
}
Comment 1 Philipe Mulet CLA 2004-10-23 17:59:11 EDT
Problem got introduced when addressing DOM AST conversion issue arising from
enum recovery (was setting declarationEnd on enum constants).
The declarationEnd is only set at end of consumption of enum constants now, but
it was used to set a checkpoint during recovery, and thus was looping back at
the beginning of unit.

Once this is addressed, there is still quite some work to get the proper structure  
rebuild with this testcase.
In particular, the flag for detecting if insideEnumConstantPart is not dealing
with nested enum class bodies.
Comment 2 David Audel CLA 2004-10-27 05:48:47 EDT
Fixed.

The out of memory problem does not occurs inside buil I20041026 but the final
fix is inside the next build.
Comment 3 Frederic Fusier CLA 2004-11-04 06:27:33 EST
Verified for 3.1 M3 with build I200411040010 + jdt.core HEAD