diff --git a/akka-core/src/main/scala/stm/DataFlowVariable.scala b/akka-core/src/main/scala/stm/DataFlowVariable.scala
index aa5a8255e4..a99b4a1e58 100644
--- a/akka-core/src/main/scala/stm/DataFlowVariable.scala
+++ b/akka-core/src/main/scala/stm/DataFlowVariable.scala
@@ -138,7 +138,7 @@ object DataFlow {
"Access by index other than '0' is not supported by DataFlowStream")
}
- override def elements: Iterator[T] = new Iterator[T] {
+ def iterator: Iterator[T] = new Iterator[T] {
private val iter = queue.iterator
def hasNext: Boolean = iter.hasNext
def next: T = { val ref = iter.next; ref() }
diff --git a/akka-core/src/main/scala/stm/HashTrie.scala b/akka-core/src/main/scala/stm/HashTrie.scala
index 5f79004ef0..2147507153 100644
--- a/akka-core/src/main/scala/stm/HashTrie.scala
+++ b/akka-core/src/main/scala/stm/HashTrie.scala
@@ -46,7 +46,7 @@ trait PersistentDataStructure
*/
@serializable
final class HashTrie[K, +V] private (root: Node[K, V]) extends Map[K, V] with PersistentDataStructure {
- lazy val size = root.size
+ override lazy val size = root.size
def this() = this(new EmptyNode[K])
@@ -56,11 +56,11 @@ final class HashTrie[K, +V] private (root: Node[K, V]) extends Map[K, V] with Pe
case (k, v) => update(k, v)
}
- def update[A >: V](key: K, value: A) = new HashTrie(root(0, key, key.hashCode) = value)
+ override def update[A >: V](key: K, value: A) = new HashTrie(root(0, key, key.hashCode) = value)
def -(key: K) = new HashTrie(root.remove(key, key.hashCode))
- def elements = root.elements
+ def iterator = root.elements
def empty[A]: HashTrie[K, A] = new HashTrie(new EmptyNode[K])
@@ -152,7 +152,7 @@ private[collection] class CollisionNode[K, +V](val hash: Int, bucket: List[(K, V
} yield v
}
- def update[A >: V](shift: Int, key: K, hash: Int, value: A): Node[K, A] = {
+ override def update[A >: V](shift: Int, key: K, hash: Int, value: A): Node[K, A] = {
if (this.hash == hash) {
var found = false
@@ -169,7 +169,7 @@ private[collection] class CollisionNode[K, +V](val hash: Int, bucket: List[(K, V
}
}
- def remove(key: K, hash: Int) = {
+ override def remove(key: K, hash: Int) = {
val newBucket = bucket filter { case (k, _) => k != key }
if (newBucket.length == bucket.length) this else {
@@ -180,6 +180,8 @@ private[collection] class CollisionNode[K, +V](val hash: Int, bucket: List[(K, V
}
}
+ def iterator = bucket.elements
+
def elements = bucket.elements
override def toString = "CollisionNode(" + bucket.toString + ")"
@@ -202,7 +204,7 @@ private[collection] class BitmappedNode[K, +V](shift: Int)(table: Array[Node[K,
if ((bits & mask) == mask) table(i)(key, hash) else None
}
- def update[A >: V](levelShift: Int, key: K, hash: Int, value: A): Node[K, A] = {
+ override def update[A >: V](levelShift: Int, key: K, hash: Int, value: A): Node[K, A] = {
val i = (hash >>> shift) & 0x01f
val mask = 1 << i
diff --git a/akka-core/src/main/scala/stm/TransactionalState.scala b/akka-core/src/main/scala/stm/TransactionalState.scala
index 3898409e67..0407dbe433 100644
--- a/akka-core/src/main/scala/stm/TransactionalState.scala
+++ b/akka-core/src/main/scala/stm/TransactionalState.scala
@@ -179,8 +179,13 @@ class TransactionalMap[K, V] extends Transactional with scala.collection.mutable
}
def +=(key: K, value: V) = put(key, value)
+
+ def +=(kv: (K, V)) = {
+ put(kv._1,kv._2)
+ this
+ }
- def remove(key: K) = {
+ override def remove(key: K) = {
val map = ref.get.get
val oldValue = map.get(key)
ref.swap(ref.get.get - key)
@@ -196,19 +201,21 @@ class TransactionalMap[K, V] extends Transactional with scala.collection.mutable
oldValue
}
- def update(key: K, value: V) = {
+ override def update(key: K, value: V) = {
val map = ref.get.get
val oldValue = map.get(key)
ref.swap(map.update(key, value))
}
+
+ def iterator = ref.get.get.iterator
- def elements: Iterator[(K, V)] = ref.get.get.elements
+ override def elements: Iterator[(K, V)] = ref.get.get.elements
override def contains(key: K): Boolean = ref.get.get.contains(key)
override def clear = ref.swap(new HashTrie[K, V])
- def size: Int = ref.get.get.size
+ override def size: Int = ref.get.get.size
override def hashCode: Int = System.identityHashCode(this);
diff --git a/akka-core/src/main/scala/stm/Vector.scala b/akka-core/src/main/scala/stm/Vector.scala
index e341875990..e21d01d9e6 100644
--- a/akka-core/src/main/scala/stm/Vector.scala
+++ b/akka-core/src/main/scala/stm/Vector.scala
@@ -104,7 +104,7 @@ class Vector[+T] private (val length: Int, shift: Int, root: Array[AnyRef], tail
ret
}
- override def ++[A >: T](other: Iterable[A]) = other.foldLeft(this:Vector[A]) { _ + _ }
+ def ++[A >: T](other: Iterable[A]) = other.foldLeft(this:Vector[A]) { _ + _ }
def +[A >: T](obj: A): Vector[A] = {
if (tail.length < 32) {
@@ -224,7 +224,7 @@ class Vector[+T] private (val length: Int, shift: Int, root: Array[AnyRef], tail
back
}
- override def flatMap[A](f: (T)=>Iterable[A]): Vector[A] = {
+ def flatMap[A](f: (T)=>Iterable[A]): Vector[A] = {
var back = new Vector[A]
var i = 0
@@ -236,7 +236,7 @@ class Vector[+T] private (val length: Int, shift: Int, root: Array[AnyRef], tail
back
}
- override def map[A](f: (T)=>A): Vector[A] = {
+ def map[A](f: (T)=>A): Vector[A] = {
var back = new Vector[A]
var i = 0
@@ -254,7 +254,7 @@ class Vector[+T] private (val length: Int, shift: Int, root: Array[AnyRef], tail
override def apply(i: Int) = outer.apply(length - i - 1)
}
- override def subseq(from: Int, end: Int) = subVector(from, end)
+ def subseq(from: Int, end: Int) = subVector(from, end)
def subVector(from: Int, end: Int): Vector[T] = {
if (from < 0) {
diff --git a/akka-core/src/test/scala/ClientInitiatedRemoteActorTest.scala b/akka-core/src/test/scala/ClientInitiatedRemoteActorTest.scala
index 81fb4780da..6fbb8b8481 100644
--- a/akka-core/src/test/scala/ClientInitiatedRemoteActorTest.scala
+++ b/akka-core/src/test/scala/ClientInitiatedRemoteActorTest.scala
@@ -49,7 +49,7 @@ class RemoteActorSpecActorAsyncSender extends Actor {
class ClientInitiatedRemoteActorTest extends JUnitSuite {
import Actor.Sender.Self
- akka.Config.config
+ se.scalablesolutions.akka.Config.config
val HOSTNAME = "localhost"
val PORT1 = 9990
diff --git a/akka-core/src/test/scala/Messages.scala b/akka-core/src/test/scala/Messages.scala
index 2a3c0467a9..a5dcaf38c9 100644
--- a/akka-core/src/test/scala/Messages.scala
+++ b/akka-core/src/test/scala/Messages.scala
@@ -16,9 +16,9 @@ case object NotifySupervisorExit extends TestMessage
case class User(val usernamePassword: Tuple2[String, String],
val email: String,
val age: Int)
- extends Serializable.SBinary[User] {
+ /*extends Serializable.SBinary[User]*/ {
def this() = this(null, null, 0)
- import sbinary.DefaultProtocol._
+/* import sbinary.DefaultProtocol._
implicit object UserFormat extends Format[User] {
def reads(in : Input) = User(
read[Tuple2[String, String]](in),
@@ -31,7 +31,7 @@ case class User(val usernamePassword: Tuple2[String, String],
}
}
def fromBytes(bytes: Array[Byte]) = fromByteArray[User](bytes)
- def toBytes: Array[Byte] = toByteArray(this)
+ def toBytes: Array[Byte] = toByteArray(this)*/
}
case object RemotePing extends TestMessage
diff --git a/akka-core/src/test/scala/PerformanceTest.scala b/akka-core/src/test/scala/PerformanceTest.scala
index d58d075202..cda74ad2d2 100644
--- a/akka-core/src/test/scala/PerformanceTest.scala
+++ b/akka-core/src/test/scala/PerformanceTest.scala
@@ -27,16 +27,16 @@ class PerformanceTest extends JUnitSuite {
case object BLUE extends Colour
case object FADED extends Colour
- val colours = Array(BLUE, RED, YELLOW)
+ val colours = Array[Colour](BLUE, RED, YELLOW)
case class Meet(from: Actor, colour: Colour)
case class Change(colour: Colour)
- case class MeetingCount(count: int)
+ case class MeetingCount(count: Int)
case class ExitActor(actor: Actor, reason: String)
var totalTime = 0L
- class Mall(var nrMeets: int, numChameneos: int) extends Actor {
+ class Mall(var nrMeets: Int, numChameneos: Int) extends Actor {
var waitingChameneo: Option[Actor] = None
var sumMeetings = 0
var numFaded = 0
@@ -86,7 +86,7 @@ class PerformanceTest extends JUnitSuite {
}
}
- case class Chameneo(var mall: Mall, var colour: Colour, cid: int) extends Actor {
+ case class Chameneo(var mall: Mall, var colour: Colour, cid: Int) extends Actor {
var meetings = 0
override def start = {
@@ -156,14 +156,14 @@ class PerformanceTest extends JUnitSuite {
case object BLUE extends Colour
case object FADED extends Colour
- val colours = Array(BLUE, RED, YELLOW)
+ val colours = Array[Colour](BLUE, RED, YELLOW)
case class Meet(colour: Colour)
case class Change(colour: Colour)
- case class MeetingCount(count: int)
+ case class MeetingCount(count: Int)
- class Mall(var n: int, numChameneos: int) extends Actor {
+ class Mall(var n: Int, numChameneos: Int) extends Actor {
var waitingChameneo: Option[OutputChannel[Any]] = None
var startTime: Long = 0L
@@ -218,7 +218,7 @@ class PerformanceTest extends JUnitSuite {
}
}
- case class Chameneo(var mall: Mall, var colour: Colour, id: int) extends Actor {
+ case class Chameneo(var mall: Mall, var colour: Colour, id: Int) extends Actor {
var meetings = 0
def act() {
diff --git a/akka-core/src/test/scala/RemoteSupervisorTest.scala b/akka-core/src/test/scala/RemoteSupervisorTest.scala
index 57f01a6dda..6009f0d5e5 100644
--- a/akka-core/src/test/scala/RemoteSupervisorTest.scala
+++ b/akka-core/src/test/scala/RemoteSupervisorTest.scala
@@ -4,7 +4,7 @@
package se.scalablesolutions.akka.actor
-import se.scalablesolutions.akka.serialization.BinaryString
+//import se.scalablesolutions.akka.serialization.BinaryString
import se.scalablesolutions.akka.config.ScalaConfig._
import se.scalablesolutions.akka.remote.{RemoteNode, RemoteServer}
import se.scalablesolutions.akka.OneWay
@@ -18,6 +18,11 @@ object Log {
var oneWayLog: String = ""
}
+//Dummy until SBinary is fixed for Scala 2.8
+object BinaryString{
+ def apply(string : String) = string
+ def unapply(string : String) = Some(string)
+}
@serializable class RemotePingPong1Actor extends Actor {
dispatcher = Dispatchers.newThreadBasedDispatcher(this)
@@ -74,7 +79,7 @@ object Log {
class RemoteSupervisorTest extends JUnitSuite {
import Actor.Sender.Self
- akka.Config.config
+ se.scalablesolutions.akka.Config.config
new Thread(new Runnable() {
def run = {
RemoteNode.start
diff --git a/akka-core/src/test/scala/ServerInitiatedRemoteActorTest.scala b/akka-core/src/test/scala/ServerInitiatedRemoteActorTest.scala
index 2f1ef161c8..ab4f0d2cdd 100644
--- a/akka-core/src/test/scala/ServerInitiatedRemoteActorTest.scala
+++ b/akka-core/src/test/scala/ServerInitiatedRemoteActorTest.scala
@@ -58,9 +58,8 @@ object ServerInitiatedRemoteActorTest {
class ServerInitiatedRemoteActorTest extends JUnitSuite {
import ServerInitiatedRemoteActorTest._
-
- import Actor.Sender.Self
- akka.Config.config
+
+ se.scalablesolutions.akka.Config.config
private val unit = TimeUnit.MILLISECONDS
diff --git a/pom.xml b/pom.xml
index 2f61e7dd17..6de267e1dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,10 +45,11 @@
0.5.2
1.1.5
1.9.18-i
- 1.0-for-scala-2.8.0-SNAPSHOT
+ 1.0.1-for-scala-2.8.0.Beta1-with-test-interfaces-0.3-SNAPSHOT
0.7.0
2.0-scala280-SNAPSHOT
2.8.0.Beta1-1.5-SNAPSHOT
+ 4.5