[
https://issues.apache.org/jira/browse/AMBARI-19149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15735249#comment-15735249
]
Doroszlai, Attila edited comment on AMBARI-19149 at 12/9/16 1:24 PM:
---------------------------------------------------------------------
I think it's easier to review if the cleanup is done in steps, grouped by the
type of change.
[^AMBARI-19149-1.patch] is the first patch, which cleans up imports:
* Remove unused imports
* Get rid of {{*}} imports
* Rearrange imports according to specified order
* Add Checkstyle check for build-time validation
Testing done:
* ran Java unit tests
{noformat}
Tests run: 4797, Failures: 0, Errors: 0, Skipped: 37
{noformat}
* ran checkstyle check:
{noformat}
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle) @ ambari-server ---
[INFO] Starting audit...
Audit done.
{noformat}
(Note: RAT check fails on 2 files added for AMBARI-19137.)
[~jonathan.hurley], [~ncole], [~lpuskas]
This patch is too big for ReviewBoard (got HTTP 502). Could you please review
here?
was (Author: adoroszlai):
* Remove unused imports
* Get rid of {{*}} imports
* Rearrange imports according to specified order
* Add Checkstyle check for build-time validation
> Clean up Ambari Server source code warnings
> -------------------------------------------
>
> Key: AMBARI-19149
> URL: https://issues.apache.org/jira/browse/AMBARI-19149
> Project: Ambari
> Issue Type: Task
> Components: ambari-server
> Reporter: Doroszlai, Attila
> Assignee: Doroszlai, Attila
> Fix For: 3.0.0
>
> Attachments: AMBARI-19149-1.patch
>
>
> Eclipse's default warnings generated for {{ambari-server}} number roughly
> over 3300. Out of these, at least half of them are:
> * Unused imports
> * Type safety due to forgotten {{<>}}
> * Missing Serialization IDs from anonymous {{HashMap}} implementations
> * Unused variables
> * {{Capture<T>}} in tests
> * {{switch}} fall-through and missing {{case statements}}: *only makes
> changes which won't affect existing functionality*
> This makes spotting actual problems, like missing {{case}} statements a
> nightmare. We need to go through and clean out as many of these warnings as
> possible.
> Note: With respect to the import cleanup, the IDE of choice should have the
> following import order setup. They should always be expanded and never use
> {{*}}.
> # {{java}}
> # {{javax}}
> # {{org}}
> # {{com}}
> # other
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)