From 5c5d8674f28f9f4e412eec8b6f9e25b96d0ec49f Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Thu, 6 Sep 2012 11:59:22 +0200 Subject: [PATCH] Adding migration docs for the Either => Try changes as well as cleaning up a couple of imports --- .../src/test/scala/akka/dispatch/FutureSpec.scala | 6 +++--- akka-docs/project/migration-guide-2.0.x-2.1.x.rst | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala b/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala index 94560083ab..bc423998f0 100644 --- a/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala @@ -20,7 +20,7 @@ import scala.runtime.NonLocalReturnControl import akka.pattern.ask import java.lang.{ IllegalStateException, ArithmeticException } import java.util.concurrent._ -import scala.reflect.ClassTag +import scala.reflect.{ ClassTag, classTag } import scala.util.{ Failure, Success, Try } object FutureSpec { @@ -260,7 +260,7 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa } yield b + "-" + c Await.result(future1, timeout.duration) must be("10-14") - assert(checkType(future1, scala.reflect.classTag[String])) + assert(checkType(future1, classTag[String])) intercept[ClassCastException] { Await.result(future2, timeout.duration) } system.stop(actor) } @@ -479,7 +479,7 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa } })) - val oddFutures = List.fill(100)(oddActor ? 'GetNext mapTo scala.reflect.classTag[Int]) + val oddFutures = List.fill(100)(oddActor ? 'GetNext mapTo classTag[Int]) assert(Await.result(Future.sequence(oddFutures), timeout.duration).sum === 10000) system.stop(oddActor) diff --git a/akka-docs/project/migration-guide-2.0.x-2.1.x.rst b/akka-docs/project/migration-guide-2.0.x-2.1.x.rst index 010f544582..22f2c12fdd 100644 --- a/akka-docs/project/migration-guide-2.0.x-2.1.x.rst +++ b/akka-docs/project/migration-guide-2.0.x-2.1.x.rst @@ -181,6 +181,18 @@ v2.1:: } }, ec); +API changes of DynamicAccess +============================ + +All methods with scala.Either[Throwable, X] have been changed to used scala.util.Try[X]. + +DynamicAccess.withErrorHandling has been removed since scala.util.Try now fulfills that role. + +API changes of Serialization +============================ + +All methods with scala.Either[Throwable, X] have been changed to used scala.util.Try[X]. + Empty Props ===========