diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-06-17 15:18:13 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-06-17 15:18:13 -0700 |
commit | c03b4c9844804f72b6fb243f21bb29ae53cf3c9a (patch) | |
tree | cbc4ec864890f108aa514f6cf602cbf2fbfee646 /src | |
parent | 5d04725f6ac3a8a26f2fb25f535854b72a54f7cd (diff) | |
parent | 342e71e1cfc676091b9a1519fe7a9ab8d00eec9d (diff) | |
download | scala-c03b4c9844804f72b6fb243f21bb29ae53cf3c9a.tar.gz scala-c03b4c9844804f72b6fb243f21bb29ae53cf3c9a.tar.bz2 scala-c03b4c9844804f72b6fb243f21bb29ae53cf3c9a.zip |
Merge pull request #4420 from Ichoran/issue/8254
SI-8254 List SerializationProxy fails to default(Read/Write)Object
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/immutable/List.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala index 254f14f13c..82e38d3549 100644 --- a/src/library/scala/collection/immutable/List.scala +++ b/src/library/scala/collection/immutable/List.scala @@ -462,6 +462,7 @@ object List extends SeqFactory[List] { private class SerializationProxy[A](@transient private var orig: List[A]) extends Serializable { private def writeObject(out: ObjectOutputStream) { + out.defaultWriteObject() var xs: List[A] = orig while (!xs.isEmpty) { out.writeObject(xs.head) @@ -473,6 +474,7 @@ object List extends SeqFactory[List] { // Java serialization calls this before readResolve during de-serialization. // Read the whole list and store it in `orig`. private def readObject(in: ObjectInputStream) { + in.defaultReadObject() val builder = List.newBuilder[A] while (true) in.readObject match { case ListSerializeEnd => |