Skip to content

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

@eric-milles

Description

@eric-milles

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions