Bug 95911 - [5.0][dom] Wrong node range for variable declaration fragment containing anonymous class declaration
Summary: [5.0][dom] Wrong node range for variable declaration fragment containing anon...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-19 06:12 EDT by Tobias Widmer CLA
Modified: 2005-05-27 08:21 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 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.