rework use of ClassLoaders, see #1736

This commit is contained in:
Roland 2012-01-27 13:30:43 +01:00
parent c5fc153a10
commit ac1ee9ae91
13 changed files with 54 additions and 67 deletions

View file

@ -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) }