Bug 96298 - [ast rewrite] NPE in TrackedNodePosition if all tracked nodes in group are marked as deleted
Summary: [ast rewrite] NPE in TrackedNodePosition if all tracked nodes in group are ma...
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: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-23 09:40 EDT by Tobias Widmer CLA
Modified: 2005-05-27 10:47 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-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