Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 228950 - [pull up] exception if target calls super with multiple parameters
Summary: [pull up] exception if target calls super with multiple parameters
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M1   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-25 16:31 EDT by Josh Gerdes CLA
Modified: 2008-07-16 05:42 EDT (History)
2 users (show)

See Also:


Attachments
patch (4.73 KB, patch)
2008-07-03 05:13 EDT, Benjamin Muskalla CLA
daniel_megert: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Gerdes CLA 2008-04-25 16:31:47 EDT
Steps to reproduce:
1. Create a file with the following classes:

public class A
{
    void X(int p1, int p2)
    {
    }
}

class B extends A
{
    void Y()
    {
    	super.X(1, 2);
    }
}

2. Run the "Pull Up" refactoring on Y with the default options.
3. Click on the "Finish" button.

Expected Output:
Move Y to class A and change super.X(1, 2) to X(1, 2), as below:

public class A
{
    void X(int p1, int p2)
    {
    }
    
    void Y()
    {
    	X(1, 2);
    }
}

class B extends A
{
}

Actual Output:
Shows error message in a message box:
"An unexpected exception occurred while performing the refactoring. See the error log for more details.\n\nStart node is not a original child of the given list"

Note: X must have at least two parameters for the bug to appear. Also, if the user clicks on the "Next" buttons instead of "Finish", the following error appears in a third screen of the refactoring window: "An unexpected exception occurred while creating a change object. See the error log for more details."
Comment 1 Benjamin Muskalla CLA 2008-07-03 05:13:10 EDT
Created attachment 106405 [details]
patch

The problem is that the wrong ListRewriter is used
Comment 2 Martin Aeschlimann CLA 2008-07-03 06:13:01 EDT
patch released > 20080703. Thanks Benjamin!