Empty lambda expression on same line
Asked Answered
C

1

6

Per default, IntelliJ 15.0.3 puts the closing brace of an empty lambda expression on the next line when reformatting the code.

Consumer<String> myFunc= aString -> {
};

In my opinion this is slightly detrimental to code readability and I want to keep the empty lambda expression on the same line:

Consumer<String> myFunc= aString -> {};

Where can I find the setting to change this?

Coverture answered 4/2, 2016 at 11:58 Comment(0)
C
9

It's in Settings (shortcut is Strg+Alt+S) underEditorCode StyleJavaWrapping and BracesKeep when reformattingSimple lambdas in one line:

intellij settings

Coverture answered 4/2, 2016 at 11:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.