rework use of ClassLoaders, see #1736
This commit is contained in:
parent
c5fc153a10
commit
ac1ee9ae91
13 changed files with 54 additions and 67 deletions
|
|
@ -81,10 +81,10 @@ class Serialization(val system: ExtendedActorSystem) extends Extension {
|
|||
def deserialize(bytes: Array[Byte],
|
||||
serializerId: Int,
|
||||
clazz: Option[Class[_]],
|
||||
classLoader: Option[ClassLoader]): Either[Exception, AnyRef] =
|
||||
classLoader: ClassLoader): Either[Exception, AnyRef] =
|
||||
try {
|
||||
currentSystem.withValue(system) {
|
||||
Right(serializerByIdentity(serializerId).fromBinary(bytes, clazz, classLoader))
|
||||
Right(serializerByIdentity(serializerId).fromBinary(bytes, clazz, Some(classLoader)))
|
||||
}
|
||||
} catch { case e: Exception ⇒ Left(e) }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue