You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by li...@apache.org on 2024/11/04 19:04:46 UTC

(kafka) branch 3.9 updated: Removed Set.of usage (#17683)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/3.9 by this push:
     new 4a562cddcb3 Removed Set.of usage (#17683)
4a562cddcb3 is described below

commit 4a562cddcb35e68f74b19bb9423a11d74f982240
Author: ShivsundarR <rs...@gmail.com>
AuthorDate: Mon Nov 4 14:04:39 2024 -0500

    Removed Set.of usage (#17683)
    
    Reviewers: Federico Valeri <fe...@gmail.com>, Lianet Magrans <lm...@confluent.io>, Chia-Ping Tsai <ch...@gmail.com>
---
 .../org/apache/kafka/controller/ReplicationControlManagerTest.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java b/metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java
index 9a335a09353..bfc6440c4c1 100644
--- a/metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java
+++ b/metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java
@@ -123,6 +123,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
+import java.util.stream.Stream;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
@@ -588,7 +589,7 @@ public class ReplicationControlManagerTest {
         ControllerRequestContext requestContext = anonymousContextFor(ApiKeys.CREATE_TOPICS);
         PolicyViolationException error = assertThrows(
                 PolicyViolationException.class,
-                () -> replicationControl.createTopics(requestContext, request, Set.of("foo", "bar", "baz")));
+                () -> replicationControl.createTopics(requestContext, request, Stream.of("foo", "bar", "baz").collect(Collectors.toSet())));
         assertEquals(error.getMessage(), "Excessively large number of partitions per request.");
     }