accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [accumulo] keith-turner commented on a change in pull request #1014: Replace loops that remove with Collection.removeIf
Date Wed, 06 Mar 2019 20:32:57 GMT
keith-turner commented on a change in pull request #1014: Replace loops that remove with Collection.removeIf
URL: https://github.com/apache/accumulo/pull/1014#discussion_r263122192
 
 

 ##########
 File path: shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java
 ##########
 @@ -143,12 +143,8 @@ protected void setTableProperties(final CommandLine cl, final Shell
shellState,
 
     ScanCommand.ensureTserversCanLoadIterator(shellState, tableName, classname);
 
-    for (Iterator<Entry<String,String>> i = options.entrySet().iterator(); i.hasNext();)
{
-      final Entry<String,String> entry = i.next();
-      if (entry.getValue() == null || entry.getValue().isEmpty()) {
-        i.remove();
-      }
-    }
+    options.entrySet().removeIf(entry -> entry.getValue() == null || entry.getValue().isEmpty());
 
 Review comment:
   maybe this could use values also

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message