eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Types solely referenced from Javadoc reported as unused imports

Open
#2,796 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

Assume a class referencing a class solely from Javadoc:

```java
import java.util.List;

/**
* {@link List}
*/
class SomeClass {}
```

On JDT 3.19.500, this reports the import as unused, and the cleanup action to remove unused imports would remove it accordingly. Unfortunately, this breaks the Javadoc tooling, as it will complain about the missing reference if run with the `reference` doclint option enabled.

I wonder if [this ticket](https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2481) is related as I think considering the import unused has popped up recently (just a gut feeling).

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.