Skip to content

Indentation: Multiple lambdas as method parameters #3182

@garricko

Description

@garricko

For this code:

import java.util.function.Supplier;

public class Sample {
  public static void main(String[] args) {
    foo(() -> {
      // seems happy with this
      return null;
    }, () -> {
      // seems to want more indent here
      return null;
    });
  }

  public static void foo(Supplier<Object> x, Supplier<Object> y) {}
}

I see the following violations with version 6.18:

[WARNING] src/main/java/Sample.java:[10] (indentation) Indentation: 'block' child have incorrect indentation level 6, expected level should be one of the following: 8, 10, 12.
[WARNING] src/main/java/Sample.java:[11] (indentation) Indentation: 'block rcurly' have incorrect indentation level 4, expected level should be one of the following: 6, 8.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions