diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actors/scala/actors/package.scala | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/actors/scala/actors/package.scala b/src/actors/scala/actors/package.scala index 6ffd17da14..98170b83dd 100644 --- a/src/actors/scala/actors/package.scala +++ b/src/actors/scala/actors/package.scala @@ -20,7 +20,13 @@ package object actors { @deprecated("use scala.actors.scheduler.SingleThreadedScheduler instead") type SingleThreadedScheduler = scala.actors.scheduler.SingleThreadedScheduler + // This used to do a blind cast and throw a CCE after the package + // object was loaded. I have replaced with a variation that should work + // in whatever cases that was working but fail less exceptionally for + // those not intentionally using it. @deprecated("this value is going to be removed in a future release") - val ActorGC = scala.actors.Scheduler.impl.asInstanceOf[scala.actors.scheduler.ActorGC] - + val ActorGC = scala.actors.Scheduler.impl match { + case x: scala.actors.scheduler.ActorGC => x + case _ => null + } } |