Skip to content

Overloaded static import shows deprecation highlighting of last declaration #2938

@eric-milles

Description

@eric-milles

Consider the following:

package p;

import static p.A.foo;

class A {
  public static Object foo(Object o) {
    return null;
  }
  @Deprecated
  public static Object foo(String s) {
    return null;
  }
}

When the last overload is deprecated, the import displays deprecation highlighting, even when the deprecated member is not used.

Image

Real world example: import static org.assertj.core.api.Assertions.assertThat;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions