summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2015-05-15 08:41:57 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2015-05-15 08:41:57 -0700
commitdc906c679171950807a47ca9821616548e84a2ff (patch)
treeec071f878e5cf7be850a0fb6d2e35941627d3209
parent297eeb335cbc50be9107d3f49cc7eb0487514ca7 (diff)
parentd504017f15692ae72db05118ed2be38daa3b7752 (diff)
downloadscala-dc906c679171950807a47ca9821616548e84a2ff.tar.gz
scala-dc906c679171950807a47ca9821616548e84a2ff.tar.bz2
scala-dc906c679171950807a47ca9821616548e84a2ff.zip
Merge pull request #4502 from cneijenhuis/documentation/try-example-deprecated
Fixed deprecation warning in scaladoc example of Try
-rw-r--r--src/library/scala/util/Try.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/util/Try.scala b/src/library/scala/util/Try.scala
index f65c77f5a0..0a6a7972c2 100644
--- a/src/library/scala/util/Try.scala
+++ b/src/library/scala/util/Try.scala
@@ -24,11 +24,12 @@ import scala.language.implicitConversions
*
* Example:
* {{{
+ * import scala.io.StdIn
* import scala.util.{Try, Success, Failure}
*
* def divide: Try[Int] = {
- * val dividend = Try(Console.readLine("Enter an Int that you'd like to divide:\n").toInt)
- * val divisor = Try(Console.readLine("Enter an Int that you'd like to divide by:\n").toInt)
+ * val dividend = Try(StdIn.readLine("Enter an Int that you'd like to divide:\n").toInt)
+ * val divisor = Try(StdIn.readLine("Enter an Int that you'd like to divide by:\n").toInt)
* val problem = dividend.flatMap(x => divisor.map(y => x/y))
* problem match {
* case Success(v) =>