diff --git a/src/core/Akka.Remote.Tests/RemoteConfigSpec.cs b/src/core/Akka.Remote.Tests/RemoteConfigSpec.cs index 9ffbf8c4c83..6ceb0c72939 100644 --- a/src/core/Akka.Remote.Tests/RemoteConfigSpec.cs +++ b/src/core/Akka.Remote.Tests/RemoteConfigSpec.cs @@ -182,7 +182,7 @@ public void Remoting_should_contain_correct_PrimitiveSerializer_settings_in_Refe { var c = RARP.For(Sys).Provider.RemoteSettings.Config.GetConfig("akka.actor.serialization-settings.primitive"); c.Should().NotBeNull(); - c.GetBoolean("use-neutral-primitives").Should().BeFalse(); + c.GetBoolean("use-legacy-behavior").Should().BeTrue(); } } } diff --git a/src/core/Akka.Remote.Tests/Serialization/BugFix5279Spec.cs b/src/core/Akka.Remote.Tests/Serialization/BugFix5279Spec.cs index e026d11cbb8..7f2aca1f329 100644 --- a/src/core/Akka.Remote.Tests/Serialization/BugFix5279Spec.cs +++ b/src/core/Akka.Remote.Tests/Serialization/BugFix5279Spec.cs @@ -23,7 +23,7 @@ public class BugFix5279Spec: AkkaSpec [InlineData("1", "S")] public void PrimitiveSerializer_without_useNeutralPrimitives_should_return_custom_manifest(object data, string manifest) { - var config = ConfigurationFactory.ParseString("use-neutral-primitives = off"); + var config = ConfigurationFactory.ParseString("use-legacy-behavior = off"); var serializer = new PrimitiveSerializers((ExtendedActorSystem)Sys, config); serializer.Manifest(data).Should().Be(manifest); } @@ -34,7 +34,7 @@ public void PrimitiveSerializer_without_useNeutralPrimitives_should_return_custo [InlineData("1")] public void PrimitiveSerializer_without_useNeutralPrimitives_should_return_type_manifest(object data) { - var config = ConfigurationFactory.ParseString("use-neutral-primitives = on"); + var config = ConfigurationFactory.ParseString("use-legacy-behavior = on"); var serializer = new PrimitiveSerializers((ExtendedActorSystem)Sys, config); serializer.Manifest(data).Should().Be(data.GetType().TypeQualifiedName()); } diff --git a/src/core/Akka.Remote/Configuration/Remote.conf b/src/core/Akka.Remote/Configuration/Remote.conf index 1ef223c7300..f1b6ce5d167 100644 --- a/src/core/Akka.Remote/Configuration/Remote.conf +++ b/src/core/Akka.Remote/Configuration/Remote.conf @@ -12,7 +12,7 @@ akka { actor { serialization-settings { primitive { - use-neutral-primitives = off + use-legacy-behavior = on } } diff --git a/src/core/Akka.Remote/Serialization/PrimitiveSerializers.cs b/src/core/Akka.Remote/Serialization/PrimitiveSerializers.cs index 91fb307ec0f..67130a42f4d 100644 --- a/src/core/Akka.Remote/Serialization/PrimitiveSerializers.cs +++ b/src/core/Akka.Remote/Serialization/PrimitiveSerializers.cs @@ -30,18 +30,19 @@ public sealed class PrimitiveSerializers : SerializerWithStringManifest internal const string Int32ManifestNetFx = "System.Int32, mscorlib"; internal const string Int64ManifestNetFx = "System.Int64, mscorlib"; - private readonly bool _useNeutralPrimitives; + private readonly bool _useLegacyBehavior; /// /// Initializes a new instance of the class. /// /// The actor system to associate with this serializer. + /// Config object containing the serializer settings public PrimitiveSerializers(ExtendedActorSystem system, Config config) : base(system) { if (config == null) throw new ConfigurationException("configuration is null"); - _useNeutralPrimitives = config.GetBoolean("use-neutral-primitives"); + _useLegacyBehavior = config.GetBoolean("use-legacy-behavior"); } /// @@ -85,7 +86,7 @@ public override object FromBinary(byte[] bytes, string manifest) /// public override string Manifest(object obj) { - if (_useNeutralPrimitives) + if (_useLegacyBehavior) return obj.GetType().TypeQualifiedName(); switch (obj)