#2348 - SI-4804 is fixed so enabling serialversionuids

This commit is contained in:
Viktor Klang 2012-07-30 13:26:12 +02:00
parent 6c5826ab23
commit ef6b78dbc5
8 changed files with 19 additions and 19 deletions

View file

@ -11,7 +11,7 @@ package akka
* <li>toString that includes exception name, message and uuid</li>
* </ul>
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
class AkkaException(message: String, cause: Throwable) extends RuntimeException(message, cause) with Serializable {
def this(msg: String) = this(msg, null)

View file

@ -32,7 +32,7 @@ object ActorPath {
* is sorted by path elements FROM RIGHT TO LEFT, where RootActorPath >
* ChildActorPath in case the number of elements is different.
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
sealed trait ActorPath extends Comparable[ActorPath] with Serializable {
/**
* The Address under which this path can be reached; walks up the tree to
@ -103,7 +103,7 @@ sealed trait ActorPath extends Comparable[ActorPath] with Serializable {
* Root of the hierarchy of ActorPaths. There is exactly root per ActorSystem
* and node (for remote-enabled or clustered systems).
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
final case class RootActorPath(address: Address, name: String = "/") extends ActorPath {
override def parent: ActorPath = this
@ -126,7 +126,7 @@ final case class RootActorPath(address: Address, name: String = "/") extends Act
}
}
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
final class ChildActorPath(val parent: ActorPath, val name: String) extends ActorPath {
if (name.indexOf('/') != -1) throw new IllegalArgumentException("/ is a path separator and is not legal in ActorPath names: [%s]" format name)

View file

@ -350,7 +350,7 @@ private[akka] class LocalActorRef private[akka] (
* Memento pattern for serializing ActorRefs transparently
* INTERNAL API
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
private[akka] case class SerializedActorRef private (path: String) {
import akka.serialization.JavaSerializer.currentSystem
@ -408,7 +408,7 @@ private[akka] trait MinimalActorRef extends InternalActorRef with LocalRef {
case class DeadLetter(message: Any, sender: ActorRef, recipient: ActorRef)
private[akka] object DeadLetterActorRef {
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
class SerializedDeadLetterActorRef extends Serializable { //TODO implement as Protobuf for performance?
@throws(classOf[java.io.ObjectStreamException])
private def readResolve(): AnyRef = JavaSerializer.currentSystem.value.deadLetters

View file

@ -27,7 +27,7 @@ import annotation.tailrec
* context.actorOf(someProps, "someName", Deploy(scope = RemoteScope("someOtherNodeName")))
* }}}
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
final case class Deploy(
path: String = "",
config: Config = ConfigFactory.empty,
@ -76,7 +76,7 @@ trait Scope {
def withFallback(other: Scope): Scope
}
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
abstract class LocalScope extends Scope
//FIXME docs
@ -92,7 +92,7 @@ case object LocalScope extends LocalScope {
/**
* This is the default value and as such allows overrides.
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
abstract class NoScopeGiven extends Scope
case object NoScopeGiven extends NoScopeGiven {
def withFallback(other: Scope): Scope = other

View file

@ -113,7 +113,7 @@ object Props {
* Props props = new Props(MyActor.class).withRouter(new RoundRobinRouter(..));
* }}}
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed when SI-4804 is fixed
@SerialVersionUID(1L)
case class Props(
creator: () Actor = Props.defaultCreator,
dispatcher: String = Dispatchers.DefaultDispatcherId,

View file

@ -494,7 +494,7 @@ object TypedProps {
* TypedProps is a TypedActor configuration object, that is thread safe and fully sharable.
* It's used in TypedActorFactory.typedActorOf to configure a TypedActor instance.
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
case class TypedProps[T <: AnyRef] protected[TypedProps] (
interfaces: Seq[Class[_]],
creator: () T,

View file

@ -359,7 +359,7 @@ case class Destination(sender: ActorRef, recipient: ActorRef)
* from lower-precedence sources. The decision whether or not to create a
* router is taken in the LocalActorRefProvider based on Props.
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
abstract class NoRouter extends RouterConfig
case object NoRouter extends NoRouter {
def createRoute(props: Props, routeeProvider: RouteeProvider): Route = null // FIXME, null, really??
@ -391,7 +391,7 @@ case object FromConfig extends FromConfig {
* This can be used when the dispatcher to be used for the head Router needs to be configured
* (defaults to default-dispatcher).
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
class FromConfig(val routerDispatcher: String = Dispatchers.DefaultDispatcherId)
extends RouterConfig
with Serializable {
@ -462,7 +462,7 @@ object RoundRobinRouter {
* @param routees string representation of the actor paths of the routees that will be looked up
* using `actorFor` in [[akka.actor.ActorRefProvider]]
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
case class RoundRobinRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, override val resizer: Option[Resizer] = None,
val routerDispatcher: String = Dispatchers.DefaultDispatcherId,
val supervisorStrategy: SupervisorStrategy = Router.defaultSupervisorStrategy)
@ -581,7 +581,7 @@ object RandomRouter {
* @param routees string representation of the actor paths of the routees that will be looked up
* using `actorFor` in [[akka.actor.ActorRefProvider]]
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
case class RandomRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, override val resizer: Option[Resizer] = None,
val routerDispatcher: String = Dispatchers.DefaultDispatcherId,
val supervisorStrategy: SupervisorStrategy = Router.defaultSupervisorStrategy)
@ -707,7 +707,7 @@ object SmallestMailboxRouter {
* @param routees string representation of the actor paths of the routees that will be looked up
* using `actorFor` in [[akka.actor.ActorRefProvider]]
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
case class SmallestMailboxRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, override val resizer: Option[Resizer] = None,
val routerDispatcher: String = Dispatchers.DefaultDispatcherId,
val supervisorStrategy: SupervisorStrategy = Router.defaultSupervisorStrategy)
@ -907,7 +907,7 @@ object BroadcastRouter {
* @param routees string representation of the actor paths of the routees that will be looked up
* using `actorFor` in [[akka.actor.ActorRefProvider]]
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
case class BroadcastRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, override val resizer: Option[Resizer] = None,
val routerDispatcher: String = Dispatchers.DefaultDispatcherId,
val supervisorStrategy: SupervisorStrategy = Router.defaultSupervisorStrategy)
@ -1018,7 +1018,7 @@ object ScatterGatherFirstCompletedRouter {
* @param routees string representation of the actor paths of the routees that will be looked up
* using `actorFor` in [[akka.actor.ActorRefProvider]]
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
case class ScatterGatherFirstCompletedRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, within: Duration,
override val resizer: Option[Resizer] = None,
val routerDispatcher: String = Dispatchers.DefaultDispatcherId,

View file

@ -10,7 +10,7 @@ import java.util.concurrent.TimeUnit
import java.lang.{ Double JDouble }
import scala.concurrent.util.Duration
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
@SerialVersionUID(1L)
case class Timeout(duration: Duration) {
def this(timeout: Long) = this(Duration(timeout, TimeUnit.MILLISECONDS))
def this(length: Long, unit: TimeUnit) = this(Duration(length, unit))