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

chia7712 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 0a70c3a61e7 KAFKA-17714 Fix StorageToolTest.scala to compile under 
Scala 2.12 (#17400)
0a70c3a61e7 is described below

commit 0a70c3a61e7b1961e2d9a5faed801bde0493d0d9
Author: Colin Patrick McCabe <[email protected]>
AuthorDate: Mon Oct 7 20:00:18 2024 -0700

    KAFKA-17714 Fix StorageToolTest.scala to compile under Scala 2.12 (#17400)
    
    Reviewers: David Arthur <[email protected]>, Justine Olshan 
<[email protected]>, Chia-Ping Tsai <[email protected]>
---
 core/src/test/scala/unit/kafka/tools/StorageToolTest.scala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/src/test/scala/unit/kafka/tools/StorageToolTest.scala 
b/core/src/test/scala/unit/kafka/tools/StorageToolTest.scala
index 83b21b43fba..7d8ac6860b8 100644
--- a/core/src/test/scala/unit/kafka/tools/StorageToolTest.scala
+++ b/core/src/test/scala/unit/kafka/tools/StorageToolTest.scala
@@ -21,7 +21,7 @@ import java.io.{ByteArrayOutputStream, File, PrintStream}
 import java.nio.charset.StandardCharsets
 import java.nio.file.Files
 import java.util
-import java.util.{Optional, Properties}
+import java.util.Properties
 import kafka.server.KafkaConfig
 import kafka.utils.TestUtils
 import net.sourceforge.argparse4j.inf.ArgumentParserException
@@ -39,7 +39,7 @@ import org.junit.jupiter.params.ParameterizedTest
 import org.junit.jupiter.params.provider.ValueSource
 
 import scala.collection.mutable.ListBuffer
-import scala.jdk.CollectionConverters.IterableHasAsScala
+import scala.jdk.CollectionConverters._
 
 @Timeout(value = 40)
 class StorageToolTest {
@@ -454,7 +454,7 @@ Found problem:
 
     // Not doing full SCRAM record validation since that's covered elsewhere.
     // Just checking that we generate the correct number of records
-    val bootstrapMetadata = new 
BootstrapDirectory(availableDirs.head.toString, Optional.empty).read
+    val bootstrapMetadata = new 
BootstrapDirectory(availableDirs.head.toString, java.util.Optional.empty()).read
     val scramRecords = bootstrapMetadata.records().asScala
       .filter(apiMessageAndVersion => 
apiMessageAndVersion.message().isInstanceOf[UserScramCredentialRecord])
       .map(apiMessageAndVersion => 
apiMessageAndVersion.message().asInstanceOf[UserScramCredentialRecord])

Reply via email to