chore: Remove ccompat.JavaConverters (#2234)

This commit is contained in:
He-Pin(kerr) 2025-09-20 01:12:16 +08:00 committed by GitHub
parent 9b2853c730
commit 8254acc0e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
184 changed files with 237 additions and 278 deletions

View file

@ -259,7 +259,7 @@ object JacksonObjectMapperProvider extends ExtensionId[JacksonObjectMapperProvid
dynamicAccess: DynamicAccess,
log: Option[LoggingAdapter]): Unit = {
import pekko.util.ccompat.JavaConverters._
import scala.jdk.CollectionConverters._
val configuredModules = config.getStringList("jackson-modules").asScala
val modules1 =
@ -333,13 +333,13 @@ object JacksonObjectMapperProvider extends ExtensionId[JacksonObjectMapperProvid
}
private def features(config: Config, section: String): immutable.Seq[(String, Boolean)] = {
import pekko.util.ccompat.JavaConverters._
import scala.jdk.CollectionConverters._
val cfg = config.getConfig(section)
cfg.root.keySet().asScala.map(key => key -> cfg.getBoolean(key)).toList
}
private def configPairs(config: Config, section: String): immutable.Seq[(String, String)] = {
import pekko.util.ccompat.JavaConverters._
import scala.jdk.CollectionConverters._
val cfg = config.getConfig(section)
cfg.root.keySet().asScala.map(key => key -> cfg.getString(key)).toList
}

View file

@ -207,7 +207,7 @@ import pekko.util.OptionVal
}
}
private val migrations: Map[String, JacksonMigration] = {
import pekko.util.ccompat.JavaConverters._
import scala.jdk.CollectionConverters._
conf.getConfig("migrations").root.unwrapped.asScala.toMap.map {
case (k, v) =>
val transformer = system.dynamicAccess.createInstanceFor[JacksonMigration](v.toString, Nil).get
@ -216,7 +216,7 @@ import pekko.util.OptionVal
}
private val denyList: GadgetClassDenyList = new GadgetClassDenyList
private val allowedClassPrefix = {
import pekko.util.ccompat.JavaConverters._
import scala.jdk.CollectionConverters._
conf.getStringList("allowed-class-prefix").asScala.toVector
}
private val typeInManifest: Boolean = conf.getBoolean("type-in-manifest")