Code Style: .stream() on new line

Answered

In my code style settings I have "Keep when reformatting" "Line breaks" checked, and "Chained method calls" set to wrap always and "Wrap first call" checked. When running "Reformat Code" IntelliJ changes

list
.stream()
.map(Obj::method)
.collect(Collectors.tolist());

to

list.stream()
.map(Obj::method)
.collect(Collectors.tolist());

while any other call chain I have tested seems to behave like my mentioned settings imply, aka actually wrapping the first method call. Is there a way I can get IntelliJ to also put .stream() calls on a new line?

0
2 comments

Please file a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA with a small sample project to reproduce. Make sure to copy your code style into this project.

0
Avatar
Permanently deleted user

This seems to be a problem with the plugin "google-java-format", as disabling the plugin fixed this issue.

0

Please sign in to leave a comment.