= #17342 Make 2.4 binary compatible with 2.3
(cherry picked from commit89af8bdb90) * remove final identifier in serializers i* revert/deprecate ProtobufSerializer.ARRAY_OF_BYTE_ARRAY * adding back compatible empty constructor in serializers * make FSM.State compatible * add back ActorPath.ElementRegex * revert SocketOption changes and add SocketOptionV2 seea6d3704ef6* problem filter for ActorSystem and ActorPath * problem filter for ByteString * problem filter for deprecated Timeout methods * BalancingPool companion * ask * problem filter for ActorDSL * event bus * exclude hasSubscriptions * exclude some problems in testkit * boundAddress and addressFromSocketAddress * Pool nrOfInstances * PromiseActorRef * check with 2.3.9 * migration guide note * explicit exclude of final class problems
This commit is contained in:
parent
412491d277
commit
b30e460be7
50 changed files with 1037 additions and 202 deletions
|
|
@ -73,7 +73,7 @@ trait BaseSerializer extends Serializer {
|
|||
/**
|
||||
* Actor system which is required by most serializer implementations.
|
||||
*/
|
||||
val system: ExtendedActorSystem
|
||||
def system: ExtendedActorSystem
|
||||
/**
|
||||
* Configuration namespace of serialization identifiers in the `reference.conf`.
|
||||
*
|
||||
|
|
@ -88,7 +88,12 @@ trait BaseSerializer extends Serializer {
|
|||
*
|
||||
* See [[Serializer#identifier()]].
|
||||
*/
|
||||
final override val identifier: Int =
|
||||
override val identifier: Int = identifierFromConfig
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
*/
|
||||
private[akka] def identifierFromConfig: Int =
|
||||
system.settings.config.getInt(s"""${SerializationIdentifiers}."${getClass.getName}"""")
|
||||
}
|
||||
|
||||
|
|
@ -146,6 +151,14 @@ object JavaSerializer {
|
|||
*/
|
||||
class JavaSerializer(val system: ExtendedActorSystem) extends BaseSerializer {
|
||||
|
||||
@deprecated("Use constructor with ExtendedActorSystem", "2.4")
|
||||
def this() = this(null)
|
||||
|
||||
// TODO remove this when deprecated this() is removed
|
||||
override val identifier: Int =
|
||||
if (system eq null) 1
|
||||
else identifierFromConfig
|
||||
|
||||
def includeManifest: Boolean = false
|
||||
|
||||
def toBinary(o: AnyRef): Array[Byte] = {
|
||||
|
|
@ -180,6 +193,15 @@ class NullSerializer extends Serializer {
|
|||
* (just returns the byte array unchanged/uncopied)
|
||||
*/
|
||||
class ByteArraySerializer(val system: ExtendedActorSystem) extends BaseSerializer {
|
||||
|
||||
@deprecated("Use constructor with ExtendedActorSystem", "2.4")
|
||||
def this() = this(null)
|
||||
|
||||
// TODO remove this when deprecated this() is removed
|
||||
override val identifier: Int =
|
||||
if (system eq null) 4
|
||||
else identifierFromConfig
|
||||
|
||||
def includeManifest: Boolean = false
|
||||
def toBinary(o: AnyRef) = o match {
|
||||
case null ⇒ null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue