Skip to content

Commit

Permalink
KAFKA-17714: Fix StorageTool.scala to compile under Scala 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
cmccabe committed Oct 7, 2024
1 parent 1d54a73 commit d9c6f2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/test/scala/unit/kafka/tools/StorageToolTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit d9c6f2c

Please sign in to comment.