Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnonInnerLengthCheck inconsistent with lambdas #1076

Open
andreoss opened this issue Jun 26, 2020 · 1 comment
Open

AnonInnerLengthCheck inconsistent with lambdas #1076

andreoss opened this issue Jun 26, 2020 · 1 comment

Comments

@andreoss
Copy link

andreoss commented Jun 26, 2020

A inner class of length above 20 is considered a violation:

    public Foo() {
        this(new Scalar<Bar>() {
            @Override
            public Bar value() throws Exception {
                   // Lengthy method
                }
            }
        });
    }

The same code but with lambda is considered okay

    public Foo() {
        this(() -> {
               // Lengthy method
            }
        });
    }

The feature request for checkstyle: checkstyle/checkstyle#8341

@0crat
Copy link
Collaborator

0crat commented Jun 26, 2020

@krzyk/z please, pay attention to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants