diff options
author | Paul Phillips <paulp@improving.org> | 2010-04-04 16:59:25 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-04-04 16:59:25 +0000 |
commit | 28ed5c6b216463a6e5bd8f06986c35a2036bda3f (patch) | |
tree | 75f79e7c66cf677e06072fd54de9edb4bf78c117 /src | |
parent | 1ce6d9abad392a87ccf3551590ac098b485df2b6 (diff) | |
download | scala-28ed5c6b216463a6e5bd8f06986c35a2036bda3f.tar.gz scala-28ed5c6b216463a6e5bd8f06986c35a2036bda3f.tar.bz2 scala-28ed5c6b216463a6e5bd8f06986c35a2036bda3f.zip |
Removing a class cast exception.
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 + } } |