ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doroszlai, Attila (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-21185) False positive unused import for nested class referenced only in Javadoc
Date Wed, 07 Jun 2017 15:53:18 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-21185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Doroszlai, Attila updated AMBARI-21185:
---------------------------------------
    Attachment:     (was: AMBARI-21185.patch)

> False positive unused import for nested class referenced only in Javadoc
> ------------------------------------------------------------------------
>
>                 Key: AMBARI-21185
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21185
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 3.0.0
>            Reporter: Doroszlai, Attila
>            Assignee: Doroszlai, Attila
>             Fix For: 3.0.0
>
>
> Checkstyle reports unused import:
> {code}
> [ERROR] ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java:99:8:
Unused import - org.apache.ambari.server.state.stack.upgrade.StageWrapper. [UnusedImports]
> Audit done.
> {code}
> However, StageWrapper is referenced in the JavaDoc. IDEs, like Eclipse, don't warn on
this import since it's technically used int he JavaDoc generation:
> {code}
>   /**
>    * Tests that commands created for {@link StageWrapper.Type#RU_TASKS} set the
>    * service and component on the {@link ExecutionCommand}.
> {code}
> This is an upstream bug: https://github.com/checkstyle/checkstyle/issues/3098 and https://github.com/checkstyle/checkstyle/issues/3453.
> I think the best thing we can do here is {{@link}} by full classname in the JavaDoc and
avoid the import.  This way we avoid both Checkstyle error when import is present (due to
"unused" import) and IDE warning when import is missing (due to unresolved class).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message