You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2015/02/08 09:56:46 UTC

[jira] [Closed] (CALCITE-306) Standardize code style for "import package.*;"

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

Julian Hyde closed CALCITE-306.
-------------------------------

Closing now that 1.0.0-incubating has been released.

> Standardize code style for "import package.*;"
> ----------------------------------------------
>
>                 Key: CALCITE-306
>                 URL: https://issues.apache.org/jira/browse/CALCITE-306
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Trivial
>             Fix For: 1.0.0-incubating
>
>
> Our house style does not specify whether/when imports are to be converted to stars. I propose that imports should be converted to stars if there are more than 3 from the same package. Thus:
> {code}
> import a.b.C1;
> import a.b.C2;
> import a.b.C3;
> {code}
> becomes
> {code}
> import a.b.*;
> {code}
> when {{a.b.C4}} is added. This is consistent with IntelliJ's default rule.
> It is OK to use stars if there are 3 or fewer uses. Thus removing the use of {{a.b.C2}} would not require imports to be changed.
> Checkstyle has a rule to ban star imports (excluding certain packages) but does not allow them to be limited to a particular number.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)