From a397696f05cefb46a26bbe7faeecb0b918f0c90f Mon Sep 17 00:00:00 2001 From: Wade Waldron Date: Tue, 23 Aug 2016 09:50:35 -0600 Subject: [PATCH] Added a note to the serialization section regarding desugared names #21263 * Updated note with changes from PR * Updated note with changes from PR --- akka-docs/rst/java/serialization.rst | 8 ++++++++ akka-docs/rst/scala/serialization.rst | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/akka-docs/rst/java/serialization.rst b/akka-docs/rst/java/serialization.rst index 109752bd77..d76de2b513 100644 --- a/akka-docs/rst/java/serialization.rst +++ b/akka-docs/rst/java/serialization.rst @@ -35,6 +35,14 @@ one of which all other candidates are superclasses. If this condition cannot be met, because e.g. ``java.io.Serializable`` and ``MyOwnSerializable`` both apply and neither is a subtype of the other, a warning will be issued. +.. note:: + + If you are using Scala for your message protocol and your messages are contained + inside of a Scala object, then in order to reference those messages, you will need + use the fully qualified Java class name. For a message named ``Message`` contained inside + the Scala object named ``Wrapper`` you would need to reference it as + ``Wrapper$Message`` instead of ``Wrapper.Message``. + Akka provides serializers for :class:`java.io.Serializable` and `protobuf `_ :class:`com.google.protobuf.GeneratedMessage` by default (the latter only if diff --git a/akka-docs/rst/scala/serialization.rst b/akka-docs/rst/scala/serialization.rst index e4ebfecbc8..35f203c06f 100644 --- a/akka-docs/rst/scala/serialization.rst +++ b/akka-docs/rst/scala/serialization.rst @@ -35,6 +35,13 @@ one of which all other candidates are superclasses. If this condition cannot be met, because e.g. ``java.io.Serializable`` and ``MyOwnSerializable`` both apply and neither is a subtype of the other, a warning will be issued +.. note:: + + If your messages are contained inside of a Scala object, then in order to + reference those messages, you will need use the fully qualified Java class name. For a message + named ``Message`` contained inside the object named ``Wrapper`` + you would need to reference it as ``Wrapper$Message`` instead of ``Wrapper.Message``. + Akka provides serializers for :class:`java.io.Serializable` and `protobuf `_ :class:`com.google.protobuf.GeneratedMessage` by default (the latter only if