You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by dkhwangbo <gi...@git.apache.org> on 2015/12/03 09:35:18 UTC

[GitHub] tajo pull request: TAJO-1973: Replace 'while' loop with 'foreach'

Github user dkhwangbo commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/858#discussion_r46524585
  
    --- 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 --
    
    Thanks for your reply. 
    As my understanding, That line is written to convert Set to List because Set has no ordering. I have no idea with another way to get same result. Can I get some more details about your comment? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---