Project
IntelliJ IDEA
Priority
Major
Type
Bug
Fix versions
No Fix versions
State
Open
Assignee
Alexey Kudravtsev
Subsystem
Editor. Intention Actions
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Nikolay Chashnikov
    4 years ago (12 Mar 2007 18:11)
  • Updated by   root
    2 years ago (17 Jan 2010 20:43)
  • Jira: IDEADEV-15184
    (history, comments)
 
IDEA-37482 "Invert if condition" produce incorrect code for if-statement just before while-statement
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
Before:
  public static Object m(VirtualFile file) {
    Map map = new HashMap();
    if (map.isEmpty()) {
      return null;
    }

    while (file != null) {
      file = file.getParent();
    }
    return null;
  }


After:
  public static Object m(VirtualFile file) {
    Map map = new HashMap();
    if (!map.isEmpty()) {
      continue;
    }
    return null;

    while (file != null) {
      file = file.getParent();
    }
    return null;
  }
Comments (0)
 
History
 
Linked Issues (?)
 
Issue has no comments