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

cadonna 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 9c33e7d3d9c HOTFIX: Replace List.of with Arrays.asList
9c33e7d3d9c is described below

commit 9c33e7d3d9c2d940d068669172da7c193e6d637b
Author: Bruno Cadonna <br...@confluent.io>
AuthorDate: Thu Jan 16 16:32:25 2025 +0100

    HOTFIX: Replace List.of with Arrays.asList
    
    Cherry-pick of e7a7efd introduces a compilation error
    due to the use of List.of.
---
 clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java 
b/clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java
index 2368a91137f..1dc968b0061 100644
--- a/clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java
+++ b/clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java
@@ -25,6 +25,7 @@ import org.mockito.MockedStatic;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.UnknownHostException;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
@@ -83,13 +84,13 @@ public class ClientUtilsTest {
                 List<InetSocketAddress> validatedAddresses = 
checkWithLookup(Collections.singletonList(hostname + ":" + port));
                 assertEquals(2, inetSocketAddress.constructed().size());
                 assertEquals(2, validatedAddresses.size());
-                assertTrue(validatedAddresses.containsAll(List.of(
+                assertTrue(validatedAddresses.containsAll(Arrays.asList(
                     inetSocketAddress.constructed().get(0),
                     inetSocketAddress.constructed().get(1)))
                 );
                 validatedAddresses.forEach(address -> assertEquals(port, 
address.getPort()));
                 
validatedAddresses.stream().map(InetSocketAddress::getHostName).forEach(
-                    hostName -> assertTrue(List.of(canonicalHostname1, 
canonicalHostname2).contains(hostName))
+                    hostName -> assertTrue(Arrays.asList(canonicalHostname1, 
canonicalHostname2).contains(hostName))
                 );
             }
         }

Reply via email to