You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/06 07:43:39 UTC
[jira] [Commented] (TAJO-1971) Replace 'for' loop with 'foreach'
[ https://issues.apache.org/jira/browse/TAJO-1971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085059#comment-15085059 ]
ASF GitHub Bot commented on TAJO-1971:
--------------------------------------
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/890#discussion_r48931564
--- Diff: tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/CatalogTestingUtil.java ---
@@ -144,14 +144,14 @@ public static PartitionDesc buildPartitionDesc(String partitionName) {
String[] partitionNames = partitionName.split("/");
List<PartitionKeyProto> partitionKeyList = new ArrayList<>();
- for(int i = 0; i < partitionNames.length; i++) {
- String [] splits = partitionNames[i].split("=");
+ for (String partitionName1 : partitionNames) {
--- End diff --
This is also valid, but it looks not a good convention
> Replace 'for' loop with 'foreach'
> ---------------------------------
>
> Key: TAJO-1971
> URL: https://issues.apache.org/jira/browse/TAJO-1971
> Project: Tajo
> Issue Type: Improvement
> Reporter: Dongkyu Hwangbo
> Assignee: Dongkyu Hwangbo
> Priority: Trivial
> Labels: newbie
>
> Reports for loops which iterate over collections or arrays, and can be replaced with the foreach iteration syntax, available in Java 5 and newer, to get the improvement of readability and so on.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)