History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-25607
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Eugene Zhuravlev
Reporter: dennis haupt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

debugger breaks code logic

Created: 07 Mar 08 14:28   Updated: 28 Mar 08 17:53
Component/s: Debugger
Fix Version/s: Diana 8280, Selena 7.0.4

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,744
Fixed in build: 8,256
Severity: High


 Description  « Hide
the "automatic method call and show result"-feature (the one having the watch glasses icon in the variables view) calls next() on iterators which messes up the logic. it should only evaluate the result of simple getters

 All   Comments   Work Log   Change History      Sort Order:
Eugene Zhuravlev - 21 Mar 08 18:29
Used the following code to reproduce, but was not able to:

public class TestIteratorRendering {
public static void main(String[] args) {
List<String> list = new ArrayList<String>();
list.add("one");
list.add("two");
list.add("three");
Iterator<String> iterator = list.iterator();
while (iterator.hasNext()) { // breakpoint here String str = iterator.next(); System.out.println(str); }
}
}

Could you give an example in which the "iterator.next()" expression is auto-created?


Eugene Zhuravlev - 28 Mar 08 17:50
Nevermind, reproduced.
This is true for expressions like this: "Data data = iterator.next().getData()"
As a workaround please use ExtractVariable refactoring:

MyObject obj = iterator.next();
Data data = obj.getData();