Skip to content

Replace static imports with non-static imports #1379

Open
@szpigielm

Description

@szpigielm

Hi is it possible to setup spotless to replace static imports with non-static imports in Java?

Example:

Static import:

import static org.enums.Value.SOME_ENUM_VALUE;

public class Test {
    public void method() {
        var example = SOME_ENUM_VALUE;
    }
}

Replace with

import org.enums.Value.SOME_ENUM_VALUE;

public class Test {
    public void method() {
        var example = Value.SOME_ENUM_VALUE;
    }
}

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