eclipse-jdt / eclipse-jdt/eclipse.jdt.ui

Overloaded static import shows deprecation highlighting of last declaration

Open
#2,938 2 comments 0 reactions 1 assignee Claimed by @RagiGeorge View on GitHub
Dominant language
Java
Stars
59
Forks
127
Avg merge
23h 30m
Merged PRs (30d)
35

Description

Consider the following:
```java
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;`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.