You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Rajat Khandelwal (JIRA)" <ji...@apache.org> on 2015/01/19 15:28:34 UTC
[jira] [Commented] (LENS-205) Import issues in patches
[ https://issues.apache.org/jira/browse/LENS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14282544#comment-14282544 ]
Rajat Khandelwal commented on LENS-205:
---------------------------------------
I had noticed the issue earlier and searched on the internet for some standards to pick up. Seems there has been a lot of discussion regarding this. One such instance: http://stackoverflow.com/questions/7735671/order-of-import-statements-in-java
Since then I've been using the following rules:
1. *Order*:
* import static
* blank line
* import java
* blank line
* import javax
* blank line
* all other imports, alphabetically.
* blank line
2. *Clubbing*: convert to * if 5 imports are present. Just the default setting of Idea, didn't do any changes. The number is 3 for static imports
3. *Separation*: as mentioned in 1st point by blank lines.
> Import issues in patches
> ------------------------
>
> Key: LENS-205
> URL: https://issues.apache.org/jira/browse/LENS-205
> Project: Apache Lens
> Issue Type: Task
> Components: docs
> Reporter: Amareshwari Sriramadasu
> Fix For: 2.0
>
>
> We are seeing following issues in patches :
> * The imports being changed from \* to expanded import and vice versa from many contributors
> * The ordering of groups being changed - alphabetical order to some other
> we need to put any hard rules around it right now, which causing this to and fro across multiple patches.
> This jira is to decide on when should use * vs expanded import and when should we convert an expanded import to *.
> Also the order of imports and document the same in contributor guide
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)