diff options
author | Paul Phillips <paulp@improving.org> | 2011-10-03 18:29:45 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-10-03 18:29:45 +0000 |
commit | 2b4b8bbe9ddf86bfbc1500cdab404fac2b687c14 (patch) | |
tree | 7b772ff373411e2aa3185e1950f9b914b3ab8299 /test/files/jvm | |
parent | 3503dac97172bbecbd886c0b6f77cf298bcc3af4 (diff) | |
download | scala-2b4b8bbe9ddf86bfbc1500cdab404fac2b687c14.tar.gz scala-2b4b8bbe9ddf86bfbc1500cdab404fac2b687c14.tar.bz2 scala-2b4b8bbe9ddf86bfbc1500cdab404fac2b687c14.zip |
Repairing bitrot with serialization.
The comment in SyntheticMethods and the comment in the serialization
test said exactly opposite things. The logic at work all seems to be
invalid anyway since nested objects are not treated like lazy vals, they
have no bitmap. Serialize everything serializable. Review by plocinic.
Diffstat (limited to 'test/files/jvm')
-rw-r--r-- | test/files/jvm/serialization.scala | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/test/files/jvm/serialization.scala b/test/files/jvm/serialization.scala index 1056f99848..af842f3e78 100644 --- a/test/files/jvm/serialization.scala +++ b/test/files/jvm/serialization.scala @@ -526,29 +526,22 @@ class Outer extends Serializable { object Test7 { val x = new Outer x.Inner // initialize - try { - val y:Outer = read(write(x)) - if (y.Inner == null) - println("Inner object is null") - } - catch { - case e: Exception => - println("Error in Test7: " + e) - } - + val y:Outer = read(write(x)) + if (y.Inner == null) + println("Inner object is null") } - // Verify that transient lazy vals don't get serialized class WithTransient extends Serializable { @transient lazy val a1 = 1 @transient private lazy val a2 = 2 @transient object B extends Serializable + @transient private object C extends Serializable def test = { println(a1) println(a2) - if (B == null) + if (B == null || C == null) println("Transient nested object failed to serialize properly") } } |