Skip to content
Browse files

[nomaster] Revert "SI-4664 Make scala.util.Random Serializable"

Also revert "SI-4664 [Make scala.util.Random Serializable] Add test case"

This reverts commit 0b92073.
This reverts commit 2aa66be.

This is necessary to maintain binary compatibility with 2.10.0.
  • Loading branch information...
1 parent f9550c6 commit 8b4af71d27ebd56f318e31ffc69225f3fdd6232d @adriaanm adriaanm committed Feb 8, 2013
Showing with 10 additions and 25 deletions.
  1. +9 −9 bincompat-forward.whitelist.conf
  2. +1 −1 src/library/scala/util/Random.scala
  3. +0 −15 test/files/jvm/serialization.scala
View
18 bincompat-forward.whitelist.conf
@@ -25,15 +25,15 @@ filter {
# matchName="scala.collection.immutable.Range.head"
# problemName=IncompatibleResultTypeProblem
# },
- # TODO: revert 0b92073a38 2aa66bec86: SI-4664 [Make scala.util.Random Serializable] Add test case
- {
- matchName="scala.util.Random"
- problemName=MissingTypesProblem
- },
- {
- matchName="scala.util.Random$"
- problemName=MissingTypesProblem
- },
+ # revert 0b92073a38 2aa66bec86: SI-4664 [Make scala.util.Random Serializable] Add test case
+ # {
+ # matchName="scala.util.Random"
+ # problemName=MissingTypesProblem
+ # },
+ # {
+ # matchName="scala.util.Random$"
+ # problemName=MissingTypesProblem
+ # },
{
# private[concurrent]
matchName="scala.concurrent.BatchingExecutor$Batch"
View
2 src/library/scala/util/Random.scala
@@ -17,7 +17,7 @@ import scala.language.{implicitConversions, higherKinds}
* @author Stephane Micheloud
*
*/
-class Random(val self: java.util.Random) extends AnyRef with Serializable {
+class Random(val self: java.util.Random) {
/** Creates a new random number generator using a single long seed. */
def this(seed: Long) = this(new java.util.Random(seed))
View
15 test/files/jvm/serialization.scala
@@ -604,7 +604,6 @@ object Test {
Test7
Test8
Test9_parallel
- Test10_util
}
}
@@ -670,17 +669,3 @@ object Test9_parallel {
throw e
}
}
-
-//############################################################################
-// Test classes in package scala.util
-
-object Test10_util {
- import scala.util.Random
- def rep[A](n: Int)(f: => A) { if (n > 0) { f; rep(n-1)(f) } }
-
- try {
- val random = new Random(345)
- val random2: Random = read(write(random))
- rep(5) { assert(random.nextInt == random2.nextInt) }
- }
-}

0 comments on commit 8b4af71

Please sign in to comment.
Something went wrong with that request. Please try again.