Bug 22054 - Can't extract local variable from super send [refactoring]
Summary: Can't extract local variable from super send [refactoring]
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 22951 23055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-30 15:29 EDT by Peter Burka CLA
Modified: 2002-09-19 11:05 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Burka CLA 2002-07-30 15:29:55 EDT
- Import the following Java class into Eclipse:

public class Foo {
    public String toString() {
    	return super.toString() + new Integer(1).toString();	
    }
}

- Select 'super.toString()' and choose 'Extract local variable'
- An error message appears saying: 'Cannot extract this kind of expression 
into a local variable'.
Comment 1 Adam Kiezun CLA 2002-08-20 11:36:59 EDT
this is caused by the fact that calling resolveTypeBinding() on this 
SuperMethodInvocation returns null.

i created a test for this and added to our suite (it's disabled until we have a 
fix here)
Comment 2 Timothy Halloran CLA 2002-08-29 13:18:56 EDT
*** Bug 22951 has been marked as a duplicate of this bug. ***
Comment 3 Olivier Thomann CLA 2002-09-03 16:29:21 EDT
*** Bug 23055 has been marked as a duplicate of this bug. ***
Comment 4 Olivier Thomann CLA 2002-09-04 13:11:00 EDT
Fixed and released in 2.1 stream.
Comment 5 David Audel CLA 2002-09-19 04:53:41 EDT
Verified.
Comment 6 Olivier Thomann CLA 2002-09-19 11:05:22 EDT
Regression test added (test0380)