Skip to content

Auto-apply syntactic sugar #2010

@nickeldan

Description

@nickeldan

Many constructions in Java can be simplified with syntactic sugar. For example,

foo.ifPresent(value -> value.someMethod());

can be simplified to

foo.ifPresent(Foo::someMethod);

Also,

foo.methodWithCallback(new Foo.Callback() {
    @Override
    public void
    onDone(int result) {
        ...
    }
});

can be simplified to

foo.methodWithCallback(result -> ...);

It would be really helpful to have a plugin that could auto-apply all such simplifications.

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