Skip to content

Import that is used in @code or @link in JavaDoc is marked as unused #2035

Open

Description

Imports that are only used in @code or @link of JavaDoc are marked as unused and Organize imports will remove them.

Environment
  • Operating System: 20.04.2 LTS (Focal Fossa)
  • JDK version: openjdk 11.0.6 2020-01-14
  • Visual Studio Code version: 1.58.2
  • Java extension version: v.0.81.0
Steps To Reproduce
  1. Check out https://github.com/fvclaus/vscode-java-javadoc-link-bug and open App.java
  2. Run Organize imports
import java.util.HashSet;

/**
 * Uses {@code HashSet#clear()}
 *
 */

vscode_javadoc

Current Result

Import is marked as unused and will be removed with Organize imports.

Expected Result

Import is not marked as unused and will not be removed with Organize imports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions