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

Key: IDEA-12955
Type: Bug Bug
Status: Open Open
Assignee: Maxim Shafirov
Reporter: Bas Leijdekkers
Votes: 0
Watchers: 0
Operations

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

Extract Method does not respect "force braces always" code style setting

Created: 28 May 07 17:32   Updated: 31 May 07 19:13
Component/s: Refactoring, Code Formatting and Code Style

Build: 6,985
Severity: Medium


 Description  « Hide
In the code style settings I have all "Force Braces" settings set to always, but Extract method does not insert braces in the following example:
class Xtract {
    void me(int i) {
        // extract from here \/
        if (i ==10) {
            return;
        }
        // to here /\
        
        
        System.out.println("i: " + i);
    }
}

Produces:

class Xtract {
    void me(int i) {
        // missing braces \/
        if (test(i))
            return;
        // missing braces /\


        System.out.println("i: " + i);
    }

    private static boolean test(int i) {
        if (i ==10) {
            return true;
        }
        return false;
    }
}


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