fix mima warnings (#21756)
This commit is contained in:
parent
5d03902c5e
commit
45d53bd520
2 changed files with 12 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ package akka.serialization
|
||||||
|
|
||||||
import com.typesafe.config.Config
|
import com.typesafe.config.Config
|
||||||
import akka.actor._
|
import akka.actor._
|
||||||
import akka.event.{ LogMarker, Logging }
|
import akka.event.{ LogMarker, Logging, LoggingAdapter }
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
|
||||||
import scala.collection.mutable.ArrayBuffer
|
import scala.collection.mutable.ArrayBuffer
|
||||||
|
|
@ -97,7 +97,8 @@ class Serialization(val system: ExtendedActorSystem) extends Extension {
|
||||||
import Serialization._
|
import Serialization._
|
||||||
|
|
||||||
val settings = new Settings(system.settings.config)
|
val settings = new Settings(system.settings.config)
|
||||||
val log = Logging.withMarker(system, getClass.getName)
|
private[this] val _log = Logging.withMarker(system, getClass.getName)
|
||||||
|
val log: LoggingAdapter = _log
|
||||||
private val manifestCache = new AtomicReference[Map[String, Option[Class[_]]]](Map.empty[String, Option[Class[_]]])
|
private val manifestCache = new AtomicReference[Map[String, Option[Class[_]]]](Map.empty[String, Option[Class[_]]])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -226,13 +227,13 @@ class Serialization(val system: ExtendedActorSystem) extends Extension {
|
||||||
throw new NotSerializableException("No configured serialization-bindings for class [%s]" format clazz.getName)
|
throw new NotSerializableException("No configured serialization-bindings for class [%s]" format clazz.getName)
|
||||||
case possibilities ⇒
|
case possibilities ⇒
|
||||||
if (!unique(possibilities))
|
if (!unique(possibilities))
|
||||||
log.warning(LogMarker.Security, "Multiple serializers found for " + clazz + ", choosing first: " + possibilities)
|
_log.warning(LogMarker.Security, "Multiple serializers found for " + clazz + ", choosing first: " + possibilities)
|
||||||
possibilities(0)._2
|
possibilities(0)._2
|
||||||
}
|
}
|
||||||
serializerMap.putIfAbsent(clazz, ser) match {
|
serializerMap.putIfAbsent(clazz, ser) match {
|
||||||
case null ⇒
|
case null ⇒
|
||||||
if (shouldWarnAboutJavaSerializer(clazz, ser)) {
|
if (shouldWarnAboutJavaSerializer(clazz, ser)) {
|
||||||
log.warning(LogMarker.Security, "Using the default Java serializer for class [{}] which is not recommended because of " +
|
_log.warning(LogMarker.Security, "Using the default Java serializer for class [{}] which is not recommended because of " +
|
||||||
"performance implications. Use another serializer or disable this warning using the setting " +
|
"performance implications. Use another serializer or disable this warning using the setting " +
|
||||||
"'akka.actor.warn-about-java-serializer-usage'", clazz.getName)
|
"'akka.actor.warn-about-java-serializer-usage'", clazz.getName)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1008,7 +1008,13 @@ object MiMa extends AutoPlugin {
|
||||||
ProblemFilters.exclude[MissingClassProblem]("akka.stream.scaladsl.Unfold"),
|
ProblemFilters.exclude[MissingClassProblem]("akka.stream.scaladsl.Unfold"),
|
||||||
|
|
||||||
// #21194 renamed internal actor method
|
// #21194 renamed internal actor method
|
||||||
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.cluster.sharding.ShardCoordinator.allocateShardHomes")
|
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.cluster.sharding.ShardCoordinator.allocateShardHomes"),
|
||||||
|
|
||||||
|
// MarkerLoggingAdapter introduced (all internal classes)
|
||||||
|
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.actor.LocalActorRefProvider.log"),
|
||||||
|
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.actor.VirtualPathContainer.log"),
|
||||||
|
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.actor.VirtualPathContainer.this"),
|
||||||
|
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.remote.RemoteSystemDaemon.this")
|
||||||
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue