splett2 commented on a change in pull request #9628:
URL: https://github.com/apache/kafka/pull/9628#discussion_r536250843



##########
File path: core/src/main/scala/kafka/admin/ConfigCommand.scala
##########
@@ -864,11 +885,21 @@ object ConfigCommand extends Config {
         }
       }
 
+      if (hasEntityName && entityTypeVals.contains(ConfigType.Ip)) {
+        Seq(entityName, 
ip).filter(options.has(_)).map(options.valueOf(_)).foreach { ipAddress =>

Review comment:
       unexpectedly, I get a compile error if I remove `(_)` in `map`.
   
   ```
   [Error]~/kafka/core/src/main/scala/kafka/admin/ConfigCommand.scala:889: type 
mismatch;
    found   : [V](x$1: joptsimple.OptionSpec[V]): V <and> (x$1: String): Object
    required: joptsimple.ArgumentAcceptingOptionSpec[String] => ?
   ```
   I will keep it as is for both cases to avoid confusion, e.g. why do we use a 
function reference in `filter`, but not `map`




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to