diff options
author | Paul Phillips <paulp@improving.org> | 2009-08-19 03:27:37 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-08-19 03:27:37 +0000 |
commit | f90e6a94a6b68c0de3000d389f65293828960195 (patch) | |
tree | bbc6558945e6f420f25a61f009ba723aaa69d929 /src/library/scala/ref | |
parent | 1af45f6a6f64d9b84ebf50b2730036edfd0027fe (diff) | |
download | scala-f90e6a94a6b68c0de3000d389f65293828960195.tar.gz scala-f90e6a94a6b68c0de3000d389f65293828960195.tar.bz2 scala-f90e6a94a6b68c0de3000d389f65293828960195.zip |
Handled a dozen or so deprecation warnings.
Diffstat (limited to 'src/library/scala/ref')
-rw-r--r-- | src/library/scala/ref/Reference.scala | 3 | ||||
-rw-r--r-- | src/library/scala/ref/ReferenceWrapper.scala | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/ref/Reference.scala b/src/library/scala/ref/Reference.scala index d0cf29ee35..4fa69f77b3 100644 --- a/src/library/scala/ref/Reference.scala +++ b/src/library/scala/ref/Reference.scala @@ -15,7 +15,8 @@ package scala.ref * @author Sean McDirmid */ trait Reference[+T <: AnyRef] extends Function0[T] { - @deprecated def isValid: Boolean + @deprecated("Use .get.isDefined instead") + def isValid: Boolean /** return the underlying value */ def apply(): T /** return <code>Some</code> underlying if it hasn't been collected, otherwise <code>None</code> */ diff --git a/src/library/scala/ref/ReferenceWrapper.scala b/src/library/scala/ref/ReferenceWrapper.scala index e10eebd82f..a562e56c3a 100644 --- a/src/library/scala/ref/ReferenceWrapper.scala +++ b/src/library/scala/ref/ReferenceWrapper.scala @@ -15,7 +15,7 @@ package scala.ref */ trait ReferenceWrapper[+T <: AnyRef] extends Reference[T] with Proxy { val underlying: java.lang.ref.Reference[_ <: T] - @deprecated def isValid = underlying.get != null + @deprecated("Use .get.isDefined instead") def isValid = underlying.get != null override def get = { val ret = underlying.get if (ret eq null) None else Some(ret) |