Skip to content

Conversation

alexvaluyskiy
Copy link
Contributor

@alexvaluyskiy alexvaluyskiy commented Jul 24, 2016

I've also removed all getters in the properties


var manifestSerializer = serializer as SerializerWithStringManifest;
if (manifestSerializer != null)
{
var manifest = manifestSerializer.Manifest(serialized);
message = _systemImpl.Serialization.Deserialize(serialized, manifestSerializer.Identifier, manifest);
message = new Envelope(_systemImpl.Serialization.Deserialize(serialized, manifestSerializer.Identifier, manifest), message.Sender);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scala version has a bit different implementation
https://github.com/akka/akka/blob/4acc1cca6a27be0ff80f801de3640f91343dce94/akka-actor/src/main/scala/akka/actor/dungeon/Dispatch.scala#L138

I should check for null, and then throw an exception

@alexvaluyskiy alexvaluyskiy changed the title Check for empty message in Envelope class [WIP] Check for empty message in Envelope class Jul 24, 2016
@@ -101,6 +101,7 @@ namespace Akka.Actor
public void ReserveChild(string name) { }
public void Restart(System.Exception cause) { }
public void Resume(System.Exception causedByFailure) { }
public virtual void SendMessage(Akka.Actor.Envelope message) { }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? Why not have the other SendMessage method construct the envelope?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did the same what Akka JVM has

@@ -296,7 +296,7 @@ public void UseThreadContext(Action action)
}
}

public virtual void SendMessage(IActorRef sender, object message)
public virtual void SendMessage(Envelope message)
{
if (Mailbox == null)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is that? Akka JVM doesn't have this check

@alexvaluyskiy alexvaluyskiy changed the title [WIP] Check for empty message in Envelope class Check for empty message in Envelope class Jul 27, 2016
{
var manifest = manifestSerializer.Manifest(unwrapped);
var deserialized = _systemImpl.Serialization.Deserialize(serialized, serializer.Identifier, manifest);
message = new Envelope(deserialized, message.Sender);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some tests don't work without this. But scala code doesn't have this assignment

@Aaronontheweb Aaronontheweb merged commit e6060ea into akkadotnet:dev Jul 27, 2016
@alexvaluyskiy alexvaluyskiy deleted the envelope branch July 27, 2016 17:20
@Aaronontheweb Aaronontheweb modified the milestone: 1.1.2 Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants