Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7453D200CA4 for ; Wed, 7 Jun 2017 17:53:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7310E160BB6; Wed, 7 Jun 2017 15:53:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B9E14160BE2 for ; Wed, 7 Jun 2017 17:53:21 +0200 (CEST) Received: (qmail 38919 invoked by uid 500); 7 Jun 2017 15:53:21 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 38910 invoked by uid 99); 7 Jun 2017 15:53:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jun 2017 15:53:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 98CD91806D5 for ; Wed, 7 Jun 2017 15:53:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ZoFjfgRrGn6r for ; Wed, 7 Jun 2017 15:53:19 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 922CB5F6C6 for ; Wed, 7 Jun 2017 15:53:19 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D2FDDE0665 for ; Wed, 7 Jun 2017 15:53:18 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3127F2193D for ; Wed, 7 Jun 2017 15:53:18 +0000 (UTC) Date: Wed, 7 Jun 2017 15:53:18 +0000 (UTC) From: "Doroszlai, Attila (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-21185) False positive unused import for nested class referenced only in Javadoc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 07 Jun 2017 15:53:22 -0000 [ 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)