Bug 104021 - [quick fix] Introduce new local with casted type applied more than once
Summary: [quick fix] Introduce new local with casted type applied more than once
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 114305 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-15 11:00 EDT by Christof Marti CLA
Modified: 2009-08-06 12:17 EDT (History)
2 users (show)

See Also:


Attachments
exclude defined var names (5.83 KB, patch)
2008-03-22 12:25 EDT, Benjamin Muskalla CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christof Marti CLA 2005-07-15 11:00:25 EDT
3.1

"Introduce new local with casted type" can be applied more than once resulting
in compile errors. Starting with:
class Foo {
	void bar(Object o) {
		if (o instanceof String) {
		}
	}
}
applying it twice results in:
class Foo {
	void bar(Object o) {
		if (o instanceof String) {
			String string= (String) o;
			String string= (String) o;
		}
	}
}
Comment 1 Benjamin Muskalla CLA 2008-03-22 12:25:26 EDT
Created attachment 93195 [details]
exclude defined var names

Excludes already defined variable names in this context
Comment 2 Martin Aeschlimann CLA 2008-04-11 11:00:25 EDT
fix released > 20080411 (minor changes to the patch)
Thanks Benjamin.
Comment 3 Markus Keller CLA 2009-08-06 12:17:48 EDT
*** Bug 114305 has been marked as a duplicate of this bug. ***