Bug 96298

Summary: [ast rewrite] NPE in TrackedNodePosition if all tracked nodes in group are marked as deleted
Product: [Eclipse Project] JDT Reporter: Tobias Widmer <tobias_widmer>
Component: CoreAssignee: Martin Aeschlimann <martinae>
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-23 09:40:28 EDT
N20050523-0010:

The class org.eclipse.jdt.internal.core.dom.rewrite.TrackedNodePosition uses 
the method TextEdit#getCoverage to determine the range of the tracked nodes. 
TextEdit#getCoverage is spec'ed to return null if all text edits are marked as 
deleted, which is the case if the tracked nodes have been deleted during AST 
rewrite.
The implementations of getStartPosition() and getLength() should handle this 
case and explicitely return -1.
Comment 1 Martin Aeschlimann CLA 2005-05-25 05:18:50 EDT
fixed > 20050525
Comment 2 David Audel CLA 2005-05-27 10:47:00 EDT
Verified in i20050527-0010