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

Key: IDEADEV-13309
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Alexey Kudravtsev
Reporter: Calum MacLean
Votes: 0
Watchers: 0
Operations

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

Move initializer to constructor: erroneous for arrays

Created: 21 Dec 06 12:45   Updated: 17 Jan 07 14:06
Component/s: Editor. Intention Actions
Fix Version/s: None

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

Build: 6,140
Severity: Low


 Description  « Hide
I have the following code:
public class Temp
{
    private String[] strings = { "Hello", "World" };

    public Temp()
    {
        System.out.println(strings);
    }
}

When I select "Move initializer to constructor" on "strings", I get the following:

public class Temp
{
    private String[] strings;

    public Temp()
    {
        strings = { "Hello", "World" };
        System.out.println(strings);
    }
}

Obviously the array initialization is now incorrect - it should be "new String[] { ...".



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.