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

Key: IDEADEV-23555
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Alexander Chernikov
Reporter: Serge Baranov
Votes: 0
Watchers: 2
Operations

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

Introduce field problem

Created: 27 Nov 07 10:53   Updated: 09 Dec 07 17:32
Component/s: Refactoring
Fix Version/s: Selena 7.0.2

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

Build: 7,573
Fixed in build: 7,591
Severity: Medium


 Description  « Hide
Support feedback:

Sample code:

package dummy;

public class IntroduceFieldBug {
    public void demo(String val){
        if ("test1".equals(val)){
            //do somethign
        } else if ("test2".equals(val)) {
            //... something else
        }
    }
}

When selecting "test2" string constant and pressing Ctrl+Alt+F (Introduce
field) and select "Initialize in current method" (default value), then
following result happens:

package dummy;

public class IntroduceFieldBug {
    private String badField;

    public void demo(String val){
        if ("test1".equals(val)){
            //do somethign
        }badField = "test2";else if (badField.equals(val)) {
            //... something else
        }
    }
}


 All   Comments   Work Log   Change History      Sort Order:
Alexander Chernikov - 03 Dec 07 19:03
7583: fix confirmed.