Reputation: 9072
I'm having the problem that IntelliJ Idea keeps adding a blank new line after the class statement. A class like the one below
public class A {
private String name;
}
gets formatted into this one below.
public class A {
private String name;
}
The following diff show the blank new line between the class statement and the first field declaration.
My code style settings on Wrapping and Braces tab are as follows:
I was not able to find a setting that suppresses this additional new line. Can anyone help me on this?
Upvotes: 4
Views: 2354
Reputation: 2777
In settings: Editor|Code Style|Java on the 'Blank Lines' tab you probably have 'After class header' set to 1. Change this value to 0 and the unwanted blank line won't be added by the formatter.
Upvotes: 4