diff --git a/core/src/main/scala/kafka/log/LazyIndex.scala b/core/src/main/scala/kafka/log/LazyIndex.scala index a5a7c34a6e5b7..256f63a49bdf2 100644 --- a/core/src/main/scala/kafka/log/LazyIndex.scala +++ b/core/src/main/scala/kafka/log/LazyIndex.scala @@ -54,11 +54,11 @@ class LazyIndex[T <: AbstractIndex] private (@volatile private var indexWrapper: def get: T = { indexWrapper match { - case indexValue: IndexValue[T] => indexValue.index + case indexValue: IndexValue[_] => indexValue.index.asInstanceOf[T] case _: IndexFile => inLock(lock) { indexWrapper match { - case indexValue: IndexValue[T] => indexValue.index + case indexValue: IndexValue[_] => indexValue.index.asInstanceOf[T] case indexFile: IndexFile => val indexValue = new IndexValue(loadIndex(indexFile.file)) indexWrapper = indexValue diff --git a/core/src/test/scala/integration/kafka/api/GroupAuthorizerIntegrationTest.scala b/core/src/test/scala/integration/kafka/api/GroupAuthorizerIntegrationTest.scala index 425d8f3f8e626..2b3ae1c1da696 100644 --- a/core/src/test/scala/integration/kafka/api/GroupAuthorizerIntegrationTest.scala +++ b/core/src/test/scala/integration/kafka/api/GroupAuthorizerIntegrationTest.scala @@ -15,7 +15,7 @@ package kafka.api import java.util.Properties import java.util.concurrent.ExecutionException import kafka.api.GroupAuthorizerIntegrationTest._ -import kafka.security.auth.SimpleAclAuthorizer +import kafka.security.authorizer.AclAuthorizer import kafka.security.authorizer.AclEntry.WildcardHost import kafka.server.{BaseRequestTest, KafkaConfig} import kafka.utils.TestUtils @@ -63,7 +63,7 @@ class GroupAuthorizerIntegrationTest extends BaseRequestTest { def clientPrincipal: KafkaPrincipal = ClientPrincipal override def brokerPropertyOverrides(properties: Properties): Unit = { - properties.put(KafkaConfig.AuthorizerClassNameProp, classOf[SimpleAclAuthorizer].getName) + properties.put(KafkaConfig.AuthorizerClassNameProp, classOf[AclAuthorizer].getName) properties.put(KafkaConfig.BrokerIdProp, brokerId.toString) properties.put(KafkaConfig.OffsetsTopicPartitionsProp, "1") properties.put(KafkaConfig.OffsetsTopicReplicationFactorProp, "1") diff --git a/core/src/test/scala/integration/kafka/api/SaslGssapiSslEndToEndAuthorizationTest.scala b/core/src/test/scala/integration/kafka/api/SaslGssapiSslEndToEndAuthorizationTest.scala index 75df9e7079d29..b4122063e732c 100644 --- a/core/src/test/scala/integration/kafka/api/SaslGssapiSslEndToEndAuthorizationTest.scala +++ b/core/src/test/scala/integration/kafka/api/SaslGssapiSslEndToEndAuthorizationTest.scala @@ -16,7 +16,7 @@ */ package kafka.api -import kafka.security.auth.SimpleAclAuthorizer +import kafka.security.authorizer.AclAuthorizer import kafka.server.KafkaConfig import kafka.utils.JaasTestUtils import org.apache.kafka.common.config.SslConfigs @@ -25,8 +25,8 @@ import org.junit.jupiter.api.Assertions.assertNull import scala.collection.immutable.List -// Note: this test currently uses the deprecated SimpleAclAuthorizer to ensure we have test coverage -// It must be replaced with the new AclAuthorizer when SimpleAclAuthorizer is removed +// Note: this test currently uses the deprecated AclAuthorizer to ensure we have test coverage +// It must be replaced with the new AclAuthorizer when AclAuthorizer is removed class SaslGssapiSslEndToEndAuthorizationTest extends SaslEndToEndAuthorizationTest { override val clientPrincipal = new KafkaPrincipal(KafkaPrincipal.USER_TYPE, JaasTestUtils.KafkaClientPrincipalUnqualifiedName) @@ -35,7 +35,7 @@ class SaslGssapiSslEndToEndAuthorizationTest extends SaslEndToEndAuthorizationTe override protected def kafkaClientSaslMechanism = "GSSAPI" override protected def kafkaServerSaslMechanisms = List("GSSAPI") - override protected def authorizerClass = classOf[SimpleAclAuthorizer] + override protected def authorizerClass = classOf[AclAuthorizer] // Configure brokers to require SSL client authentication in order to verify that SASL_SSL works correctly even if the // client doesn't have a keystore. We want to cover the scenario where a broker requires either SSL client diff --git a/gradle.properties b/gradle.properties index b107407905f79..6e3a9b598420f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,7 @@ group=org.apache.kafka # - tests/kafkatest/version.py (variable DEV_VERSION) # - kafka-merge-pr.py version=2.8.2 -scalaVersion=2.13.5 +scalaVersion=2.13.10 task=build org.gradle.jvmargs=-Xmx2g -Xss4m -XX:+UseParallelGC org.gradle.parallel=true diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 8dcf7af2f2878..088e38406f8d5 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -28,7 +28,7 @@ ext { // Add Scala version def defaultScala212Version = '2.12.13' -def defaultScala213Version = '2.13.5' +def defaultScala213Version = '2.13.10' if (hasProperty('scalaVersion')) { if (scalaVersion == '2.12') { versions["scala"] = defaultScala212Version