| Summary: | [extract interface] does not correctly update "for" loops if they are used with a "foreach" semantic | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Arnaud Payement <arnaud.payement> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, milos.gligoric |
| Version: | 3.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
The refactoring CANNOT be reproduced with: Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 1 Build id: 20120920-080 *** This bug has been marked as a duplicate of bug 195817 *** |
Using M20060629-1905 If we use the Extract Interface refactoring on the following class "List" without selecting any member, class List { public void RemoveTail() { } } then, in the following class Test, the "for" construct is incorrectly updated. class Test { public static void main(String[] args) { List[] array = new List[10]; for(List l : array) { l.RemoveTail(); } } } After the refactoring we have: class Test { public static void main(String[] args) { IBag[] array = new IBag[10]; for(IBag l : array) { l.RemoveTail(); } } } But "l" does not contain a member RemoveTail.