Code Formatting Indentation Issue with Lambdas

Answered

Is there any way I can get IntelliJ to format this code better? I think the issue is that it drops the closing brace/parens to 0 instead of shifting continuation properly. Either that or don't handle a chained call as if it were a continuation. (4 space indent, 8 space continuation).

 

return Option.of("").map(s -> {
        return s;
})
        .getOrNull();

 

Should probably be

 

return Option.of("").map(s -> {
                return s;
        })
        .getOrNull();

 

0
1 comment

Please sign in to leave a comment.