문제

IntelliJ formats this code

TypeReference ref = new TypeReference<ArrayList<CrawlRequest>>() {};

by inserting a newline after the left curly brace

TypeReference ref = new TypeReference<ArrayList<CrawlRequest>>() {
};

Is there any way to stop it from doing this?

도움이 되었습니까?

해결책

Have a look at the Java Code Style settings, in the Wrapping and Braces tab. Oddly enough, it's the Simple classes in one line option that controls the adding of the newline in your line of code.

IntelliJ Code style settings page

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top