-
-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
Prettier-Java 2.7.3
--print-width 100Input:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
Iterable<Map.Entry<String, Object>> iterable = (sortMapKeys && value.size() > 1
? value.entrySet().stream().sorted(Map.Entry.comparingByKey())
: value.entrySet().stream())::iterator;
}
}Output:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
Iterable<Map.Entry<String, Object>> iterable = (sortMapKeys && value.size() > 1
? value.entrySet().stream().sorted(Map.Entry.comparingByKey())
: value.entrySet().stream())::iterator;
}
}Expected behavior:
Unsure how but prettier. 😄 Perhaps:
Iterable<Map.Entry<String, Object>> iterable = (
sortMapKeys && value.size() > 1
? value.entrySet().stream().sorted(Map.Entry.comparingByKey())
: value.entrySet().stream()
)
::iterator;Metadata
Metadata
Assignees
Labels
No labels