[
https://issues.apache.org/jira/browse/TAJO-1973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15037749#comment-15037749
]
ASF GitHub Bot commented on TAJO-1973:
--------------------------------------
Github user dkhwangbo commented on a diff in the pull request:
https://github.com/apache/tajo/pull/858#discussion_r46547915
--- Diff:
tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
---
@@ -274,10 +274,8 @@ public void testDropDatabaseWithAllTables() throws
Exception {
Map<String, List<String>> createdTablesMap =
createBaseDatabaseAndTables();
// Each time we drop one database, check all databases and their
tables.
- Iterator<String> it = new
ArrayList<>(createdTablesMap.keySet()).iterator();
- while(it.hasNext()) {
+ for (String databaseName : new ArrayList<>(createdTablesMap.keySet()))
{
--- End diff --
Oh, I found that my above comment has no relation about this issue.
Creation of this array is needed because of 284 line in same file.
> Replace 'while' loop with 'foreach'
> -----------------------------------
>
> Key: TAJO-1973
> URL: https://issues.apache.org/jira/browse/TAJO-1973
> Project: Tajo
> Issue Type: Improvement
> Reporter: Dongkyu Hwangbo
> Assignee: Dongkyu Hwangbo
> Priority: Trivial
> Labels: newbie
>
> 'While' loops which iterate over collections can be replaced with the
> 'foreach' iteration syntax, which is available in Java 5 and newer.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)