Bug 95911

Summary: [5.0][dom] Wrong node range for variable declaration fragment containing anonymous class declaration
Product: [Eclipse Project] JDT Reporter: Tobias Widmer <tobias_widmer>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC1   
Hardware: PC   
OS: All   
Whiteboard:

Description Tobias Widmer CLA 2005-05-19 06:12:46 EDT
N20050519-0010:

- Use following snippet and browse AST with AST view:

import java.util.Map;

class Test {
	public void foo() {
		Map<String, Number> map= new Map<String, Number>() {
			
		};
	}
}

-> The range of the VariableDeclarationFragment covers only "map= new 
Map<String" (length 19). It should cover the initializer with the anonymous 
class declaration as well

Note: This does not happen with field declarations
Comment 1 Olivier Thomann CLA 2005-05-19 10:30:34 EDT
Fixed and released in HEAD.
Regression test added in
org.eclipse.jdt.core.tests.dom.ASTConverter15Test.test0182/test0183.
Comment 2 Frederic Fusier CLA 2005-05-27 08:21:18 EDT
Verified for 3.1 RC1 with build I20050527-0010.