You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2019/10/02 14:25:18 UTC

[GitHub] [lucene-solr] jpountz commented on a change in pull request #881: LUCENE-8979: Code Cleanup: Use entryset for map iteration wherever possible. - part 2

jpountz commented on a change in pull request #881: LUCENE-8979: Code Cleanup: Use entryset for map iteration wherever possible. - part 2
URL: https://github.com/apache/lucene-solr/pull/881#discussion_r330579248
 
 

 ##########
 File path: lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java
 ##########
 @@ -403,15 +404,15 @@ public String getColsValuesForValsByRound(int roundNum) {
       return "";
     }
     StringBuilder sb = new StringBuilder();
-    for (final String name : colForValByRound.keySet()) {
-      String colName = colForValByRound.get(name);
+    for (final Map.Entry<String, String> entry : colForValByRound.entrySet()) {
+      String colName = entry.getValue();
       String template = " " + colName;
       if (roundNum < 0) {
         // just append blanks
         sb.append(Format.formatPaddLeft("-", template));
       } else {
         // append actual values, for that round
-        Object a = valByRound.get(name);
+        Object a = valByRound.get(entry.getKey());
 
 Review comment:
   can you extract a variable?

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org