Bug 126598

Summary: [DOM][AST] String[] s = {"",,,} leads to wrong positions after conversion
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2006-02-06 11:35:16 EST
The recovered statement is not properly converted inside the AST converter. The positions are wrong.

package test0629;

public class X {
   	String[] s =  {"",,,};
}

We look for the position of the comma or semi-colon to find where the fragment corresponding to s is ending.
Doing this we don't check the balance of braces.
Comment 1 Olivier Thomann CLA 2006-02-06 11:49:00 EST
Fixed and released in HEAD.
Added regression tests:
org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2.test0629/0630/0631
Comment 2 David Audel CLA 2006-02-15 09:03:05 EST
Verified for 3.2 M5 using build I20060215-0010