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

Organize imports drops same-named static imports from separate types/packages #732

Closed
eric-milles opened this issue Sep 25, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@eric-milles
Copy link
Member

Consider the following:

package p
class A {
  public static boolean isSomething(String s) {
    ...
  }
}
class B {
  public static boolean isSomething(Iterable i) {
    ...
  }
}
import static p.A.isSomething
import static p.B.isSomething

String s = ...
Iterable i = ...
isSomething(s)
isSomething(i)

Organize Imports (Ctrl+Shift+O) drops the two imports. This is a common use case when using something like Apache Commons which adds similar named methods for Strings, Collections, etc.

@eric-milles eric-milles added this to the v3.1.0 milestone Sep 25, 2018
@eric-milles eric-milles self-assigned this Sep 25, 2018
@eric-milles
Copy link
Member Author

GROOVY-7744 is at play here. Type inferencing shows both methods coming from the same source.

eric-milles added a commit that referenced this issue Sep 26, 2018
to prevent JDT's default de-duplication processing

- Waiting on GROOVY-7744 for complete resolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant