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

Removal of unused static import is not idempotent #1005

Closed
NathanEckert opened this issue Dec 11, 2023 · 1 comment
Closed

Removal of unused static import is not idempotent #1005

NathanEckert opened this issue Dec 11, 2023 · 1 comment

Comments

@NathanEckert
Copy link

NathanEckert commented Dec 11, 2023

Hi,

I found that the following file needs to have to formatter applied twice before reaching a stable state.

I am using version 1.18.1-all-deps

package com.example;

import static java.lang.Math.sqrt;


public class JavaFormatterExample {

  public static void unusedStaticImport() {
  }
}

After the first application:

package com.example;


public class JavaFormatterExample {

  public static void unusedStaticImport() {}
}

After the second application (one line deleted after the package declaration):

package com.example;

public class JavaFormatterExample {

  public static void unusedStaticImport() {}
}

Regards,

@cushon
Copy link
Collaborator

cushon commented Dec 11, 2023

#598

@cushon cushon closed this as completed Dec 11, 2023
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