kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rha...@apache.org
Subject [kafka] branch 2.6 updated: MINOR: reuse toConfigObject(Map) to generate Config (#8889)
Date Wed, 17 Jun 2020 20:47:19 GMT
This is an automated email from the ASF dual-hosted git repository.

rhauch pushed a commit to branch 2.6
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.6 by this push:
     new 8a66e56  MINOR: reuse toConfigObject(Map) to generate Config (#8889)
8a66e56 is described below

commit 8a66e569b3658f28ebaaad041404783faf67f172
Author: Chia-Ping Tsai <chia7712@gmail.com>
AuthorDate: Thu Jun 18 04:46:05 2020 +0800

    MINOR: reuse toConfigObject(Map) to generate Config (#8889)
    
    Author: Chia-Ping Tsai <chia7712@gmail.com>
    Reviewers: Randall Hauch <rhauch@gmail.com>, David Jacot <david.jacot@gmail.com>
---
 .../test/java/org/apache/kafka/clients/admin/MockAdminClient.java    | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java b/clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java
index 7c6a955..e5ad575 100644
--- a/clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java
+++ b/clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java
@@ -51,7 +51,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
-import java.util.stream.Collectors;
 
 public class MockAdminClient extends AdminClient {
     public static final String DEFAULT_CLUSTER_ID = "I4ZmrWqfT2e-upky_4fdPA";
@@ -532,9 +531,7 @@ public class MockAdminClient extends AdminClient {
                 if (topicMetadata != null && !topicMetadata.markedForDeletion) {
                     if (topicMetadata.fetchesRemainingUntilVisible > 0)
                         topicMetadata.fetchesRemainingUntilVisible = Math.max(0, topicMetadata.fetchesRemainingUntilVisible
- 1);
-                    else return new Config(topicMetadata.configs.entrySet().stream()
-                                .map(entry -> new ConfigEntry(entry.getKey(), entry.getValue()))
-                                .collect(Collectors.toList()));
+                    else return toConfigObject(topicMetadata.configs);
 
                 }
                 throw new UnknownTopicOrPartitionException("Resource " + resource + " not
found.");


Mime
View raw message