Bug 102018 - [refactoring] Assertion fails in ExtractTempRefactoring.
Summary: [refactoring] Assertion fails in ExtractTempRefactoring.
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Tobias Widmer CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
: 104828 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-28 10:25 EDT by Brian Miller CLA Friend
Modified: 2005-09-02 10:29 EDT (History)
3 users (show)

See Also:


Attachments
Minimal fix (854 bytes, patch)
2005-07-22 16:19 EDT, Markus Keller CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Miller CLA Friend 2005-06-28 10:25:50 EDT
Steps:
1) Hilite all of the System...getKey() expression.
2) Pick menu item Refactor>>Extract Local Variable.
3) Press Ok.  The wizard then warns of a duplicate local variable.
4) Press Back.
5) Change suggested variable name from 'key' to 'foo'.
6) Press Ok.  Assertion then fails.

------------------------ Bug.java ----------------
class Bug {
    {
        System.getenv().entrySet().iterator().next().getKey();
        String key;
     }
}
Comment 1 Markus Keller CLA Friend 2005-07-22 16:14:40 EDT
*** Bug 104828 has been marked as a duplicate of this bug. ***
Comment 2 Markus Keller CLA Friend 2005-07-22 16:19:08 EDT
Created attachment 25195 [details]
Minimal fix

The problem is that fImportEdit is not re-created when checkFinalConditions()
is called again.
Comment 3 Tobias Widmer CLA Friend 2005-08-08 08:24:14 EDT
Fixed in HEAD 20050808
Comment 4 Tobias Widmer CLA Friend 2005-08-10 08:58:17 EDT
+1 for 3.1.1 from my side

Martin, can you please vote?
Comment 5 Martin Aeschlimann CLA Friend 2005-08-10 10:31:40 EDT
patch looks good, verified it works.
Comment 6 Tobias Widmer CLA Friend 2005-08-10 12:06:11 EDT
Fixed in 3.1.1 maintenance stream > 20050810
Comment 7 Tom Hofmann CLA Friend 2005-09-02 09:53:17 EDT
verifying...
Comment 8 Tom Hofmann CLA Friend 2005-09-02 10:29:02 EDT
verified scenario works as expected.