diff options
Diffstat (limited to 'src')
80 files changed, 341 insertions, 320 deletions
diff --git a/src/actors/scala/actors/Debug.scala b/src/actors/scala/actors/Debug.scala index 17af47310d..30d5ae5703 100644 --- a/src/actors/scala/actors/Debug.scala +++ b/src/actors/scala/actors/Debug.scala @@ -43,5 +43,5 @@ private[actors] class Logger(tag: String) { if (lev > 0) b } -@deprecated("this class is going to be removed in a future release") +@deprecated("this class is going to be removed in a future release", "2.7.7") class Debug(tag: String) extends Logger(tag) {} diff --git a/src/actors/scala/actors/Future.scala b/src/actors/scala/actors/Future.scala index 20e2de47a5..c6b575d0ee 100644 --- a/src/actors/scala/actors/Future.scala +++ b/src/actors/scala/actors/Future.scala @@ -27,12 +27,12 @@ abstract class Future[+T] extends Responder[T] with Function0[T] { private[actors] var fvalue: Option[Any] = None private[actors] def fvalueTyped = fvalue.get.asInstanceOf[T] - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.8.0") def ch: InputChannel[Any] = inputChannel - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.8.0") protected def value: Option[Any] = fvalue - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.8.0") protected def value_=(x: Option[Any]) { fvalue = x } /** Tests whether the future's result is available. diff --git a/src/actors/scala/actors/IScheduler.scala b/src/actors/scala/actors/IScheduler.scala index 5e0b6c0d0c..865ead58a0 100644 --- a/src/actors/scala/actors/IScheduler.scala +++ b/src/actors/scala/actors/IScheduler.scala @@ -67,16 +67,16 @@ trait IScheduler { def managedBlock(blocker: scala.concurrent.ManagedBlocker): Unit - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.7.7") def tick(a: Actor) {} - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.7.7") def onLockup(handler: () => Unit) {} - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.7.7") def onLockup(millis: Int)(handler: () => Unit) {} - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.7.7") def printActorDump {} } diff --git a/src/actors/scala/actors/MessageQueue.scala b/src/actors/scala/actors/MessageQueue.scala index 0e5e62b1b5..777735df23 100644 --- a/src/actors/scala/actors/MessageQueue.scala +++ b/src/actors/scala/actors/MessageQueue.scala @@ -16,7 +16,7 @@ package scala.actors * @author Philipp Haller */ @SerialVersionUID(7124278808020037465L) -@deprecated("this class is going to be removed in a future release") +@deprecated("this class is going to be removed in a future release", "2.7.7") class MessageQueueElement(msg: Any, session: OutputChannel[Any], next: MessageQueueElement) extends MQueueElement[Any](msg, session, next) with Serializable { def this() = this(null, null, null) def this(msg: Any, session: OutputChannel[Any]) = this(msg, session, null) @@ -36,7 +36,7 @@ private[actors] class MQueueElement[Msg >: Null](val msg: Msg, val session: Outp * @author Philipp Haller */ @SerialVersionUID(2168935872884095767L) -@deprecated("this class is going to be removed in a future release") +@deprecated("this class is going to be removed in a future release", "2.7.7") class MessageQueue(label: String) extends MQueue[Any](label) with Serializable private[actors] class MQueue[Msg >: Null](protected val label: String) { diff --git a/src/actors/scala/actors/Reaction.scala b/src/actors/scala/actors/Reaction.scala index 6b8efc22fe..e94d42005d 100644 --- a/src/actors/scala/actors/Reaction.scala +++ b/src/actors/scala/actors/Reaction.scala @@ -24,7 +24,7 @@ private[actors] class KillActorControl extends ControlThrowable * * @author Philipp Haller */ -@deprecated("This class will be removed in a future release") +@deprecated("This class will be removed in a future release", "2.7.7") class Reaction(a: Actor, f: PartialFunction[Any, Any], msg: Any) extends ActorTask(a, if (f == null) (() => a.act()) else null, f, msg) { diff --git a/src/actors/scala/actors/Scheduler.scala b/src/actors/scala/actors/Scheduler.scala index 8d0cac44ea..bbdf691fad 100644 --- a/src/actors/scala/actors/Scheduler.scala +++ b/src/actors/scala/actors/Scheduler.scala @@ -40,12 +40,12 @@ object Scheduler extends DelegatingScheduler { /* Only <code>ForkJoinScheduler</code> implements this method. */ - @deprecated("snapshot will be removed") + @deprecated("snapshot will be removed", "2.8.0") def snapshot() { if (sched.isInstanceOf[ForkJoinScheduler]) { sched.asInstanceOf[ForkJoinScheduler].snapshot() } else - sys.error("scheduler does not implement snapshot") + sys.error("scheduler does not implement snapshot", "2.8.0") } /* Only <code>ForkJoinScheduler</code> implements this method. diff --git a/src/actors/scala/actors/package.scala b/src/actors/scala/actors/package.scala index 55bc8e113f..1fd9fd7699 100644 --- a/src/actors/scala/actors/package.scala +++ b/src/actors/scala/actors/package.scala @@ -20,26 +20,26 @@ package object actors { // type of Reactors tracked by termination detector private[actors] type TrackedReactor = Reactor[A] forSome { type A >: Null } - @deprecated("use scheduler.ForkJoinScheduler instead") + @deprecated("use scheduler.ForkJoinScheduler instead", "2.8.0") type FJTaskScheduler2 = scala.actors.scheduler.ForkJoinScheduler - @deprecated("use scheduler.ForkJoinScheduler instead") + @deprecated("use scheduler.ForkJoinScheduler instead", "2.8.0") type TickedScheduler = scala.actors.scheduler.ForkJoinScheduler - @deprecated("use scheduler.ForkJoinScheduler instead") + @deprecated("use scheduler.ForkJoinScheduler instead", "2.8.0") type WorkerThreadScheduler = scala.actors.scheduler.ForkJoinScheduler - @deprecated("this class is going to be removed in a future release") + @deprecated("this class is going to be removed in a future release", "2.8.0") type WorkerThread = java.lang.Thread - @deprecated("use scheduler.SingleThreadedScheduler instead") + @deprecated("use scheduler.SingleThreadedScheduler instead", "2.8.0") 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") + @deprecated("this value is going to be removed in a future release", "2.8.0") val ActorGC = scala.actors.Scheduler.impl match { case x: scala.actors.scheduler.ActorGC => x case _ => null diff --git a/src/actors/scala/actors/remote/RemoteActor.scala b/src/actors/scala/actors/remote/RemoteActor.scala index df2d8610b1..f6ef62bc10 100644 --- a/src/actors/scala/actors/remote/RemoteActor.scala +++ b/src/actors/scala/actors/remote/RemoteActor.scala @@ -81,7 +81,7 @@ object RemoteActor { kern } - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.8.0") def createKernelOnPort(port: Int): NetKernel = createNetKernelOnPort(port) @@ -121,7 +121,7 @@ object RemoteActor { private[remote] def someNetKernel: NetKernel = kernels.valuesIterator.next - @deprecated("this member is going to be removed in a future release") + @deprecated("this member is going to be removed in a future release", "2.8.0") def someKernel: NetKernel = someNetKernel } diff --git a/src/actors/scala/actors/scheduler/TerminationMonitor.scala b/src/actors/scala/actors/scheduler/TerminationMonitor.scala index c7e4cdda37..e4b9743ab5 100644 --- a/src/actors/scala/actors/scheduler/TerminationMonitor.scala +++ b/src/actors/scala/actors/scheduler/TerminationMonitor.scala @@ -66,7 +66,7 @@ private[scheduler] trait TerminationMonitor { } /** Deprecated non-actor-private version */ - @deprecated("this method is going to be removed in a future release") + @deprecated("this method is going to be removed in a future release", "2.7.7") def allTerminated: Boolean = allActorsTerminated /** Checks for actors that have become garbage. */ diff --git a/src/build/genprod.scala b/src/build/genprod.scala index d587d0464d..9ae80873f2 100644 --- a/src/build/genprod.scala +++ b/src/build/genprod.scala @@ -238,7 +238,7 @@ class Function(val i: Int) extends Group("Function") with Arity { curryComment + " def curried: %s => R = {\n %s\n }\n".format( targs mkString " => ", body - ) + """ @deprecated("Use 'curried' instead")""" + "\n def curry = curried\n" + ) + """ @deprecated("Use 'curried' instead", "2.8.0")""" + "\n def curry = curried\n" } override def moreMethods = curryMethod + tupleMethod @@ -280,7 +280,7 @@ object TupleTwo extends Tuple(2) */ def swap: Tuple2[T2,T1] = Tuple2(_2, _1) - @deprecated("Use `zipped` instead.") + @deprecated("Use `zipped` instead.", "2.9") def zip[Repr1, El1, El2, To](implicit w1: T1 => TLike[El1, Repr1], w2: T2 => Iterable[El2], cbf1: CBF[Repr1, (El1, El2), To]): To = { diff --git a/src/library/scala/Application.scala b/src/library/scala/Application.scala index 2060b509b8..79f4da6669 100644 --- a/src/library/scala/Application.scala +++ b/src/library/scala/Application.scala @@ -67,7 +67,7 @@ import scala.compat.Platform.currentTime * @author Matthias Zenger * @version 1.0, 10/09/2003 */ -@deprecated("use App instead") +@deprecated("use App instead", "2.9") trait Application { /** The time when the execution of this program started, in milliseconds since 1 diff --git a/src/library/scala/Array.scala b/src/library/scala/Array.scala index 1bdc5b23c9..66ce9320bd 100644 --- a/src/library/scala/Array.scala +++ b/src/library/scala/Array.scala @@ -423,7 +423,7 @@ object Array extends FallbackArrayBuilding { * @param elem the element composing the resulting array * @return an array composed of n elements all equal to elem */ - @deprecated("use `Array.fill' instead") + @deprecated("use `Array.fill' instead", "2.8.0") def make[T: ClassManifest](n: Int, elem: T): Array[T] = { val a = new Array[T](n) var i = 0 @@ -437,7 +437,7 @@ object Array extends FallbackArrayBuilding { /** Creates an array containing the values of a given function `f` * over given range `[0..n)` */ - @deprecated("use `Array.tabulate' instead") + @deprecated("use `Array.tabulate' instead", "2.8.0") def fromFunction[T: ClassManifest](f: Int => T)(n: Int): Array[T] = { val a = new Array[T](n) var i = 0 @@ -451,28 +451,28 @@ object Array extends FallbackArrayBuilding { /** Creates an array containing the values of a given function `f` * over given range `[0..n1, 0..n2)` */ - @deprecated("use `Array.tabulate' instead") + @deprecated("use `Array.tabulate' instead", "2.8.0") def fromFunction[T: ClassManifest](f: (Int, Int) => T)(n1: Int, n2: Int): Array[Array[T]] = fromFunction(i => fromFunction(f(i, _))(n2))(n1) /** Creates an array containing the values of a given function `f` * over given range `[0..n1, 0..n2, 0..n3)` */ - @deprecated("use `Array.tabulate' instead") + @deprecated("use `Array.tabulate' instead", "2.8.0") def fromFunction[T: ClassManifest](f: (Int, Int, Int) => T)(n1: Int, n2: Int, n3: Int): Array[Array[Array[T]]] = fromFunction(i => fromFunction(f(i, _, _))(n2, n3))(n1) /** Creates an array containing the values of a given function `f` * over given range `[0..n1, 0..n2, 0..n3, 0..n4)` */ - @deprecated("use `Array.tabulate' instead") + @deprecated("use `Array.tabulate' instead", "2.8.0") def fromFunction[T: ClassManifest](f: (Int, Int, Int, Int) => T)(n1: Int, n2: Int, n3: Int, n4: Int): Array[Array[Array[Array[T]]]] = fromFunction(i => fromFunction(f(i, _, _, _))(n2, n3, n4))(n1) /** Creates an array containing the values of a given function `f` * over given range `[0..n1, 0..n2, 0..n3, 0..n4, 0..n5)` */ - @deprecated("use `Array.tabulate' instead") + @deprecated("use `Array.tabulate' instead", "2.8.0") def fromFunction[T: ClassManifest](f: (Int, Int, Int, Int, Int) => T)(n1: Int, n2: Int, n3: Int, n4: Int, n5: Int): Array[Array[Array[Array[Array[T]]]]] = fromFunction(i => fromFunction(f(i, _, _, _, _))(n2, n3, n4, n5))(n1) } @@ -486,56 +486,56 @@ object Array extends FallbackArrayBuilding { final class Array[T](_length: Int) extends java.io.Serializable with java.lang.Cloneable { /** Multidimensional array creation */ - @deprecated("use `Array.ofDim' instead") + @deprecated("use `Array.ofDim' instead", "2.8.0") def this(dim1: Int, dim2: Int) = { this(dim1) throw new Error() } /** Multidimensional array creation */ - @deprecated("use `Array.ofDim' instead") + @deprecated("use `Array.ofDim' instead", "2.8.0") def this(dim1: Int, dim2: Int, dim3: Int) = { this(dim1) throw new Error() } /** Multidimensional array creation */ - @deprecated("use `Array.ofDim' instead") + @deprecated("use `Array.ofDim' instead", "2.8.0") def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int) = { this(dim1) throw new Error() } /** Multidimensional array creation */ - @deprecated("use `Array.ofDim' instead") + @deprecated("use `Array.ofDim' instead", "2.8.0") def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int) = { this(dim1); throw new Error() } /** Multidimensional array creation */ - @deprecated("use `Array.ofDim' instead") + @deprecated("use `Array.ofDim' instead", "2.8.0") def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int, dim6: Int) = { this(dim1) throw new Error() } /** Multidimensional array creation */ - @deprecated("use `Array.ofDim' instead") + @deprecated("use `Array.ofDim' instead", "2.8.0") def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int, dim6: Int, dim7: Int) = { this(dim1) throw new Error() } /** Multidimensional array creation */ - @deprecated("use `Array.ofDim' instead") + @deprecated("use `Array.ofDim' instead", "2.8.0") def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int, dim6: Int, dim7: Int, dim8: Int) = { this(dim1) throw new Error() } /** Multidimensional array creation */ - @deprecated("use `Array.ofDim' instead") + @deprecated("use `Array.ofDim' instead", "2.8.0") def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int, dim6: Int, dim7: Int, dim8: Int, dim9: Int) = { this(dim1) throw new Error() diff --git a/src/library/scala/Cell.scala b/src/library/scala/Cell.scala index 018710f054..f4fbc72c19 100644 --- a/src/library/scala/Cell.scala +++ b/src/library/scala/Cell.scala @@ -17,5 +17,5 @@ package scala * @author Martin Odersky * @version 1.0, 08/08/2003 */ -@deprecated("use `scala.Option` or `scala.Some` instead") +@deprecated("use `scala.Option` or `scala.Some` instead", "2.9") case class Cell[+T](elem: T) diff --git a/src/library/scala/CountedIterator.scala b/src/library/scala/CountedIterator.scala index 0d74ab3820..6f2c597169 100644 --- a/src/library/scala/CountedIterator.scala +++ b/src/library/scala/CountedIterator.scala @@ -14,7 +14,7 @@ package scala * * @since 2.0 */ -@deprecated("use iterator.zipWithIndex instead") +@deprecated("use iterator.zipWithIndex instead", "2.8.0") trait CountedIterator[+A] extends Iterator[A] { /** counts the elements in this iterator; counts start at 0 */ diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala index 6fd7b0984b..fb782df108 100644 --- a/src/library/scala/Double.scala +++ b/src/library/scala/Double.scala @@ -129,7 +129,7 @@ object Double extends AnyValCompanion { final val PositiveInfinity = java.lang.Double.POSITIVE_INFINITY final val NegativeInfinity = java.lang.Double.NEGATIVE_INFINITY - @deprecated("use Double.MinPositiveValue instead") + @deprecated("use Double.MinPositiveValue instead", "2.9") final val Epsilon = MinPositiveValue /** The negative number with the greatest (finite) absolute value which is representable diff --git a/src/library/scala/Either.scala b/src/library/scala/Either.scala index 2fe81c0d84..29b75a4c82 100644 --- a/src/library/scala/Either.scala +++ b/src/library/scala/Either.scala @@ -311,11 +311,11 @@ object Either { } } - @deprecated("use `x.joinLeft'") + @deprecated("use `x.joinLeft'", "2.8.0") def joinLeft[A, B](es: Either[Either[A, B], B]) = es.left.flatMap(x => x) - @deprecated("use `x.joinRight'") + @deprecated("use `x.joinRight'", "2.8.0") def joinRight[A, B](es: Either[A, Either[A, B]]) = es.right.flatMap(x => x) @@ -323,7 +323,7 @@ object Either { * Takes an `Either` to its contained value within `Left` or * `Right`. */ - @deprecated("use `x.merge'") + @deprecated("use `x.merge'", "2.8.0") def merge[T](e: Either[T, T]) = e match { case Left(t) => t case Right(t) => t diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala index 38819e5d16..ed774df75e 100644 --- a/src/library/scala/Float.scala +++ b/src/library/scala/Float.scala @@ -129,7 +129,7 @@ object Float extends AnyValCompanion { final val PositiveInfinity = java.lang.Float.POSITIVE_INFINITY final val NegativeInfinity = java.lang.Float.NEGATIVE_INFINITY - @deprecated("use Float.MinPositiveValue instead") + @deprecated("use Float.MinPositiveValue instead", "2.9") final val Epsilon = MinPositiveValue /** The negative number with the greatest (finite) absolute value which is representable diff --git a/src/library/scala/Function.scala b/src/library/scala/Function.scala index ff0769b84b..a6e2a2d056 100644 --- a/src/library/scala/Function.scala +++ b/src/library/scala/Function.scala @@ -50,7 +50,7 @@ object Function { * @param f ... * @return ... */ - @deprecated("Use `f.curried` instead") + @deprecated("Use `f.curried` instead", "2.8.0") def curried[a1, a2, b](f: (a1, a2) => b): a1 => a2 => b = { x1 => x2 => f(x1, x2) } @@ -60,21 +60,21 @@ object Function { * @param f ... * @return ... */ - @deprecated("Use `f.curried` instead") + @deprecated("Use `f.curried` instead", "2.8.0") def curried[a1, a2, a3, b](f: (a1, a2, a3) => b): a1 => a2 => a3 => b = { x1 => x2 => x3 => f(x1, x2, x3) } /** Currying for functions of arity 4. */ - @deprecated("Use `f.curried` instead") + @deprecated("Use `f.curried` instead", "2.8.0") def curried[a1, a2, a3, a4, b](f: (a1, a2, a3, a4) => b): a1 => a2 => a3 => a4 => b = { x1 => x2 => x3 => x4 => f(x1, x2, x3, x4) } /** Currying for functions of arity 5. */ - @deprecated("Use `f.curried` instead") + @deprecated("Use `f.curried` instead", "2.8.0") def curried[a1, a2, a3, a4, a5, b](f: (a1, a2, a3, a4, a5) => b): a1 => a2 => a3 => a4 => a5 => b = { x1 => x2 => x3 => x4 => x5 => f(x1, x2, x3, x4, x5) } diff --git a/src/library/scala/Math.scala b/src/library/scala/Math.scala index a1663a6a02..b8493185a2 100644 --- a/src/library/scala/Math.scala +++ b/src/library/scala/Math.scala @@ -13,83 +13,83 @@ package scala * operations such as the elementary exponential, logarithm, square root, and * trigonometric functions. */ -@deprecated("use the scala.math package object instead.\n(Example package object usage: scala.math.Pi )") +@deprecated("use the scala.math package object instead.\n(Example package object usage: scala.math.Pi )", "2.8.0") object Math extends MathCommon { - @deprecated("Use scala.Byte.MinValue instead") + @deprecated("Use scala.Byte.MinValue instead", "2.8.0") val MIN_BYTE = java.lang.Byte.MIN_VALUE - @deprecated("Use scala.Byte.MaxValue instead") + @deprecated("Use scala.Byte.MaxValue instead", "2.8.0") val MAX_BYTE = java.lang.Byte.MAX_VALUE - @deprecated("Use scala.Short.MinValue instead") + @deprecated("Use scala.Short.MinValue instead", "2.8.0") val MIN_SHORT = java.lang.Short.MIN_VALUE - @deprecated("Use scala.Short.MaxValue instead") + @deprecated("Use scala.Short.MaxValue instead", "2.8.0") val MAX_SHORT = java.lang.Short.MAX_VALUE - @deprecated("Use scala.Char.MinValue instead") + @deprecated("Use scala.Char.MinValue instead", "2.8.0") val MIN_CHAR = java.lang.Character.MIN_VALUE - @deprecated("Use scala.Char.MaxValue instead") + @deprecated("Use scala.Char.MaxValue instead", "2.8.0") val MAX_CHAR = java.lang.Character.MAX_VALUE - @deprecated("Use scala.Int.MinValue instead") + @deprecated("Use scala.Int.MinValue instead", "2.8.0") val MIN_INT = java.lang.Integer.MIN_VALUE - @deprecated("Use scala.Int.MaxValue instead") + @deprecated("Use scala.Int.MaxValue instead", "2.8.0") val MAX_INT = java.lang.Integer.MAX_VALUE - @deprecated("Use scala.Long.MinValue instead") + @deprecated("Use scala.Long.MinValue instead", "2.8.0") val MIN_LONG = java.lang.Long.MIN_VALUE - @deprecated("Use scala.Long.MaxValue instead") + @deprecated("Use scala.Long.MaxValue instead", "2.8.0") val MAX_LONG = java.lang.Long.MAX_VALUE /** The smallest possible value for <a href="Float.html" target="_self">scala.Float</a>. */ - @deprecated("Use scala.Float.MinValue instead") + @deprecated("Use scala.Float.MinValue instead", "2.8.0") val MIN_FLOAT = -java.lang.Float.MAX_VALUE /** The smallest difference between two values of <a href="Float.html" target="_self">scala.Float</a>. */ - @deprecated("Use scala.Float.MinPositiveValue instead") + @deprecated("Use scala.Float.MinPositiveValue instead", "2.8.0") val EPS_FLOAT = java.lang.Float.MIN_VALUE /** The greatest possible value for <a href="Float.html" target="_self">scala.Float</a>. */ - @deprecated("Use scala.Float.MaxValue instead") + @deprecated("Use scala.Float.MaxValue instead", "2.8.0") val MAX_FLOAT = java.lang.Float.MAX_VALUE /** A value of type <a href="Float.html" target="_self">scala.Float</a> that represents no number. */ - @deprecated("Use scala.Float.NaN instead") + @deprecated("Use scala.Float.NaN instead", "2.8.0") val NaN_FLOAT = java.lang.Float.NaN /** Negative infinity of type <a href="Float.html" target="_self">scala.Float</a>. */ - @deprecated("Use scala.Float.NegativeInfinity instead") + @deprecated("Use scala.Float.NegativeInfinity instead", "2.8.0") val NEG_INF_FLOAT = java.lang.Float.NEGATIVE_INFINITY /** Positive infinity of type <a href="Float.html" target="_self">scala.Float</a>. */ - @deprecated("Use scala.Float.PositiveInfinity instead") + @deprecated("Use scala.Float.PositiveInfinity instead", "2.8.0") val POS_INF_FLOAT = java.lang.Float.POSITIVE_INFINITY /** The smallest possible value for <a href="Double.html" target="_self">scala.Double</a>. */ - @deprecated("Use scala.Double.MinValue instead") + @deprecated("Use scala.Double.MinValue instead", "2.8.0") val MIN_DOUBLE = -java.lang.Double.MAX_VALUE /** The smallest difference between two values of <a href="Double.html" target="_self">scala.Double</a>. */ - @deprecated("Use scala.Double.MinPositiveValue instead") + @deprecated("Use scala.Double.MinPositiveValue instead", "2.8.0") val EPS_DOUBLE = java.lang.Double.MIN_VALUE /** The greatest possible value for <a href="Double.html" target="_self">scala.Double</a>. */ - @deprecated("Use scala.Double.MaxValue instead") + @deprecated("Use scala.Double.MaxValue instead", "2.8.0") val MAX_DOUBLE = java.lang.Double.MAX_VALUE /** A value of type <a href="Double.html" target="_self">scala.Double</a> that represents no number. */ - @deprecated("Use scala.Double.NaN instead") + @deprecated("Use scala.Double.NaN instead", "2.8.0") val NaN_DOUBLE = java.lang.Double.NaN /** Negative infinity of type <a href="Double.html" target="_self">scala.Double</a>. */ - @deprecated("Use scala.Double.NegativeInfinity instead") + @deprecated("Use scala.Double.NegativeInfinity instead", "2.8.0") val NEG_INF_DOUBLE = java.lang.Double.NEGATIVE_INFINITY /** Positive infinity of type <a href="Double.html" target="_self">scala.Double</a>. */ - @deprecated("Use scala.Double.PositiveInfinity instead") + @deprecated("Use scala.Double.PositiveInfinity instead", "2.8.0") val POS_INF_DOUBLE = java.lang.Double.POSITIVE_INFINITY }
\ No newline at end of file diff --git a/src/library/scala/NotDefinedError.scala b/src/library/scala/NotDefinedError.scala index 194d8ce626..1fd0e7ec49 100644 --- a/src/library/scala/NotDefinedError.scala +++ b/src/library/scala/NotDefinedError.scala @@ -13,5 +13,5 @@ package scala /** * @since 2.0 */ -@deprecated("Use a custom Error class instead") +@deprecated("Use a custom Error class instead", "2.8.0") final class NotDefinedError(msg: String) extends Error("not defined: " + msg) diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index 20473009bf..1a0dbd70a4 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -59,16 +59,16 @@ object Predef extends LowPriorityImplicits { // Deprecated - @deprecated("Use sys.error(message) instead") + @deprecated("Use sys.error(message) instead", "2.9") def error(message: String): Nothing = sys.error(message) - @deprecated("Use sys.exit() instead") + @deprecated("Use sys.exit() instead", "2.9") def exit(): Nothing = sys.exit() - @deprecated("Use sys.exit(status) instead") + @deprecated("Use sys.exit(status) instead", "2.9") def exit(status: Int): Nothing = sys.exit(status) - @deprecated("Use formatString.format(args: _*) or arg.formatted(formatString) instead") + @deprecated("Use formatString.format(args: _*) or arg.formatted(formatString) instead", "2.9") def format(text: String, xs: Any*) = augmentString(text).format(xs: _*) // errors and asserts ------------------------------------------------- @@ -358,7 +358,7 @@ object Predef extends LowPriorityImplicits { } // less useful due to #2781 - @deprecated("Use From => To instead") + @deprecated("Use From => To instead", "2.9") sealed abstract class <%<[-From, +To] extends (From => To) with Serializable object <%< { implicit def conformsOrViewsAs[A <% B, B]: A <%< B = new (A <%< B) {def apply(x: A) = x} diff --git a/src/library/scala/Product.scala b/src/library/scala/Product.scala index dfa04bbbe7..1dbf46b4c2 100644 --- a/src/library/scala/Product.scala +++ b/src/library/scala/Product.scala @@ -42,7 +42,7 @@ trait Product extends Equals { def next() = { val result = productElement(c); c += 1; result } } - @deprecated("use productIterator instead") + @deprecated("use productIterator instead", "2.8.0") def productElements: Iterator[Any] = productIterator /** A string used in the `toString` methods of derived classes. diff --git a/src/library/scala/annotation/serializable.scala b/src/library/scala/annotation/serializable.scala index 9ae31c6462..a209347c37 100644 --- a/src/library/scala/annotation/serializable.scala +++ b/src/library/scala/annotation/serializable.scala @@ -11,5 +11,5 @@ package scala.annotation /** * An annotation that designates the class to which it is applied as serializable */ -@deprecated("instead of `@serializable class C`, use `class C extends Serializable`") +@deprecated("instead of `@serializable class C`, use `class C extends Serializable`", "2.9") class serializable extends annotation.StaticAnnotation diff --git a/src/library/scala/collection/Iterable.scala b/src/library/scala/collection/Iterable.scala index 64c3185c0b..03a8302116 100644 --- a/src/library/scala/collection/Iterable.scala +++ b/src/library/scala/collection/Iterable.scala @@ -50,13 +50,13 @@ object Iterable extends TraversableFactory[Iterable] { def newBuilder[A]: Builder[A, Iterable[A]] = immutable.Iterable.newBuilder[A] /** The minimum element of a non-empty sequence of ordered elements */ - @deprecated("use <seq>.min instead, where <seq> is the sequence for which you want to compute the minimum") + @deprecated("use <seq>.min instead, where <seq> is the sequence for which you want to compute the minimum", "2.8.0") def min[A](seq: Iterable[A])(implicit ord: Ordering[A]): A = seq.min /** The maximum element of a non-empty sequence of ordered elements */ - @deprecated("use <seq>.max instead, where <seq> is the sequence for which you want to compute the maximum") + @deprecated("use <seq>.max instead, where <seq> is the sequence for which you want to compute the maximum", "2.8.0") def max[A](seq: Iterable[A])(implicit ord: Ordering[A]): A = seq.max - @deprecated("use View instead") + @deprecated("use View instead", "2.8.0") type Projection[A] = IterableView[A, Coll] } diff --git a/src/library/scala/collection/IterableLike.scala b/src/library/scala/collection/IterableLike.scala index fe87d1a6d9..458b26207e 100644 --- a/src/library/scala/collection/IterableLike.scala +++ b/src/library/scala/collection/IterableLike.scala @@ -247,20 +247,20 @@ self => override /*TraversableLike*/ def view(from: Int, until: Int) = view.slice(from, until) - @deprecated("use `iterator' instead") + @deprecated("use `iterator' instead", "2.8.0") def elements = iterator - @deprecated("use `head' instead") def first: A = head + @deprecated("use `head' instead", "2.8.0") def first: A = head /** `None` if iterable is empty. */ - @deprecated("use `headOption' instead") def firstOption: Option[A] = headOption + @deprecated("use `headOption' instead", "2.8.0") def firstOption: Option[A] = headOption /** * returns a projection that can be used to call non-strict `filter`, * `map`, and `flatMap` methods that build projections * of the collection. */ - @deprecated("use `view' instead") + @deprecated("use `view' instead", "2.8.0") def projection = view } diff --git a/src/library/scala/collection/Iterator.scala b/src/library/scala/collection/Iterator.scala index 5054ff01fc..082ffb464e 100644 --- a/src/library/scala/collection/Iterator.scala +++ b/src/library/scala/collection/Iterator.scala @@ -149,13 +149,13 @@ object Iterator { def next = elem } - @deprecated("use `xs.iterator' or `Iterator(xs)' instead") + @deprecated("use `xs.iterator' or `Iterator(xs)' instead", "2.8.0") def fromValues[a](xs: a*) = xs.iterator /** @param xs the array of elements * @see also: IndexedSeq.iterator and slice */ - @deprecated("use `xs.iterator' instead") + @deprecated("use `xs.iterator' instead", "2.8.0") def fromArray[a](xs: Array[a]): Iterator[a] = fromArray(xs, 0, xs.length) @@ -165,7 +165,7 @@ object Iterator { * @param length the length * @see also: IndexedSeq.iterator and slice */ - @deprecated("use `xs.slice(start, start + length).iterator' instead") + @deprecated("use `xs.slice(start, start + length).iterator' instead", "2.8.0") def fromArray[a](xs: Array[a], start: Int, length: Int): Iterator[a] = xs.slice(start, start + length).iterator @@ -173,7 +173,7 @@ object Iterator { * @param n the product arity * @return the iterator on `Product<n>`. */ - @deprecated("use product.productIterator instead") + @deprecated("use product.productIterator instead", "2.8.0") def fromProduct(n: Product): Iterator[Any] = new Iterator[Any] { private var c: Int = 0 private val cmax = n.productArity @@ -192,7 +192,7 @@ object Iterator { * @param step the increment function of the iterator, must be monotonically increasing or decreasing * @return the iterator with values in range `[start;end)`. */ - @deprecated("use Iterator.iterate(start, end - start)(step) instead") + @deprecated("use Iterator.iterate(start, end - start)(step) instead", "2.8.0") def range(start: Int, end: Int, step: Int => Int) = new Iterator[Int] { private val up = step(start) > start private val down = step(start) < start @@ -211,7 +211,7 @@ object Iterator { * @param step the increment function of the iterator * @return the iterator starting at value `start`. */ - @deprecated("use iterate(start)(step) instead") + @deprecated("use iterate(start)(step) instead", "2.8.0") def from(start: Int, step: Int => Int): Iterator[Int] = new Iterator[Int] { private var i = start override def hasNext: Boolean = true @@ -223,7 +223,7 @@ object Iterator { * @param its The iterator which returns on each call to next * a new iterator whose elements are to be concatenated to the result. */ - @deprecated("use its.flatten instead") + @deprecated("use its.flatten instead", "2.8.0") def flatten[T](its: Iterator[Iterator[T]]): Iterator[T] = new Iterator[T] { private var cur = its.next def hasNext: Boolean = { @@ -1024,16 +1024,16 @@ trait Iterator[+A] extends TraversableOnce[A] { /** Returns a new iterator that first yields the elements of this * iterator followed by the elements provided by iterator `that`. */ - @deprecated("use `++`") + @deprecated("use `++`", "2.3.2") def append[B >: A](that: Iterator[B]) = self ++ that /** Returns index of the first element satisfying a predicate, or -1. */ - @deprecated("use `indexWhere` instead") + @deprecated("use `indexWhere` instead", "2.8.0") def findIndexOf(p: A => Boolean): Int = indexWhere(p) /** Returns a counted iterator from this iterator. */ - @deprecated("use zipWithIndex in Iterator") + @deprecated("use zipWithIndex in Iterator", "2.8.0") def counted = new CountedIterator[A] { private var cnt = 0 def count = cnt @@ -1050,7 +1050,7 @@ trait Iterator[+A] extends TraversableOnce[A] { * @param start the starting index. * @param sz the maximum number of elements to be read. */ - @deprecated("use copyToArray instead") + @deprecated("use copyToArray instead", "2.8.0") def readInto[B >: A](xs: Array[B], start: Int, sz: Int) { var i = start while (hasNext && i - start < sz) { @@ -1059,12 +1059,12 @@ trait Iterator[+A] extends TraversableOnce[A] { } } - @deprecated("use copyToArray instead") + @deprecated("use copyToArray instead", "2.8.0") def readInto[B >: A](xs: Array[B], start: Int) { readInto(xs, start, xs.length - start) } - @deprecated("use copyToArray instead") + @deprecated("use copyToArray instead", "2.8.0") def readInto[B >: A](xs: Array[B]) { readInto(xs, 0, xs.length) } diff --git a/src/library/scala/collection/JavaConversions.scala b/src/library/scala/collection/JavaConversions.scala index d71208f752..29930299be 100644 --- a/src/library/scala/collection/JavaConversions.scala +++ b/src/library/scala/collection/JavaConversions.scala @@ -73,7 +73,7 @@ object JavaConversions { case _ => IteratorWrapper(i) } - @deprecated("use asJavaIterator instead") + @deprecated("use asJavaIterator instead", "2.8.1") def asIterator[A](i : Iterator[A]): ju.Iterator[A] = asJavaIterator[A](i) /** @@ -94,7 +94,7 @@ object JavaConversions { case _ => IteratorWrapper(i) } - @deprecated("use asJavaEnmeration instead") + @deprecated("use asJavaEnmeration instead", "2.8.1") def asEnumeration[A](i : Iterator[A]): ju.Enumeration[A] = asJavaEnumeration[A](i) /** @@ -115,7 +115,7 @@ object JavaConversions { case _ => IterableWrapper(i) } - @deprecated("use asJavaIterable instead") + @deprecated("use asJavaIterable instead", "2.8.1") def asIterable[A](i : Iterable[A]): jl.Iterable[A] = asJavaIterable[A](i) /** @@ -134,7 +134,7 @@ object JavaConversions { case _ => new IterableWrapper(i) } - @deprecated("use asJavaCollection instead") + @deprecated("use asJavaCollection instead", "2.8.1") def asCollection[A](i : Iterable[A]): ju.Collection[A] = asJavaCollection[A](i) /** @@ -154,9 +154,9 @@ object JavaConversions { case JListWrapper(wrapped) => wrapped case _ => new MutableBufferWrapper(b) } - @deprecated("use bufferAsJavaList instead") + @deprecated("use bufferAsJavaList instead", "2.9") def asJavaList[A](b : mutable.Buffer[A]): ju.List[A] = bufferAsJavaList[A](b) - @deprecated("use bufferAsJavaList instead") + @deprecated("use bufferAsJavaList instead", "2.8.1") def asList[A](b : mutable.Buffer[A]): ju.List[A] = bufferAsJavaList[A](b) /** @@ -176,9 +176,9 @@ object JavaConversions { case JListWrapper(wrapped) => wrapped case _ => new MutableSeqWrapper(b) } - @deprecated("use mutableSeqAsJavaList instead") + @deprecated("use mutableSeqAsJavaList instead", "2.9") def asJavaList[A](b : mutable.Seq[A]): ju.List[A] = mutableSeqAsJavaList[A](b) - @deprecated("use mutableSeqAsJavaList instead") + @deprecated("use mutableSeqAsJavaList instead", "2.8.1") def asList[A](b : mutable.Seq[A]): ju.List[A] = mutableSeqAsJavaList[A](b) /** @@ -199,9 +199,9 @@ object JavaConversions { case _ => new SeqWrapper(b) } - @deprecated("use seqAsJavaList instead") + @deprecated("use seqAsJavaList instead", "2.9") def asJavaList[A](b : Seq[A]): ju.List[A] = seqAsJavaList[A](b) - @deprecated("use seqAsJavaList instead") + @deprecated("use seqAsJavaList instead", "2.8.1") def asList[A](b : Seq[A]): ju.List[A] = seqAsJavaList[A](b) /** @@ -222,9 +222,9 @@ object JavaConversions { case _ => new MutableSetWrapper(s) } - @deprecated("use mutableSetAsJavaSet instead") + @deprecated("use mutableSetAsJavaSet instead", "2.9") def asJavaSet[A](s : mutable.Set[A]): ju.Set[A] = mutableSetAsJavaSet[A](s) - @deprecated("use mutableSetAsJavaSet instead") + @deprecated("use mutableSetAsJavaSet instead", "2.8.1") def asSet[A](s : mutable.Set[A]): ju.Set[A] = mutableSetAsJavaSet[A](s) /** @@ -245,9 +245,9 @@ object JavaConversions { case _ => new SetWrapper(s) } - @deprecated("use setAsJavaSet instead") + @deprecated("use setAsJavaSet instead", "2.9") def asJavaSet[A](s: Set[A]): ju.Set[A] = setAsJavaSet[A](s) - @deprecated("use setAsJavaSet instead") + @deprecated("use setAsJavaSet instead", "2.8.1") def asSet[A](s : Set[A]): ju.Set[A] = setAsJavaSet[A](s) /** @@ -269,9 +269,9 @@ object JavaConversions { case _ => new MutableMapWrapper(m) } - @deprecated("use mutableMapAsJavaMap instead") + @deprecated("use mutableMapAsJavaMap instead", "2.9") def asJavaMap[A, B](m : mutable.Map[A, B]): ju.Map[A, B] = mutableMapAsJavaMap[A, B](m) - @deprecated("use mutableMapAsJavaMap instead") + @deprecated("use mutableMapAsJavaMap instead", "2.8.1") def asMap[A, B](m : mutable.Map[A, B]): ju.Map[A, B] = mutableMapAsJavaMap[A, B](m) /** @@ -293,7 +293,7 @@ object JavaConversions { case _ => new DictionaryWrapper(m) } - @deprecated("use asJavaDictionary instead") + @deprecated("use asJavaDictionary instead", "2.8.1") def asDictionary[A, B](m : mutable.Map[A, B]): ju.Dictionary[A, B] = asJavaDictionary[A, B](m) /** @@ -315,9 +315,9 @@ object JavaConversions { case _ => new MapWrapper(m) } - @deprecated("use mapAsJavaMap instead") + @deprecated("use mapAsJavaMap instead", "2.9") def asJavaMap[A, B](m : Map[A, B]): ju.Map[A, B] = mapAsJavaMap[A, B](m) - @deprecated("use mapAsJavaMap instead") + @deprecated("use mapAsJavaMap instead", "2.8.1") def asMap[A, B](m : Map[A, B]): ju.Map[A, B] = mapAsJavaMap[A, B](m) /** @@ -338,7 +338,7 @@ object JavaConversions { case _ => new ConcurrentMapWrapper(m) } - @deprecated("use asJavaConcurrentMap instead") + @deprecated("use asJavaConcurrentMap instead", "2.8.1") def asConcurrentMap[A, B](m: mutable.ConcurrentMap[A, B]): juc.ConcurrentMap[A, B] = asJavaConcurrentMap[A, B](m) // Java => Scala @@ -361,7 +361,7 @@ object JavaConversions { case _ => JIteratorWrapper(i) } - @deprecated("use asScalaIterator instead") + @deprecated("use asScalaIterator instead", "2.8.1") def asIterator[A](i : ju.Iterator[A]): Iterator[A] = asScalaIterator[A](i) /** @@ -382,7 +382,7 @@ object JavaConversions { case _ => JEnumerationWrapper(i) } - @deprecated("use enumerationAsScalaIterator instead") + @deprecated("use enumerationAsScalaIterator instead", "2.8.1") def asIterator[A](i : ju.Enumeration[A]): Iterator[A] = enumerationAsScalaIterator[A](i) /** @@ -403,9 +403,9 @@ object JavaConversions { case _ => JIterableWrapper(i) } - @deprecated("use iterableAsScalaIterable instead") + @deprecated("use iterableAsScalaIterable instead", "2.9") def asScalaIterable[A](i : jl.Iterable[A]): Iterable[A] = iterableAsScalaIterable[A](i) - @deprecated("use iterableAsScalaIterable instead") + @deprecated("use iterableAsScalaIterable instead", "2.8.1") def asIterable[A](i : jl.Iterable[A]): Iterable[A] = iterableAsScalaIterable[A](i) /** @@ -422,9 +422,9 @@ object JavaConversions { case IterableWrapper(wrapped) => wrapped case _ => JCollectionWrapper(i) } - @deprecated("use collectionAsScalaIterable instead") + @deprecated("use collectionAsScalaIterable instead", "2.9") def asScalaIterable[A](i : ju.Collection[A]): Iterable[A] = collectionAsScalaIterable[A](i) - @deprecated("use collectionAsScalaIterable instead") + @deprecated("use collectionAsScalaIterable instead", "2.8.1") def asIterable[A](i : ju.Collection[A]): Iterable[A] = collectionAsScalaIterable[A](i) /** @@ -445,7 +445,7 @@ object JavaConversions { case _ =>new JListWrapper(l) } - @deprecated("use asScalaBuffer instead") + @deprecated("use asScalaBuffer instead", "2.8.1") def asBuffer[A](l : ju.List[A]): mutable.Buffer[A] = asScalaBuffer[A](l) /** @@ -466,7 +466,7 @@ object JavaConversions { case _ =>new JSetWrapper(s) } - @deprecated("use asScalaSet instead") + @deprecated("use asScalaSet instead", "2.8.1") def asSet[A](s : ju.Set[A]): mutable.Set[A] = asScalaSet[A](s) /** @@ -488,9 +488,9 @@ object JavaConversions { case _ => new JMapWrapper(m) } - @deprecated("use mapAsScalaMap instead") + @deprecated("use mapAsScalaMap instead", "2.9") def asScalaMap[A, B](m : ju.Map[A, B]): mutable.Map[A, B] = mapAsScalaMap[A, B](m) - @deprecated("use mapAsScalaMap instead") + @deprecated("use mapAsScalaMap instead", "2.8.1") def asMap[A, B](m : ju.Map[A, B]): mutable.Map[A, B] = mapAsScalaMap[A, B](m) /** @@ -511,7 +511,7 @@ object JavaConversions { case _ => new JConcurrentMapWrapper(m) } - @deprecated("use asScalaConcurrentMap instead") + @deprecated("use asScalaConcurrentMap instead", "2.8.1") def asConcurrentMap[A, B](m: juc.ConcurrentMap[A, B]): mutable.ConcurrentMap[A, B] = asScalaConcurrentMap[A, B](m) /** @@ -528,7 +528,7 @@ object JavaConversions { case _ => new JDictionaryWrapper(p) } - @deprecated("use dictionaryAsScalaMap instead") + @deprecated("use dictionaryAsScalaMap instead", "2.8.1") def asMap[A, B](p: ju.Dictionary[A, B]): mutable.Map[A, B] = dictionaryAsScalaMap[A, B](p) /** @@ -544,9 +544,9 @@ object JavaConversions { case _ => new JPropertiesWrapper(p) } - @deprecated("use propertiesAsScalaMap instead") + @deprecated("use propertiesAsScalaMap instead", "2.9") def asScalaMap(p: ju.Properties): mutable.Map[String, String] = propertiesAsScalaMap(p) - @deprecated("use propertiesAsScalaMap instead") + @deprecated("use propertiesAsScalaMap instead", "2.8.1") def asMap(p: ju.Properties): mutable.Map[String, String] = propertiesAsScalaMap(p) // Private implementations (shared by JavaConverters) ... diff --git a/src/library/scala/collection/JavaConverters.scala b/src/library/scala/collection/JavaConverters.scala index b68578fd21..e6bda59396 100755 --- a/src/library/scala/collection/JavaConverters.scala +++ b/src/library/scala/collection/JavaConverters.scala @@ -210,11 +210,11 @@ object JavaConverters { implicit def seqAsJavaListConverter[A](b : Seq[A]): AsJava[ju.List[A]] = new AsJava(seqAsJavaList(b)) - @deprecated("Use bufferAsJavaListConverter instead") + @deprecated("Use bufferAsJavaListConverter instead", "2.9") def asJavaListConverter[A](b : mutable.Buffer[A]): AsJava[ju.List[A]] = bufferAsJavaListConverter(b) - @deprecated("Use mutableSeqAsJavaListConverter instead") + @deprecated("Use mutableSeqAsJavaListConverter instead", "2.9") def asJavaListConverter[A](b : mutable.Seq[A]): AsJava[ju.List[A]] = mutableSeqAsJavaListConverter(b) - @deprecated("Use seqAsJavaListConverter instead") + @deprecated("Use seqAsJavaListConverter instead", "2.9") def asJavaListConverter[A](b : Seq[A]): AsJava[ju.List[A]] = seqAsJavaListConverter(b) /** @@ -233,7 +233,7 @@ object JavaConverters { implicit def mutableSetAsJavaSetConverter[A](s : mutable.Set[A]): AsJava[ju.Set[A]] = new AsJava(mutableSetAsJavaSet(s)) - @deprecated("Use mutableSetAsJavaSetConverter instead") + @deprecated("Use mutableSetAsJavaSetConverter instead", "2.9") def asJavaSetConverter[A](s : mutable.Set[A]): AsJava[ju.Set[A]] = mutableSetAsJavaSetConverter(s) /** @@ -252,7 +252,7 @@ object JavaConverters { implicit def setAsJavaSetConverter[A](s : Set[A]): AsJava[ju.Set[A]] = new AsJava(setAsJavaSet(s)) - @deprecated("Use setAsJavaSetConverter instead") + @deprecated("Use setAsJavaSetConverter instead", "2.9") def asJavaSetConverter[A](s : Set[A]): AsJava[ju.Set[A]] = setAsJavaSetConverter(s) /** @@ -271,7 +271,7 @@ object JavaConverters { implicit def mutableMapAsJavaMapConverter[A, B](m : mutable.Map[A, B]): AsJava[ju.Map[A, B]] = new AsJava(mutableMapAsJavaMap(m)) - @deprecated("use mutableMapAsJavaMapConverter instead") + @deprecated("use mutableMapAsJavaMapConverter instead", "2.9") def asJavaMapConverter[A, B](m : mutable.Map[A, B]): AsJava[ju.Map[A, B]] = mutableMapAsJavaMapConverter(m) /** @@ -306,7 +306,7 @@ object JavaConverters { implicit def mapAsJavaMapConverter[A, B](m : Map[A, B]): AsJava[ju.Map[A, B]] = new AsJava(mapAsJavaMap(m)) - @deprecated("Use mapAsJavaMapConverter instead") + @deprecated("Use mapAsJavaMapConverter instead", "2.9") def asJavaMapConverter[A, B](m : Map[A, B]): AsJava[ju.Map[A, B]] = mapAsJavaMapConverter(m) /** @@ -373,7 +373,7 @@ object JavaConverters { implicit def iterableAsScalaIterableConverter[A](i : jl.Iterable[A]): AsScala[Iterable[A]] = new AsScala(iterableAsScalaIterable(i)) - @deprecated("Use iterableAsScalaIterableConverter instead") + @deprecated("Use iterableAsScalaIterableConverter instead", "2.9") def asScalaIterableConverter[A](i : jl.Iterable[A]): AsScala[Iterable[A]] = iterableAsScalaIterableConverter(i) /** @@ -389,7 +389,7 @@ object JavaConverters { implicit def collectionAsScalaIterableConverter[A](i : ju.Collection[A]): AsScala[Iterable[A]] = new AsScala(collectionAsScalaIterable(i)) - @deprecated("Use collectionAsScalaIterableConverter instead") + @deprecated("Use collectionAsScalaIterableConverter instead", "2.9") def asScalaIterableConverter[A](i : ju.Collection[A]): AsScala[Iterable[A]] = collectionAsScalaIterableConverter(i) /** @@ -440,7 +440,7 @@ object JavaConverters { implicit def mapAsScalaMapConverter[A, B](m : ju.Map[A, B]): AsScala[mutable.Map[A, B]] = new AsScala(mapAsScalaMap(m)) - @deprecated("Use mapAsScalaMapConverter instead") + @deprecated("Use mapAsScalaMapConverter instead", "2.9") def asScalaMapConverter[A, B](m : ju.Map[A, B]): AsScala[mutable.Map[A, B]] = mapAsScalaMapConverter(m) /** @@ -483,7 +483,7 @@ object JavaConverters { implicit def propertiesAsScalaMapConverter(p: ju.Properties): AsScala[mutable.Map[String, String]] = new AsScala(propertiesAsScalaMap(p)) - @deprecated("Use propertiesAsScalaMapConverter instead") + @deprecated("Use propertiesAsScalaMapConverter instead", "2.9") def asScalaMapConverter(p: ju.Properties): AsScala[mutable.Map[String, String]] = propertiesAsScalaMapConverter(p) diff --git a/src/library/scala/collection/MapLike.scala b/src/library/scala/collection/MapLike.scala index 6f48f7e761..a832f9089d 100644 --- a/src/library/scala/collection/MapLike.scala +++ b/src/library/scala/collection/MapLike.scala @@ -248,7 +248,8 @@ self => def get(key: A) = self.get(key).map(f) } - @deprecated("use `mapValues' instead") def mapElements[C](f: B => C) = mapValues(f) + @deprecated("use `mapValues' instead", "2.8.0") + def mapElements[C](f: B => C) = mapValues(f) // The following 5 operations (updated, two times +, two times ++) should really be // generic, returning This[B]. We need better covariance support to express that though. diff --git a/src/library/scala/collection/Seq.scala b/src/library/scala/collection/Seq.scala index df92685134..abcc0b5780 100644 --- a/src/library/scala/collection/Seq.scala +++ b/src/library/scala/collection/Seq.scala @@ -40,10 +40,10 @@ object Seq extends SeqFactory[Seq] { def newBuilder[A]: Builder[A, Seq[A]] = immutable.Seq.newBuilder[A] - @deprecated("use View instead") + @deprecated("use View instead", "2.8.0") type Projection[A] = SeqView[A, Coll] - @deprecated("use Seq(value) instead") + @deprecated("use Seq(value) instead", "2.8.0") def singleton[A](value: A) = Seq(value) } diff --git a/src/library/scala/collection/SeqLike.scala b/src/library/scala/collection/SeqLike.scala index b14c546acc..87649e8b03 100644 --- a/src/library/scala/collection/SeqLike.scala +++ b/src/library/scala/collection/SeqLike.scala @@ -120,7 +120,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] with GenSeqLike[A, Repr] /** Returns index of the first element satisfying a predicate, or `-1`. */ - @deprecated("Use indexWhere(p) instead.") + @deprecated("Use indexWhere(p) instead.", "2.8.0") def findIndexOf(p: A => Boolean): Int = indexWhere(p) def lastIndexWhere(p: A => Boolean, end: Int): Int = { @@ -290,7 +290,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] with GenSeqLike[A, Repr] */ def reverseIterator: Iterator[A] = toCollection(reverse).iterator - @deprecated("use `reverseIterator' instead") + @deprecated("use `reverseIterator' instead", "2.8.0") def reversedElements = reverseIterator def startsWith[B](that: GenSeq[B], offset: Int): Boolean = { @@ -630,7 +630,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] with GenSeqLike[A, Repr] /** Returns index of the last element satisfying a predicate, or -1. */ - @deprecated("use `lastIndexWhere` instead") + @deprecated("use `lastIndexWhere` instead", "2.8.0") def findLastIndexOf(p: A => Boolean): Int = lastIndexWhere(p) /** Tests whether every element of this $coll relates to the @@ -643,7 +643,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] with GenSeqLike[A, Repr] * `p(x, y)` is `true` for all corresponding elements `x` of this $coll * and `y` of `that`, otherwise `false`. */ - @deprecated("use `corresponds` instead") + @deprecated("use `corresponds` instead", "2.8.0") def equalsWith[B](that: Seq[B])(f: (A,B) => Boolean): Boolean = corresponds(that)(f) /** @@ -651,7 +651,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] with GenSeqLike[A, Repr] * <code>map</code>, and <code>flatMap</code> methods that build projections * of the collection. */ - @deprecated("use `view' instead") + @deprecated("use `view' instead", "2.8.0") override def projection = view } diff --git a/src/library/scala/collection/SetLike.scala b/src/library/scala/collection/SetLike.scala index 0a8cc13f23..c5b97c135d 100644 --- a/src/library/scala/collection/SetLike.scala +++ b/src/library/scala/collection/SetLike.scala @@ -147,7 +147,7 @@ self => * * @param that the set to intersect with */ - @deprecated("use & instead") + @deprecated("use & instead", "2.8.0") def ** (that: GenSet[A]): This = &(that) /** Computes the union between of set and another set. diff --git a/src/library/scala/collection/TraversableView.scala b/src/library/scala/collection/TraversableView.scala index 98f0037901..3fad7d462d 100644 --- a/src/library/scala/collection/TraversableView.scala +++ b/src/library/scala/collection/TraversableView.scala @@ -24,7 +24,8 @@ object TraversableView { class NoBuilder[A] extends Builder[A, Nothing] { def +=(elem: A): this.type = this def iterator: Iterator[A] = Iterator.empty - @deprecated("use `iterator' instead") def elements = iterator + @deprecated("use `iterator' instead", "2.8.0") + def elements = iterator def result() = throw new UnsupportedOperationException("TraversableView.Builder.result") def clear() {} } diff --git a/src/library/scala/collection/generic/Addable.scala b/src/library/scala/collection/generic/Addable.scala index 0e903ac2a1..8f33a62f10 100644 --- a/src/library/scala/collection/generic/Addable.scala +++ b/src/library/scala/collection/generic/Addable.scala @@ -21,7 +21,7 @@ package generic * @define coll collection * @define Coll Addable */ -@deprecated("Will be removed after scala 2.9") +@deprecated("Will be removed after scala 2.9", "2.8.0") trait Addable[A, +Repr <: Addable[A, Repr]] { self => /** The representation object of type `Repr` which contains the collection's elements diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala index cb67d22fd0..c14e24ab47 100644 --- a/src/library/scala/collection/immutable/List.scala +++ b/src/library/scala/collection/immutable/List.scala @@ -241,10 +241,10 @@ sealed abstract class List[+A] extends LinearSeq[A] /** Like <code>span</code> but with the predicate inverted. */ - @deprecated("use `span { x => !p(x) }` instead") + @deprecated("use `span { x => !p(x) }` instead", "2.8.0") def break(p: A => Boolean): (List[A], List[A]) = span { x => !p(x) } - @deprecated("use `filterNot' instead") + @deprecated("use `filterNot' instead", "2.8.0") def remove(p: A => Boolean): List[A] = filterNot(p) /** Computes the difference between this list and the given list @@ -254,7 +254,7 @@ sealed abstract class List[+A] extends LinearSeq[A] * @return this list without the elements of the given list * `that`. */ - @deprecated("use `list1 filterNot (list2 contains)` instead") + @deprecated("use `list1 filterNot (list2 contains)` instead", "2.8.0") def -- [B >: A](that: List[B]): List[B] = { val b = new ListBuffer[B] var these = this @@ -272,7 +272,7 @@ sealed abstract class List[+A] extends LinearSeq[A] * @return this list without occurrences of the given object * `x`. */ - @deprecated("use `filterNot (_ == x)` instead") + @deprecated("use `filterNot (_ == x)` instead", "2.8.0") def - [B >: A](x: B): List[B] = { val b = new ListBuffer[B] var these = this @@ -283,7 +283,7 @@ sealed abstract class List[+A] extends LinearSeq[A] b.toList } - @deprecated("use `distinct' instead") + @deprecated("use `distinct' instead", "2.8.0") def removeDuplicates: List[A] = distinct /** <p> @@ -302,7 +302,7 @@ sealed abstract class List[+A] extends LinearSeq[A] * .sort((e1, e2) => (e1 compareTo e2) < 0) = * List("Bob", "John", "Steve", "Tom")</pre> */ - @deprecated("use `sortWith' instead") + @deprecated("use `sortWith' instead", "2.8.0") def sort(lt : (A,A) => Boolean): List[A] = { /** Merge two already-sorted lists */ def merge(l1: List[A], l2: List[A]): List[A] = { @@ -456,7 +456,7 @@ object List extends SeqFactory[List] { * or decreasing. * @return the sorted list of all integers in range [start;end). */ - @deprecated("use `iterate' instead") + @deprecated("use `iterate' instead", "2.8.0") def range(start: Int, end: Int, step: Int => Int): List[Int] = { val up = step(start) > start val down = step(start) < start @@ -478,7 +478,7 @@ object List extends SeqFactory[List] { * @param elem the element composing the resulting list * @return a list composed of n elements all equal to elem */ - @deprecated("use `fill' instead") + @deprecated("use `fill' instead", "2.8.0") def make[A](n: Int, elem: A): List[A] = { val b = new ListBuffer[A] var i = 0 @@ -494,7 +494,7 @@ object List extends SeqFactory[List] { * @param xss the list of lists that are to be concatenated * @return the concatenation of all the lists */ - @deprecated("use `xss.flatten' instead of `List.flatten(xss)'") + @deprecated("use `xss.flatten' instead of `List.flatten(xss)'", "2.8.0") def flatten[A](xss: List[List[A]]): List[A] = { val b = new ListBuffer[A] for (xs <- xss) { @@ -512,7 +512,7 @@ object List extends SeqFactory[List] { * @param xs the list of pairs to unzip * @return a pair of lists. */ - @deprecated("use `xs.unzip' instead of `List.unzip(xs)'") + @deprecated("use `xs.unzip' instead of `List.unzip(xs)'", "2.8.0") def unzip[A,B](xs: List[(A,B)]): (List[A], List[B]) = { val b1 = new ListBuffer[A] val b2 = new ListBuffer[B] @@ -530,7 +530,7 @@ object List extends SeqFactory[List] { * @param xs the iterable of pairs to unzip * @return a pair of lists. */ - @deprecated("use `xs.unzip' instead of `List.unzip(xs)'") + @deprecated("use `xs.unzip' instead of `List.unzip(xs)'", "2.8.0") def unzip[A,B](xs: Iterable[(A,B)]): (List[A], List[B]) = xs.foldRight[(List[A], List[B])]((Nil, Nil)) { case ((x, y), (xs, ys)) => (x :: xs, y :: ys) @@ -540,7 +540,7 @@ object List extends SeqFactory[List] { * Returns the `Left` values in the given `Iterable` * of `Either`s. */ - @deprecated("use `xs collect { case Left(x: A) => x }' instead of `List.lefts(xs)'") + @deprecated("use `xs collect { case Left(x: A) => x }' instead of `List.lefts(xs)'", "2.8.0") def lefts[A, B](es: Iterable[Either[A, B]]) = es.foldRight[List[A]](Nil)((e, as) => e match { case Left(a) => a :: as @@ -550,7 +550,7 @@ object List extends SeqFactory[List] { /** * Returns the `Right` values in the given`Iterable` of `Either`s. */ - @deprecated("use `xs collect { case Right(x: B) => x }' instead of `List.rights(xs)'") + @deprecated("use `xs collect { case Right(x: B) => x }' instead of `List.rights(xs)'", "2.8.0") def rights[A, B](es: Iterable[Either[A, B]]) = es.foldRight[List[B]](Nil)((e, bs) => e match { case Left(_) => bs @@ -562,7 +562,7 @@ object List extends SeqFactory[List] { * @param xs the iterable of Eithers to separate * @return a pair of lists. */ - @deprecated("use `(for (Left(x) <- es) yield x, for (Right(x) <- es) yield x)` instead") + @deprecated("use `(for (Left(x) <- es) yield x, for (Right(x) <- es) yield x)` instead", "2.8.0") def separate[A,B](es: Iterable[Either[A, B]]): (List[A], List[B]) = es.foldRight[(List[A], List[B])]((Nil, Nil)) { case (Left(a), (lefts, rights)) => (a :: lefts, rights) @@ -575,7 +575,7 @@ object List extends SeqFactory[List] { * @return a list that contains the elements returned by successive * calls to `it.next` */ - @deprecated("use `it.toList' instead of `List.toList(it)'") + @deprecated("use `it.toList' instead of `List.toList(it)'", "2.8.0") def fromIterator[A](it: Iterator[A]): List[A] = it.toList /** Converts an array into a list. @@ -584,7 +584,7 @@ object List extends SeqFactory[List] { * @return a list that contains the same elements than `arr` * in the same order */ - @deprecated("use `array.toList' instead of `List.fromArray(array)'") + @deprecated("use `array.toList' instead of `List.fromArray(array)'", "2.8.0") def fromArray[A](arr: Array[A]): List[A] = fromArray(arr, 0, arr.length) /** Converts a range of an array into a list. @@ -595,7 +595,7 @@ object List extends SeqFactory[List] { * @return a list that contains the same elements than `arr` * in the same order */ - @deprecated("use `array.view(start, end).toList' instead of `List.fromArray(array, start, end)'") + @deprecated("use `array.view(start, end).toList' instead of `List.fromArray(array, start, end)'", "2.8.0") def fromArray[A](arr: Array[A], start: Int, len: Int): List[A] = { var res: List[A] = Nil var i = start + len @@ -613,7 +613,7 @@ object List extends SeqFactory[List] { * @param separator the separator character * @return the list of substrings */ - @deprecated("use `str.split(separator).toList' instead of `List.fromString(str, separator)'") + @deprecated("use `str.split(separator).toList' instead of `List.fromString(str, separator)'", "2.8.0") def fromString(str: String, separator: Char): List[String] = { var words: List[String] = Nil var pos = str.length() @@ -631,7 +631,7 @@ object List extends SeqFactory[List] { * @param xs the list to convert. * @return the list in form of a string. */ - @deprecated("use `xs.mkString' instead of `List.toString(xs)'") + @deprecated("use `xs.mkString' instead of `List.toString(xs)'", "2.8.0") def toString(xs: List[Char]): String = { val sb = new StringBuilder() var xc = xs @@ -645,7 +645,7 @@ object List extends SeqFactory[List] { /** Like xs map f, but returns `xs` unchanged if function * `f` maps all elements to themselves. */ - @deprecated("use `xs.mapConserve(f)' instead of `List.mapConserve(xs, f)'") + @deprecated("use `xs.mapConserve(f)' instead of `List.mapConserve(xs, f)'", "2.8.0") def mapConserve[A <: AnyRef](xs: List[A])(f: A => A): List[A] = { def loop(ys: List[A]): List[A] = if (ys.isEmpty) xs @@ -679,7 +679,7 @@ object List extends SeqFactory[List] { * `[a0, ..., ak]`, `[b0, ..., bl]` and * `n = min(k,l)` */ - @deprecated("use `(xs, ys).zipped.map(f)' instead of `List.map2(xs, ys)(f)'") + @deprecated("use `(xs, ys).zipped.map(f)' instead of `List.map2(xs, ys)(f)'", "2.8.0") def map2[A,B,C](xs: List[A], ys: List[B])(f: (A, B) => C): List[C] = { val b = new ListBuffer[C] var xc = xs @@ -703,7 +703,7 @@ object List extends SeqFactory[List] { * `[c<sub>0</sub>, ..., c<sub>m</sub>]` and * `n = min(k,l,m)` */ - @deprecated("use `(xs, ys, zs).zipped.map(f)' instead of `List.map3(xs, ys, zs)(f)'") + @deprecated("use `(xs, ys, zs).zipped.map(f)' instead of `List.map3(xs, ys, zs)(f)'", "2.8.0") def map3[A,B,C,D](xs: List[A], ys: List[B], zs: List[C])(f: (A, B, C) => D): List[D] = { val b = new ListBuffer[D] var xc = xs @@ -728,7 +728,7 @@ object List extends SeqFactory[List] { * `[b<sub>0</sub>, ..., b<sub>l</sub>]` * and `n = min(k,l)` */ - @deprecated("use `(xs, ys).zipped.forall(f)' instead of `List.forall2(xs, ys)(f)'") + @deprecated("use `(xs, ys).zipped.forall(f)' instead of `List.forall2(xs, ys)(f)'", "2.8.0") def forall2[A,B](xs: List[A], ys: List[B])(f: (A, B) => Boolean): Boolean = { var xc = xs var yc = ys @@ -750,7 +750,7 @@ object List extends SeqFactory[List] { * `[b<sub>0</sub>, ..., b<sub>l</sub>]` and * `n = min(k,l)` */ - @deprecated("use `(xs, ys).zipped.exists(f)' instead of `List.exists2(xs, ys)(f)'") + @deprecated("use `(xs, ys).zipped.exists(f)' instead of `List.exists2(xs, ys)(f)'", "2.8.0") def exists2[A,B](xs: List[A], ys: List[B])(f: (A, B) => Boolean): Boolean = { var xc = xs var yc = ys @@ -768,7 +768,7 @@ object List extends SeqFactory[List] { * @param xss the list of lists * @return the transposed list of lists */ - @deprecated("use `xss.transpose' instead of `List.transpose(xss)'") + @deprecated("use `xss.transpose' instead of `List.transpose(xss)'", "2.8.0") def transpose[A](xss: List[List[A]]): List[List[A]] = { val buf = new ListBuffer[List[A]] var yss = xss diff --git a/src/library/scala/collection/immutable/Map.scala b/src/library/scala/collection/immutable/Map.scala index bae686bf5b..90bc63af16 100644 --- a/src/library/scala/collection/immutable/Map.scala +++ b/src/library/scala/collection/immutable/Map.scala @@ -93,7 +93,7 @@ object Map extends ImmutableMapFactory[Map] { def - (key: Any): Map[Any, Nothing] = this } - @deprecated("use `Map.empty' instead") + @deprecated("use `Map.empty' instead", "2.8.0") class EmptyMap[A,B] extends Map[A,B] with Serializable { override def size: Int = 0 def get(key: A): Option[B] = None diff --git a/src/library/scala/collection/immutable/Queue.scala b/src/library/scala/collection/immutable/Queue.scala index b9d8e38701..dd93c1435b 100644 --- a/src/library/scala/collection/immutable/Queue.scala +++ b/src/library/scala/collection/immutable/Queue.scala @@ -81,7 +81,7 @@ class Queue[+A] protected(protected val in: List[A], protected val out: List[A]) * * @param elem the element to insert */ - @deprecated("Use the method <code>enqueue</code> from now on.") + @deprecated("Use the method <code>enqueue</code> from now on.", "2.7.2") def +[B >: A](elem: B) = enqueue(elem) /** Creates a new queue with element added at the end @@ -99,7 +99,7 @@ class Queue[+A] protected(protected val in: List[A], protected val out: List[A]) * * @param iter an iterable object */ - @deprecated("Use the method <code>enqueue</code> from now on.") + @deprecated("Use the method <code>enqueue</code> from now on.", "2.7.2") def +[B >: A](iter: Iterable[B]) = enqueue(iter) /** Returns a new queue with all elements provided by @@ -151,6 +151,6 @@ object Queue extends SeqFactory[Queue] { private object EmptyQueue extends Queue[Nothing](Nil, Nil) { } - @deprecated("Use Queue.empty instead") + @deprecated("Use Queue.empty instead", "2.8.0") val Empty: Queue[Nothing] = Queue() } diff --git a/src/library/scala/collection/immutable/RedBlack.scala b/src/library/scala/collection/immutable/RedBlack.scala index c83fd3a21b..4bea8fbaf1 100644 --- a/src/library/scala/collection/immutable/RedBlack.scala +++ b/src/library/scala/collection/immutable/RedBlack.scala @@ -35,11 +35,12 @@ abstract class RedBlack[A] extends Serializable { def delete(k: A): Tree[B] = blacken(del(k)) def range(from: Option[A], until: Option[A]): Tree[B] = blacken(rng(from, until)) def foreach[U](f: (A, B) => U) - @deprecated("use `foreach' instead") + @deprecated("use `foreach' instead", "2.8.0") def visit[T](input: T)(f: (T, A, B) => (Boolean, T)): (Boolean, T) def toStream: Stream[(A,B)] def iterator: Iterator[(A, B)] - @deprecated("use `iterator' instead") def elements = iterator + @deprecated("use `iterator' instead", "2.8.0") + def elements = iterator def upd[B1 >: B](k: A, v: B1): Tree[B1] def del(k: A): Tree[B] def smallest: NonEmpty[B] @@ -164,7 +165,7 @@ abstract class RedBlack[A] extends Serializable { right foreach f } - @deprecated("use `foreach' instead") + @deprecated("use `foreach' instead", "2.8.0") def visit[T](input: T)(f: (T,A,B) => (Boolean, T)): (Boolean, T) = { val left = this.left.visit(input)(f) if (!left._1) return left @@ -280,7 +281,7 @@ abstract class RedBlack[A] extends Serializable { def foreach[U](f: (A, Nothing) => U) {} - @deprecated("use `foreach' instead") + @deprecated("use `foreach' instead", "2.8.0") def visit[T](input: T)(f: (T, A, Nothing) => (Boolean, T)) = (true, input) def rng(from: Option[A], until: Option[A]) = this diff --git a/src/library/scala/collection/immutable/Set.scala b/src/library/scala/collection/immutable/Set.scala index e332902eb8..63c62d9049 100644 --- a/src/library/scala/collection/immutable/Set.scala +++ b/src/library/scala/collection/immutable/Set.scala @@ -58,7 +58,7 @@ object Set extends ImmutableSetFactory[Set] { override def foreach[U](f: Any => U): Unit = {} } - @deprecated("use `Set.empty' instead") + @deprecated("use `Set.empty' instead", "2.8.0") class EmptySet[A] extends Set[A] with Serializable { override def size: Int = 0 def contains(elem: A): Boolean = false diff --git a/src/library/scala/collection/immutable/Stack.scala b/src/library/scala/collection/immutable/Stack.scala index 210022f197..329f12190f 100644 --- a/src/library/scala/collection/immutable/Stack.scala +++ b/src/library/scala/collection/immutable/Stack.scala @@ -23,7 +23,7 @@ object Stack extends SeqFactory[Stack] { implicit def canBuildFrom[A]: CanBuildFrom[Coll, A, Stack[A]] = new GenericCanBuildFrom[A] def newBuilder[A]: Builder[A, Stack[A]] = new ArrayBuffer[A] mapResult (buf => new Stack(buf.toList)) - @deprecated("Use Stack.empty instead") + @deprecated("Use Stack.empty instead", "2.8.0") val Empty: Stack[Nothing] = Stack() } diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index 7c362571c4..b6145ecaf0 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -600,7 +600,8 @@ object Stream extends SeqFactory[Stream] { else Some((xs.head, xs.tail)) } - @deprecated("use #:: instead") lazy val lazy_:: = #:: + @deprecated("use #:: instead", "2.8.0") + lazy val lazy_:: = #:: /** An alternative way of building and matching Streams using Stream.cons(hd, tl). */ @@ -701,17 +702,17 @@ object Stream extends SeqFactory[Stream] { /** A stream containing all elements of a given iterator, in the order they are produced. * @param it The iterator producing the stream's elements */ - @deprecated("use it.toStream instead") + @deprecated("use it.toStream instead", "2.8.0") def fromIterator[A](it: Iterator[A]): Stream[A] = it.toStream /** The concatenation of a sequence of streams */ - @deprecated("use xs.flatten instead") + @deprecated("use xs.flatten instead", "2.8.0") def concat[A](xs: Iterable[Stream[A]]): Stream[A] = concat(xs.iterator) /** The concatenation of all streams returned by an iterator */ - @deprecated("use xs.toStream.flatten instead") + @deprecated("use xs.toStream.flatten instead", "2.8.0") def concat[A](xs: Iterator[Stream[A]]): Stream[A] = xs.toStream.flatten //(conforms[Stream[A], scala.collection.Traversable[A]]) /** @@ -725,7 +726,7 @@ object Stream extends SeqFactory[Stream] { * @param step the increment function of the stream, must be monotonically increasing or decreasing * @return the stream starting at value <code>start</code>. */ - @deprecated("use `iterate' instead.") + @deprecated("use `iterate' instead.", "2.8.0") def range(start: Int, end: Int, step: Int => Int): Stream[Int] = iterate(start, end - start)(step) @@ -735,7 +736,7 @@ object Stream extends SeqFactory[Stream] { * @param elem the element composing the resulting stream * @return the stream containing an infinite number of elem */ - @deprecated("use `continually' instead") + @deprecated("use `continually' instead", "2.8.0") def const[A](elem: A): Stream[A] = cons(elem, const(elem)) /** Create a stream containing several copies of an element. @@ -744,7 +745,7 @@ object Stream extends SeqFactory[Stream] { * @param elem the element composing the resulting stream * @return the stream composed of n elements all equal to elem */ - @deprecated("use fill(n, elem) instead") + @deprecated("use fill(n, elem) instead", "2.8.0") def make[A](n: Int, elem: A): Stream[A] = fill(n)(elem) } diff --git a/src/library/scala/collection/immutable/Vector.scala b/src/library/scala/collection/immutable/Vector.scala index 62f9e1dac7..7a4a9bb18a 100644 --- a/src/library/scala/collection/immutable/Vector.scala +++ b/src/library/scala/collection/immutable/Vector.scala @@ -89,9 +89,9 @@ override def companion: GenericCompanion[Vector] = Vector // In principle, escape analysis could even remove the iterator/builder allocations and do it // with local variables exclusively. But we're not quite there yet ... - @deprecated("this method is experimental and will be removed in a future release") + @deprecated("this method is experimental and will be removed in a future release", "2.8.0") @inline def foreachFast[U](f: A => U): Unit = iterator.foreachFast(f) - @deprecated("this method is experimental and will be removed in a future release") + @deprecated("this method is experimental and will be removed in a future release", "2.8.0") @inline def mapFast[B, That](f: A => B)(implicit bf: CanBuildFrom[Vector[A], B, That]): That = { val b = bf(repr) foreachFast(x => b += f(x)) @@ -663,7 +663,7 @@ class VectorIterator[+A](_startIndex: Int, _endIndex: Int) extends Iterator[A] w v } - @deprecated("this method is experimental and will be removed in a future release") + @deprecated("this method is experimental and will be removed in a future release", "2.8.0") @inline def foreachFast[U](f: A => U) { while (hasNext) f(next()) } } diff --git a/src/library/scala/collection/mutable/AddingBuilder.scala b/src/library/scala/collection/mutable/AddingBuilder.scala index 4a06d33ca3..6f198b81ad 100644 --- a/src/library/scala/collection/mutable/AddingBuilder.scala +++ b/src/library/scala/collection/mutable/AddingBuilder.scala @@ -27,7 +27,7 @@ import generic._ * @version 2.8 * @since 2.8 */ -@deprecated("Will be removed after scala 2.9") +@deprecated("Will be removed after scala 2.9", "2.8.0") class AddingBuilder[Elem, To <: Addable[Elem, To] with collection.Iterable[Elem] with collection.IterableLike[Elem, To]](empty: To) extends Builder[Elem, To] { protected var elems: To = empty diff --git a/src/library/scala/collection/mutable/ArrayLike.scala b/src/library/scala/collection/mutable/ArrayLike.scala index 8d28d2bc28..bae6bd1164 100644 --- a/src/library/scala/collection/mutable/ArrayLike.scala +++ b/src/library/scala/collection/mutable/ArrayLike.scala @@ -47,19 +47,19 @@ trait ArrayLike[A, +Repr] extends IndexedSeqOptimized[A, Repr] { self => override def stringPrefix = "Array" } - @deprecated("use deep.toString instead") + @deprecated("use deep.toString instead", "2.8.0") final def deepToString() = deep.toString - @deprecated("use deep.mkString instead") + @deprecated("use deep.mkString instead", "2.8.0") final def deepMkString(start: String, sep: String, end: String): String = deep.mkString(start, sep, end) - @deprecated("use deep.mkString instead") + @deprecated("use deep.mkString instead", "2.8.0") final def deepMkString(sep: String): String = deepMkString("", sep, "") - @deprecated("use array1.deep.equals(array2.deep) instead") + @deprecated("use array1.deep.equals(array2.deep) instead", "2.8.0") final def deepEquals(that: Any): Boolean = that match { case x: AnyRef if x.getClass.isArray => deep.equals(WrappedArray.make(x).deep) case _ => false diff --git a/src/library/scala/collection/mutable/ArrayStack.scala b/src/library/scala/collection/mutable/ArrayStack.scala index 13f709ba39..2323830b7b 100644 --- a/src/library/scala/collection/mutable/ArrayStack.scala +++ b/src/library/scala/collection/mutable/ArrayStack.scala @@ -122,7 +122,7 @@ extends Seq[T] } /** View the top element of the stack. */ - @deprecated("use top instead") + @deprecated("use top instead", "2.8.0") def peek = top /** View the top element of the stack. diff --git a/src/library/scala/collection/mutable/BufferLike.scala b/src/library/scala/collection/mutable/BufferLike.scala index 9a641c452e..3c9e336e6f 100644 --- a/src/library/scala/collection/mutable/BufferLike.scala +++ b/src/library/scala/collection/mutable/BufferLike.scala @@ -220,7 +220,7 @@ trait BufferLike[A, +This <: BufferLike[A, This] with Buffer[A]] * @param start the first element to append * @param len the number of elements to append */ - @deprecated("replace by: `buf ++= src.view(start, end)`") + @deprecated("replace by: `buf ++= src.view(start, end)`", "2.8.0") def ++=(src: Array[A], start: Int, len: Int) { var i = start val end = i + len @@ -239,7 +239,7 @@ trait BufferLike[A, +This <: BufferLike[A, This] with Buffer[A]] * @param elem the element to add. */ @deprecated("Use += instead if you intend to add by side effect to an existing collection.\n"+ - "Use `clone() +=' if you intend to create a new collection.") + "Use `clone() +=' if you intend to create a new collection.", "2.8.0") def + (elem: A): This = { +=(elem); repr } /** Adds two or more elements to this collection and returns @@ -253,7 +253,7 @@ trait BufferLike[A, +This <: BufferLike[A, This] with Buffer[A]] * @param elems the remaining elements to add. */ @deprecated("Use ++= instead if you intend to add by side effect to an existing collection.\n"+ - "Use `clone() ++=' if you intend to create a new collection.") + "Use `clone() ++=' if you intend to create a new collection.", "2.8.0") def + (elem1: A, elem2: A, elems: A*): This = { this += elem1 += elem2 ++= elems repr diff --git a/src/library/scala/collection/mutable/BufferProxy.scala b/src/library/scala/collection/mutable/BufferProxy.scala index 22ba9989eb..03102f73d2 100644 --- a/src/library/scala/collection/mutable/BufferProxy.scala +++ b/src/library/scala/collection/mutable/BufferProxy.scala @@ -45,7 +45,7 @@ trait BufferProxy[A] extends Buffer[A] with Proxy { * @return the updated buffer. */ @deprecated("Use += instead if you intend to add by side effect to an existing collection.\n"+ - "Use `clone() ++=' if you intend to create a new collection.") + "Use `clone() ++=' if you intend to create a new collection.", "2.8.0") override def +(elem: A): Buffer[A] = self.+(elem) /** Append a single element to this buffer. @@ -64,7 +64,7 @@ trait BufferProxy[A] extends Buffer[A] with Proxy { * @return the updated buffer. */ @deprecated("Use ++= instead if you intend to add by side effect to an existing collection.\n"+ - "Use `clone() ++=` if you intend to create a new collection.") + "Use `clone() ++=` if you intend to create a new collection.", "2.8.0") override def ++(xs: GenTraversableOnce[A]): Buffer[A] = self.++(xs) /** Appends a number of elements provided by a traversable object. diff --git a/src/library/scala/collection/mutable/HashTable.scala b/src/library/scala/collection/mutable/HashTable.scala index b8409ab3bd..dea1ec7d44 100644 --- a/src/library/scala/collection/mutable/HashTable.scala +++ b/src/library/scala/collection/mutable/HashTable.scala @@ -190,7 +190,7 @@ trait HashTable[A, Entry >: Null <: HashEntry[A, Entry]] extends HashTable.HashU protected final def foreachEntry[C](f: Entry => C) { entriesIterator.foreach(f) } /** An iterator returning all entries */ - @deprecated("use entriesIterator instead") + @deprecated("use entriesIterator instead", "2.8.0") protected def entries: Iterator[Entry] = entriesIterator /** Remove all entries from table diff --git a/src/library/scala/collection/mutable/ImmutableMapAdaptor.scala b/src/library/scala/collection/mutable/ImmutableMapAdaptor.scala index b5e003dcfb..d541ad8f52 100644 --- a/src/library/scala/collection/mutable/ImmutableMapAdaptor.scala +++ b/src/library/scala/collection/mutable/ImmutableMapAdaptor.scala @@ -54,7 +54,7 @@ extends Map[A, B] with Serializable def iterator: Iterator[(A, B)] = imap.iterator - @deprecated("use `iterator' instead") + @deprecated("use `iterator' instead", "2.8.0") override def elements = iterator override def toList: List[(A, B)] = imap.toList diff --git a/src/library/scala/collection/mutable/ImmutableSetAdaptor.scala b/src/library/scala/collection/mutable/ImmutableSetAdaptor.scala index 393a622ced..0975b33dd0 100644 --- a/src/library/scala/collection/mutable/ImmutableSetAdaptor.scala +++ b/src/library/scala/collection/mutable/ImmutableSetAdaptor.scala @@ -40,7 +40,8 @@ class ImmutableSetAdaptor[A](protected var set: immutable.Set[A]) extends Set[A] def iterator: Iterator[A] = set.iterator - @deprecated("use `iterator' instead") override def elements: Iterator[A] = iterator + @deprecated("use `iterator' instead", "2.8.0") + override def elements: Iterator[A] = iterator def +=(elem: A): this.type = { set = set + elem; this } diff --git a/src/library/scala/collection/mutable/MapLike.scala b/src/library/scala/collection/mutable/MapLike.scala index 5fe1abb260..e737bf5509 100644 --- a/src/library/scala/collection/mutable/MapLike.scala +++ b/src/library/scala/collection/mutable/MapLike.scala @@ -162,7 +162,8 @@ trait MapLike[A, B, +This <: MapLike[A, B, This] with Map[A, B]] * If key is not present return None. * @param key the key to be removed */ - @deprecated("Use `remove' instead") def removeKey(key: A): Option[B] = remove(key) + @deprecated("Use `remove' instead", "2.8.0") + def removeKey(key: A): Option[B] = remove(key) /** Removes all bindings from the map. After this operation has completed, * the map will be empty. diff --git a/src/library/scala/collection/mutable/MultiMap.scala b/src/library/scala/collection/mutable/MultiMap.scala index fc75ae91d4..128ec0ff10 100644 --- a/src/library/scala/collection/mutable/MultiMap.scala +++ b/src/library/scala/collection/mutable/MultiMap.scala @@ -36,7 +36,7 @@ trait MultiMap[A, B] extends Map[A, Set[B]] { */ protected def makeSet: Set[B] = new HashSet[B] - @deprecated("use addBinding instead") + @deprecated("use addBinding instead", "2.8.0") def add(key: A, value: B): this.type = addBinding(key, value) /** Assigns the specified `value` to a specified `key`, replacing diff --git a/src/library/scala/collection/mutable/MutableList.scala b/src/library/scala/collection/mutable/MutableList.scala index 86b0da39f1..fb724339e3 100644 --- a/src/library/scala/collection/mutable/MutableList.scala +++ b/src/library/scala/collection/mutable/MutableList.scala @@ -104,7 +104,7 @@ extends LinearSeq[A] len = len + 1 } - @deprecated("use clear instead") + @deprecated("use clear() instead", "2.8.0") def reset() { clear() } /** Returns an iterator over all elements of this list. diff --git a/src/library/scala/collection/mutable/PriorityQueue.scala b/src/library/scala/collection/mutable/PriorityQueue.scala index 8eb72fada7..59648f160c 100644 --- a/src/library/scala/collection/mutable/PriorityQueue.scala +++ b/src/library/scala/collection/mutable/PriorityQueue.scala @@ -93,7 +93,7 @@ class PriorityQueue[A](implicit val ord: Ordering[A]) @deprecated( "Use += instead if you intend to add by side effect to an existing collection.\n"+ - "Use `clone() +=' if you intend to create a new collection." + "Use `clone() +=' if you intend to create a new collection.", "2.8.0" ) def +(elem: A): PriorityQueue[A] = { this.clone() += elem } @@ -104,7 +104,7 @@ class PriorityQueue[A](implicit val ord: Ordering[A]) */ @deprecated( "Use ++= instead if you intend to add by side effect to an existing collection.\n"+ - "Use `clone() ++=' if you intend to create a new collection." + "Use `clone() ++=' if you intend to create a new collection.", "2.8.0" ) def +(elem1: A, elem2: A, elems: A*) = { this.clone().+=(elem1, elem2, elems : _*) } @@ -163,7 +163,7 @@ class PriorityQueue[A](implicit val ord: Ordering[A]) * * @return the element with the highest priority. */ - @deprecated("Use `head` instead.") + @deprecated("Use `head` instead.", "2.9.0") def max: A = if (resarr.p_size0 > 1) toA(resarr.p_array(1)) else throw new NoSuchElementException("queue is empty") /** Returns the element with the highest priority in the queue, diff --git a/src/library/scala/collection/mutable/PriorityQueueProxy.scala b/src/library/scala/collection/mutable/PriorityQueueProxy.scala index 912786359a..70b9e82387 100644 --- a/src/library/scala/collection/mutable/PriorityQueueProxy.scala +++ b/src/library/scala/collection/mutable/PriorityQueueProxy.scala @@ -80,7 +80,7 @@ abstract class PriorityQueueProxy[A](implicit ord: Ordering[A]) extends Priority * * @return the element with the highest priority. */ - @deprecated("Use `head` instead.") + @deprecated("Use `head` instead.", "2.9.0") override def max: A = self.max /** Removes all elements from the queue. After this operation is completed, diff --git a/src/library/scala/collection/mutable/Stack.scala b/src/library/scala/collection/mutable/Stack.scala index 0d1746b33b..89a02ad2ab 100644 --- a/src/library/scala/collection/mutable/Stack.scala +++ b/src/library/scala/collection/mutable/Stack.scala @@ -123,7 +123,7 @@ extends Seq[A] */ def pushAll(xs: TraversableOnce[A]): this.type = { xs.seq foreach push ; this } - @deprecated("use pushAll") + @deprecated("use pushAll", "2.8.0") @migration(2, 8, "Stack ++= now pushes arguments on the stack from left to right.") def ++=(xs: TraversableOnce[A]): this.type = pushAll(xs) diff --git a/src/library/scala/collection/mutable/StackProxy.scala b/src/library/scala/collection/mutable/StackProxy.scala index 245a9dd6f0..5dd5592096 100644 --- a/src/library/scala/collection/mutable/StackProxy.scala +++ b/src/library/scala/collection/mutable/StackProxy.scala @@ -58,7 +58,8 @@ trait StackProxy[A] extends Stack[A] with Proxy { * * @param iter an iterable object */ - @deprecated("use pushAll") override def ++=(xs: TraversableOnce[A]): this.type = { self ++= xs ; this } + @deprecated("use pushAll", "2.8.0") + override def ++=(xs: TraversableOnce[A]): this.type = { self ++= xs ; this } override def push(elem1: A, elem2: A, elems: A*): this.type = { diff --git a/src/library/scala/collection/mutable/StringBuilder.scala b/src/library/scala/collection/mutable/StringBuilder.scala index 925a9fd9da..edd59a8221 100644 --- a/src/library/scala/collection/mutable/StringBuilder.scala +++ b/src/library/scala/collection/mutable/StringBuilder.scala @@ -90,7 +90,7 @@ final class StringBuilder(private val underlying: JavaStringBuilder) def capacity: Int = underlying.capacity() @deprecated("Use `ensureCapacity' instead. An assignment is misleading because\n"+ - "it can never decrease the capacity.") + "it can never decrease the capacity.", "2.8.0") def capacity_=(n: Int) { ensureCapacity(n) } /** Ensure that the capacity is at least the given argument. @@ -356,28 +356,28 @@ final class StringBuilder(private val underlying: JavaStringBuilder) def insert(index: Int, x: Char): StringBuilder = insert(index, String.valueOf(x)) @deprecated("Use appendAll instead. This method is deprecated because of the\n"+ - "possible confusion with `append(Any)'.") + "possible confusion with `append(Any)'.", "2.8.0") def append(x: Seq[Char]): StringBuilder = appendAll(x) @deprecated("use appendAll instead. This method is deprecated because\n"+ - "of the possible confusion with `append(Any)'.") + "of the possible confusion with `append(Any)'.", "2.8.0") def append(x: Array[Char]): StringBuilder = appendAll(x) @deprecated("use appendAll instead. This method is deprecated because\n"+ - "of the possible confusion with `append(Any, Int, Int)'.") + "of the possible confusion with `append(Any, Int, Int)'.", "2.8.0") def append(x: Array[Char], offset: Int, len: Int): StringBuilder = appendAll(x, offset, len) @deprecated("use insertAll instead. This method is deprecated because of the\n"+ - "possible confusion with `insert(Int, Any, Int, Int)'.") + "possible confusion with `insert(Int, Any, Int, Int)'.", "2.8.0") def insert(index: Int, str: Array[Char], offset: Int, len: Int): StringBuilder = insertAll(index, str, offset, len) @deprecated("use insertAll instead. This method is deprecated because of\n"+ - "the possible confusion with `insert(Int, Any)'.") + "the possible confusion with `insert(Int, Any)'.", "2.8.0") def insert(at: Int, x: Seq[Char]): StringBuilder = insertAll(at, x) @deprecated("use insertAll instead. This method is deprecated because of\n"+ - "the possible confusion with `insert(Int, Any)'.") + "the possible confusion with `insert(Int, Any)'.", "2.8.0") def insert(at: Int, x: Array[Char]): StringBuilder = insertAll(at, x) /** Finds the index of the first occurrence of the specified substring. diff --git a/src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala b/src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala index 523f5154e0..159b8312b2 100644 --- a/src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala +++ b/src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala @@ -78,7 +78,7 @@ class SynchronizedPriorityQueue[A](implicit ord: Ordering[A]) extends PriorityQu * * @return the element with the highest priority. */ - @deprecated("Use `head` instead.") + @deprecated("Use `head` instead.", "2.9.0") override def max: A = synchronized { super.max } /** Removes all elements from the queue. After this operation is completed, diff --git a/src/library/scala/concurrent/MailBox.scala b/src/library/scala/concurrent/MailBox.scala index d9a8746ba3..b00ab79919 100644 --- a/src/library/scala/concurrent/MailBox.scala +++ b/src/library/scala/concurrent/MailBox.scala @@ -16,7 +16,7 @@ package scala.concurrent * @version 1.0, 12/03/2003 */ //class MailBox with Monitor with LinkedListQueueCreator { -@deprecated("use actors instead") +@deprecated("use actors instead", "2.8.0") class MailBox extends AnyRef with ListQueueCreator { type Message = AnyRef @@ -108,7 +108,7 @@ class MailBox extends AnyRef with ListQueueCreator { /** * Module for dealing with queues. */ -@deprecated("use actors instead") +@deprecated("use actors instead", "2.8.0") trait QueueModule[A] { /** Type of queues. */ type T @@ -121,7 +121,7 @@ trait QueueModule[A] { } /** Inefficient but simple queue module creator. */ -@deprecated("use actors instead") +@deprecated("use actors instead", "2.8.0") trait ListQueueCreator { def queueCreate[A]: QueueModule[A] = new QueueModule[A] { type T = List[A] @@ -143,7 +143,7 @@ trait ListQueueCreator { } /** Efficient queue module creator based on linked lists. */ -@deprecated("use actors instead") +@deprecated("use actors instead", "2.8.0") trait LinkedListQueueCreator { import scala.collection.mutable.LinkedList def queueCreate[A >: Null <: AnyRef]: QueueModule[A] = new QueueModule[A] { diff --git a/src/library/scala/concurrent/TIMEOUT.scala b/src/library/scala/concurrent/TIMEOUT.scala index 512879760b..54d7db853c 100644 --- a/src/library/scala/concurrent/TIMEOUT.scala +++ b/src/library/scala/concurrent/TIMEOUT.scala @@ -17,5 +17,5 @@ package scala.concurrent * @author Martin Odersky * @version 1.0, 10/03/2003 */ -@deprecated("use actors instead") +@deprecated("use actors instead", "2.8.0") case object TIMEOUT diff --git a/src/library/scala/concurrent/ops.scala b/src/library/scala/concurrent/ops.scala index 5542472ce1..9498a62f32 100644 --- a/src/library/scala/concurrent/ops.scala +++ b/src/library/scala/concurrent/ops.scala @@ -68,7 +68,7 @@ object ops * @param end ... * @param p ... */ - @deprecated("use `collection.parallel.ParIterable.foreach' instead") + @deprecated("use `collection.parallel.ParIterable.foreach' instead", "2.9.0") def replicate(start: Int, end: Int)(p: Int => Unit)(implicit runner: TaskRunner = defaultRunner) { if (start == end) () diff --git a/src/library/scala/concurrent/pilib.scala b/src/library/scala/concurrent/pilib.scala index a81df2d622..cad8aecf86 100644 --- a/src/library/scala/concurrent/pilib.scala +++ b/src/library/scala/concurrent/pilib.scala @@ -29,7 +29,7 @@ package scala.concurrent * @author Vincent Cremet, Martin Odersky * @version 1.0 */ -@deprecated("use actors instead") +@deprecated("use actors instead", "2.8.0") object pilib { import TaskRunners.threadRunner diff --git a/src/library/scala/deprecated.scala b/src/library/scala/deprecated.scala index 0f5ec16af0..8b93a35075 100644 --- a/src/library/scala/deprecated.scala +++ b/src/library/scala/deprecated.scala @@ -19,6 +19,4 @@ import annotation.target._ * @since 2.3 */ @getter @setter @beanGetter @beanSetter -class deprecated(message: String) extends annotation.StaticAnnotation { - def this() = this("") -} +class deprecated(message: String = "", since: String = null) extends annotation.StaticAnnotation diff --git a/src/library/scala/io/Position.scala b/src/library/scala/io/Position.scala index 3cc7a481f3..5b6accfea3 100644 --- a/src/library/scala/io/Position.scala +++ b/src/library/scala/io/Position.scala @@ -66,9 +66,12 @@ abstract class Position { object Position extends Position { /** The undefined position */ - @deprecated("This will be removed") final val NOPOS = 0 + @deprecated("This will be removed", "2.9.0") + final val NOPOS = 0 + /** The first position in a source file */ - @deprecated("This will be removed") final val FIRSTPOS = encode(1, 1) + @deprecated("This will be removed", "2.9.0") + final val FIRSTPOS = encode(1, 1) def checkInput(line: Int, column: Int) { if (line < 0) diff --git a/src/library/scala/io/Source.scala b/src/library/scala/io/Source.scala index c81f2bfed0..103be17228 100644 --- a/src/library/scala/io/Source.scala +++ b/src/library/scala/io/Source.scala @@ -196,7 +196,7 @@ abstract class Source extends Iterator[Char] { * @return the specified line. * */ - @deprecated("Use a collections method such as getLines().toIndexedSeq for random access.") + @deprecated("Use a collections method such as getLines().toIndexedSeq for random access.", "2.8.0") def getLine(line: Int): String = lineNum(line) private def lineNum(line: Int): String = getLines() drop (line - 1) take 1 mkString diff --git a/src/library/scala/io/UTF8Codec.scala b/src/library/scala/io/UTF8Codec.scala index 389d4bd719..72a1dafc32 100644 --- a/src/library/scala/io/UTF8Codec.scala +++ b/src/library/scala/io/UTF8Codec.scala @@ -30,35 +30,35 @@ object UTF8Codec // Some useful locations: // http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt - @deprecated("""Use new String(Array(ch), 0, 1).getBytes("UTF-8") instead""") + @deprecated("""Use new String(Array(ch), 0, 1).getBytes("UTF-8") instead""", "2.8.0") def encode(ch: Int): Array[Byte] = if ((Character getType ch) == Character.SURROGATE.toInt) UNI_REPLACEMENT_BYTES else try new String(Array(ch), 0, 1) getBytes "UTF-8" catch { case _: IllegalArgumentException => UNI_REPLACEMENT_BYTES } - @deprecated("Use Codec.toUTF8 instead") + @deprecated("Use Codec.toUTF8 instead", "2.8.0") def encode(src: Array[Char], from: Int, dst: Array[Byte], to: Int, len: Int): Int = { val bytes = Codec toUTF8 src.slice(from, from + len) Array.copy(bytes, 0, dst, to, bytes.length) bytes.length } - @deprecated("Use Codec.toUTF8 instead") + @deprecated("Use Codec.toUTF8 instead", "2.8.0") def encode(s: String, dst: Array[Byte], to: Int): Int = encode(s.toArray, 0, dst, to, s.length) - @deprecated("Use Codec.toUTF8 instead") + @deprecated("Use Codec.toUTF8 instead", "2.8.0") def encode(s: String): Array[Byte] = Codec toUTF8 s - @deprecated("Use Codec.fromUTF8 instead") + @deprecated("Use Codec.fromUTF8 instead", "2.8.0") def decode(src: Array[Byte], from: Int, dst: Array[Char], to: Int, len: Int): Int = { val chars = Codec fromUTF8 src.slice(from, from + len) Array.copy(chars, 0, dst, to, chars.length) chars.length } - @deprecated("Use Codec.fromUTF8 instead") + @deprecated("Use Codec.fromUTF8 instead", "2.8.0") def decode(src: Array[Byte], from: Int, len: Int): String = Codec fromUTF8 src.slice(from, from + len) mkString } diff --git a/src/library/scala/math/BigDecimal.scala b/src/library/scala/math/BigDecimal.scala index 684769bef1..16fdf0897e 100644 --- a/src/library/scala/math/BigDecimal.scala +++ b/src/library/scala/math/BigDecimal.scala @@ -25,10 +25,10 @@ object BigDecimal { private val maxCached = 512 val defaultMathContext = MathContext.DECIMAL128 - @deprecated("Use Long.MinValue") + @deprecated("Use Long.MinValue", "2.9.0") val MinLong = new BigDecimal(BigDec valueOf Long.MinValue, defaultMathContext) - @deprecated("Use Long.MaxValue") + @deprecated("Use Long.MaxValue", "2.9.0") val MaxLong = new BigDecimal(BigDec valueOf Long.MaxValue, defaultMathContext) /** Cache ony for defaultMathContext using BigDecimals in a small range. */ diff --git a/src/library/scala/math/BigInt.scala b/src/library/scala/math/BigInt.scala index 71d6df9e6e..caffbe6133 100644 --- a/src/library/scala/math/BigInt.scala +++ b/src/library/scala/math/BigInt.scala @@ -23,10 +23,10 @@ object BigInt { private val maxCached = 1024 private val cache = new Array[BigInt](maxCached - minCached + 1) - @deprecated("Use Long.MinValue") + @deprecated("Use Long.MinValue", "2.9.0") val MinLong = BigInt(Long.MinValue) - @deprecated("Use Long.MaxValue") + @deprecated("Use Long.MaxValue", "2.9.0") val MaxLong = BigInt(Long.MaxValue) /** Constructs a <code>BigInt</code> whose value is equal to that of the diff --git a/src/library/scala/package.scala b/src/library/scala/package.scala index 23bd6bb6e7..788684182a 100644 --- a/src/library/scala/package.scala +++ b/src/library/scala/package.scala @@ -28,7 +28,7 @@ package object scala { type NumberFormatException = java.lang.NumberFormatException type AbstractMethodError = java.lang.AbstractMethodError - @deprecated("instead of `@serializable class C`, use `class C extends Serializable`") + @deprecated("instead of `@serializable class C`, use `class C extends Serializable`", "2.9") type serializable = annotation.serializable type TraversableOnce[+A] = scala.collection.TraversableOnce[A] @@ -75,7 +75,7 @@ package object scala { val $scope = scala.xml.TopScope - @deprecated("Use Thread.currentThread instead") + @deprecated("Use Thread.currentThread instead", "2.9") def currentThread = java.lang.Thread.currentThread() // Numeric types which were moved into scala.math.* @@ -121,67 +121,77 @@ package object scala { type unchecked = annotation.unchecked.unchecked type volatile = annotation.volatile */ - @deprecated("Use Tuple1(x) to create a 1-tuple.") + @deprecated("Use Tuple1(x) to create a 1-tuple.", "2.8.0") def Tuple[A1](x1: A1) = Tuple1(x1) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2](x1: A1, x2: A2) = Tuple2(x1, x2) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3](x1: A1, x2: A2, x3: A3) = Tuple3(x1, x2, x3) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4](x1: A1, x2: A2, x3: A3, x4: A4) = Tuple4(x1, x2, x3, x4) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5) = Tuple5(x1, x2, x3, x4, x5) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6) = Tuple6(x1, x2, x3, x4, x5, x6) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7) = Tuple7(x1, x2, x3, x4, x5, x6, x7) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8) = Tuple8(x1, x2, x3, x4, x5, x6, x7, x8) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9) = Tuple9(x1, x2, x3, x4, x5, x6, x7, x8, x9) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10) = Tuple10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11) = Tuple11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12) = Tuple12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13) = Tuple13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14) = Tuple14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15) = Tuple15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15, x16: A16) = Tuple16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15, x16: A16, x17: A17) = Tuple17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15, x16: A16, x17: A17, x18: A18) = Tuple18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15, x16: A16, x17: A17, x18: A18, x19: A19) = Tuple19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15, x16: A16, x17: A17, x18: A18, x19: A19, x20: A20) = Tuple20(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15, x16: A16, x17: A17, x18: A18, x19: A19, x20: A20, x21: A21) = Tuple21(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) - @deprecated("Use ((x1, x2, ...)) syntax to create Tuples") + @deprecated("Use ((x1, x2, ...)) syntax to create Tuples", "2.8.0") def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9, x10: A10, x11: A11, x12: A12, x13: A13, x14: A14, x15: A15, x16: A16, x17: A17, x18: A18, x19: A19, x20: A20, x21: A21, x22: A22) = Tuple22(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) - @deprecated("use java.lang.Integer instead") + @deprecated("use java.lang.Integer instead", "2.6.0") type Integer = java.lang.Integer - @deprecated("use java.lang.Character instead") + @deprecated("use java.lang.Character instead", "2.6.0") type Character = java.lang.Character - @deprecated("use Iterable instead") type Collection[+A] = Iterable[A] - @deprecated("use Iterable instead") val Collection = Iterable - - @deprecated("use Seq instead") type Sequence[+A] = scala.collection.Seq[A] - @deprecated("use Seq instead") val Sequence = scala.collection.Seq - - @deprecated("use IndexedSeq instead") type RandomAccessSeq[+A] = scala.collection.IndexedSeq[A] - @deprecated("use IndexedSeq instead") val RandomAccessSeq = scala.collection.IndexedSeq - - @deprecated("use scala.annotation.Annotation instead") type Annotation = scala.annotation.Annotation - @deprecated("use scala.annotation.ClassfileAnnotation instead") type ClassfileAnnotation = scala.annotation.ClassfileAnnotation - @deprecated("use scala.annotation.StaticAnnotation instead") type StaticAnnotation = scala.annotation.StaticAnnotation - @deprecated("use scala.annotation.TypeConstraint instead") type TypeConstraint = scala.annotation.TypeConstraint + @deprecated("use Iterable instead", "2.8.0") + type Collection[+A] = Iterable[A] + @deprecated("use Iterable instead", "2.8.0") + val Collection = Iterable + + @deprecated("use Seq instead", "2.8.0") + type Sequence[+A] = scala.collection.Seq[A] + @deprecated("use Seq instead", "2.8.0") + val Sequence = scala.collection.Seq + + @deprecated("use IndexedSeq instead", "2.8.0") + type RandomAccessSeq[+A] = scala.collection.IndexedSeq[A] + @deprecated("use IndexedSeq instead", "2.8.0") + val RandomAccessSeq = scala.collection.IndexedSeq + + @deprecated("use scala.annotation.Annotation instead", "2.9") + type Annotation = scala.annotation.Annotation + @deprecated("use scala.annotation.ClassfileAnnotation instead", "2.9") + type ClassfileAnnotation = scala.annotation.ClassfileAnnotation + @deprecated("use scala.annotation.StaticAnnotation instead", "2.9") + type StaticAnnotation = scala.annotation.StaticAnnotation + @deprecated("use scala.annotation.TypeConstraint instead", "2.9") + type TypeConstraint = scala.annotation.TypeConstraint } diff --git a/src/library/scala/reflect/generic/ByteCodecs.scala b/src/library/scala/reflect/generic/ByteCodecs.scala index 2fa314782c..ae15e2941b 100644 --- a/src/library/scala/reflect/generic/ByteCodecs.scala +++ b/src/library/scala/reflect/generic/ByteCodecs.scala @@ -119,7 +119,7 @@ object ByteCodecs { dst } - @deprecated("use 2-argument version instead") + @deprecated("use 2-argument version instead", "2.8.0") def decode7to8(src: Array[Byte], srclen: Int, dstlen: Int) { decode7to8(src, srclen) } def decode7to8(src: Array[Byte], srclen: Int): Int = { @@ -190,7 +190,7 @@ object ByteCodecs { def encode(xs: Array[Byte]): Array[Byte] = avoidZero(encode8to7(xs)) - @deprecated("use 1-argument version instead") + @deprecated("use 1-argument version instead", "2.8.0") def decode(xs: Array[Byte], dstlen: Int) { decode(xs) } /** diff --git a/src/library/scala/reflect/generic/HasFlags.scala b/src/library/scala/reflect/generic/HasFlags.scala index 2f635fbd79..ca8e2ede86 100644 --- a/src/library/scala/reflect/generic/HasFlags.scala +++ b/src/library/scala/reflect/generic/HasFlags.scala @@ -211,7 +211,8 @@ trait HasFlags { // Keeping some potentially ambiguous names around so as not to break // the rest of the world - @deprecated("") def isAbstract = hasFlag(ABSTRACT) + @deprecated("", "2.9.0") + def isAbstract = hasFlag(ABSTRACT) // Problematic: // ABSTRACT and DEFERRED too easy to confuse, and // ABSTRACT + OVERRIDE ==> ABSOVERRIDE adds to it. diff --git a/src/library/scala/runtime/AnyValCompanion.scala b/src/library/scala/runtime/AnyValCompanion.scala index 5f6f581f50..fdb0e8f638 100644 --- a/src/library/scala/runtime/AnyValCompanion.scala +++ b/src/library/scala/runtime/AnyValCompanion.scala @@ -10,5 +10,5 @@ package scala.runtime /** See scala.AnyValCompanion. */ -@deprecated("Use scala.AnyValCompanion instead") +@deprecated("Use scala.AnyValCompanion instead", "2.8.0") private[scala] trait AnyValCompanion extends scala.AnyValCompanion { }
\ No newline at end of file diff --git a/src/library/scala/runtime/RichChar.scala b/src/library/scala/runtime/RichChar.scala index b9f536de9a..358faf47f5 100644 --- a/src/library/scala/runtime/RichChar.scala +++ b/src/library/scala/runtime/RichChar.scala @@ -46,13 +46,13 @@ final class RichChar(val self: Char) extends IntegralProxy[Char] { // public static boolean isJavaIdentifierStart(char ch) // public static boolean isJavaIdentifierPart(char ch) - @deprecated("Use ch.toLower instead") + @deprecated("Use ch.toLower instead", "2.8.0") def toLowerCase: Char = toLower - @deprecated("Use ch.toUpper instead") + @deprecated("Use ch.toUpper instead", "2.8.0") def toUpperCase: Char = toUpper - @deprecated("Use ch.isLower instead") + @deprecated("Use ch.isLower instead", "2.8.0") def isLowerCase: Boolean = isLower - @deprecated("Use ch.isUpper instead") + @deprecated("Use ch.isUpper instead", "2.8.0") def isUpperCase: Boolean = isUpper } diff --git a/src/library/scala/runtime/package.scala b/src/library/scala/runtime/package.scala index 83947cce9f..9c87baf6a7 100644 --- a/src/library/scala/runtime/package.scala +++ b/src/library/scala/runtime/package.scala @@ -1,13 +1,13 @@ package scala package object runtime { - @deprecated("Use `scala.Unit` instead.") val Unit = scala.Unit - @deprecated("Use `scala.Boolean` instead.") val Boolean = scala.Boolean - @deprecated("Use `scala.Byte` instead.") val Byte = scala.Byte - @deprecated("Use `scala.Short` instead.") val Short = scala.Short - @deprecated("Use `scala.Char` instead.") val Char = scala.Char - @deprecated("Use `scala.Int` instead.") val Int = scala.Int - @deprecated("Use `scala.Long` instead.") val Long = scala.Long - @deprecated("Use `scala.Float` instead.") val Float = scala.Float - @deprecated("Use `scala.Double` instead.") val Double = scala.Double + @deprecated("Use `scala.Unit` instead.", "2.9.0") val Unit = scala.Unit + @deprecated("Use `scala.Boolean` instead.", "2.9.0") val Boolean = scala.Boolean + @deprecated("Use `scala.Byte` instead.", "2.9.0") val Byte = scala.Byte + @deprecated("Use `scala.Short` instead.", "2.9.0") val Short = scala.Short + @deprecated("Use `scala.Char` instead.", "2.9.0") val Char = scala.Char + @deprecated("Use `scala.Int` instead.", "2.9.0") val Int = scala.Int + @deprecated("Use `scala.Long` instead.", "2.9.0") val Long = scala.Long + @deprecated("Use `scala.Float` instead.", "2.9.0") val Float = scala.Float + @deprecated("Use `scala.Double` instead.", "2.9.0") val Double = scala.Double } diff --git a/src/library/scala/testing/SUnit.scala b/src/library/scala/testing/SUnit.scala index 6a82e6d6e0..9720015d94 100644 --- a/src/library/scala/testing/SUnit.scala +++ b/src/library/scala/testing/SUnit.scala @@ -47,7 +47,8 @@ import xml.{ Node, NodeSeq } * @author Burak Emir */ @deprecated("SUnit will be removed in 2.8.0. There are several free and sophisticated testing\n"+ - "frameworks for Scala available, examples are \"ScalaTest\", \"ScalaCheck\" or \"Specs\".") + """frameworks for Scala available, examples are "ScalaTest", "ScalaCheck" or "Specs".""", + "2.7.2") object SUnit { /** <p> diff --git a/src/library/scala/util/parsing/json/JSON.scala b/src/library/scala/util/parsing/json/JSON.scala index de2ae03a40..036964680e 100644 --- a/src/library/scala/util/parsing/json/JSON.scala +++ b/src/library/scala/util/parsing/json/JSON.scala @@ -41,9 +41,8 @@ object JSON extends Parser { * * @param input the given JSON string. * @return an optional list of of elements. - * - * @deprecated Use parseFull or parseRaw as needed. */ + @deprecated("Use parseFull or parseRaw as needed.", "2.8.0") def parse(input: String): Option[List[Any]] = parseRaw(input).map(unRaw).flatMap({ case l : List[_] => Some(l) case _ => None diff --git a/src/library/scala/util/parsing/syntax/package.scala b/src/library/scala/util/parsing/syntax/package.scala index 79343d5f80..2fc6053b9b 100644 --- a/src/library/scala/util/parsing/syntax/package.scala +++ b/src/library/scala/util/parsing/syntax/package.scala @@ -14,6 +14,8 @@ import scala.util.parsing.combinator.token * be done, but it doesn't (yet) so it isn't. */ package object syntax { - @deprecated("Moved to scala.util.parsing.combinator.token") type Tokens = token.Tokens - @deprecated("Moved to scala.util.parsing.combinator.token") type StdTokens = token.StdTokens + @deprecated("Moved to scala.util.parsing.combinator.token") + type Tokens = token.Tokens + @deprecated("Moved to scala.util.parsing.combinator.token") + type StdTokens = token.StdTokens } diff --git a/src/library/scala/xml/HasKeyValue.scala b/src/library/scala/xml/HasKeyValue.scala index 0947448ff7..29c3f584c4 100644 --- a/src/library/scala/xml/HasKeyValue.scala +++ b/src/library/scala/xml/HasKeyValue.scala @@ -19,7 +19,7 @@ package scala.xml * * @author Burak Emir */ -@deprecated("Use UnprefixedAttribute's extractor") +@deprecated("Use UnprefixedAttribute's extractor", "2.8.0") class HasKeyValue(key: String) { def unapplySeq(x: MetaData): Option[Seq[Node]] = x.get(key) } diff --git a/src/library/scala/xml/XML.scala b/src/library/scala/xml/XML.scala index 806a746257..04dedfdf45 100644 --- a/src/library/scala/xml/XML.scala +++ b/src/library/scala/xml/XML.scala @@ -51,11 +51,11 @@ object XML extends XMLLoader[Elem] def withSAXParser(p: SAXParser): XMLLoader[Elem] = new XMLLoader[Elem] { override val parser: SAXParser = p } - @deprecated("Use save() instead") + @deprecated("Use save() instead", "2.8.0") final def saveFull(filename: String, node: Node, xmlDecl: Boolean, doctype: dtd.DocType): Unit = save(filename, node, encoding, xmlDecl, doctype) - @deprecated("Use save() instead") + @deprecated("Use save() instead", "2.8.0") final def saveFull(filename: String, node: Node, enc: String, xmlDecl: Boolean, doctype: dtd.DocType): Unit = save(filename, node, enc, xmlDecl, doctype) |