m1a2st commented on code in PR #19380:
URL: https://github.com/apache/kafka/pull/19380#discussion_r2039815019


##########
core/src/test/scala/integration/kafka/api/SaslSslAdminIntegrationTest.scala:
##########
@@ -564,14 +563,14 @@ class SaslSslAdminIntegrationTest extends 
BaseAdminIntegrationTest with SaslSetu
       new AccessControlEntry("User:*", "*", AclOperation.DESCRIBE_CONFIGS, 
AclPermissionType.DENY))
 
     client = createAdminClient
-    client.createAcls(List(denyAcl).asJava, new 
CreateAclsOptions()).all().get()
+    client.createAcls(java.util.List.of(denyAcl), new 
CreateAclsOptions()).all().get()
 
     val topics = Seq(topic1, topic2)
-    val configsOverride = Map(TopicConfig.SEGMENT_BYTES_CONFIG -> 
"100000").asJava
-    val newTopics = Seq(
+    val configsOverride = java.util.Map.of(TopicConfig.SEGMENT_BYTES_CONFIG, 
"100000")
+    val newTopics = java.util.List.of(
       new NewTopic(topic1, 2, 3.toShort).configs(configsOverride),
       new NewTopic(topic2, Option.empty[Integer].toJava, 
Option.empty[java.lang.Short].toJava).configs(configsOverride))

Review Comment:
    please use Java `Optional.empty()` instead `Option`



##########
core/src/test/scala/integration/kafka/api/BaseAdminIntegrationTest.scala:
##########
@@ -73,12 +73,12 @@ abstract class BaseAdminIntegrationTest extends 
IntegrationTestHarness with Logg
   def testCreateDeleteTopics(): Unit = {
     client = createAdminClient
     val topics = Seq("mytopic", "mytopic2", "mytopic3")
-    val newTopics = Seq(
-      new NewTopic("mytopic", Map((0: Integer) -> Seq[Integer](1, 2).asJava, 
(1: Integer) -> Seq[Integer](2, 0).asJava).asJava),
+    val newTopics = util.List.of(
+      new NewTopic("mytopic", util.Map.of(0: Integer, util.List.of[Integer](1, 
2), 1: Integer, util.List.of[Integer](2, 0))),
       new NewTopic("mytopic2", 3, 3.toShort),
       new NewTopic("mytopic3", Option.empty[Integer].toJava, 
Option.empty[java.lang.Short].toJava)

Review Comment:
   please use Java `Optional.empty()`



##########
core/src/test/scala/integration/kafka/api/ProducerSendWhileDeletionTest.scala:
##########
@@ -60,8 +60,8 @@ class ProducerSendWhileDeletionTest extends 
IntegrationTestHarness {
     createTopicWithAssignment(topic, Map(0 -> Seq(0, 1), 1 -> Seq(0, 1)))
 
     val reassignment = Map(
-      new TopicPartition(topic, 0) -> Optional.of(new 
NewPartitionReassignment(util.Arrays.asList(1, 0))),
-      new TopicPartition(topic, 1) -> Optional.of(new 
NewPartitionReassignment(util.Arrays.asList(1, 0)))
+      new TopicPartition(topic, 0) -> Optional.of(new 
NewPartitionReassignment(util.List.of(1, 0))),
+      new TopicPartition(topic, 1) -> Optional.of(new 
NewPartitionReassignment(util.List.of(1, 0)))

Review Comment:
   please use java `Map.of()`



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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to