summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/immutable/ListMap.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-11-30 15:38:56 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-11-30 15:38:56 +0000
commit4be5e11cccace4974ed9a449052455392570139f (patch)
tree88c86bc65b88df08b48584ed791acd1619983c0c /src/library/scala/collection/immutable/ListMap.scala
parent402d96dd3fab6ae677966a9a258c00b3f34a37ed (diff)
downloadscala-4be5e11cccace4974ed9a449052455392570139f.tar.gz
scala-4be5e11cccace4974ed9a449052455392570139f.tar.bz2
scala-4be5e11cccace4974ed9a449052455392570139f.zip
Deprecated the @serializable annotation, introd...
Deprecated the @serializable annotation, introduce a new trait "scala.Serializable" which has to be extended instead (cross-platform). Known issues: - Companion objects of serializable classes (including case classes) are automatically made serializable. However, they don't extend "Serializable" statically because of the known difficulty (should be done before typing, but hard). - Writing "case class C() extends Serializable" gives "error: trait Serializable is inherited twice" - Functions are serializable, but don't extend Serializable dynamically (could be fixed by making FunctionN Serializable - shouldn't we?) Note that @SerialVersionUID continues to be an annotation; it generates a static field, which is not possible otherwise in scala. Review by dragos, extempore. Question to dragos: in JavaPlatform.isMaybeBoxed, why is there a test for "JavaSerializableClass"? Is that correct?
Diffstat (limited to 'src/library/scala/collection/immutable/ListMap.scala')
-rw-r--r--src/library/scala/collection/immutable/ListMap.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scala/collection/immutable/ListMap.scala b/src/library/scala/collection/immutable/ListMap.scala
index 53c99216c2..5fced699f3 100644
--- a/src/library/scala/collection/immutable/ListMap.scala
+++ b/src/library/scala/collection/immutable/ListMap.scala
@@ -42,8 +42,8 @@ object ListMap extends ImmutableMapFactory[ListMap] {
* @define mayNotTerminateInf
* @define willNotTerminateInf
*/
-@serializable @SerialVersionUID(301002838095710379L)
-class ListMap[A, +B] extends Map[A, B] with MapLike[A, B, ListMap[A, B]] {
+@SerialVersionUID(301002838095710379L)
+class ListMap[A, +B] extends Map[A, B] with MapLike[A, B, ListMap[A, B]] with Serializable {
override def empty = ListMap.empty
@@ -123,9 +123,9 @@ class ListMap[A, +B] extends Map[A, B] with MapLike[A, B, ListMap[A, B]] {
/** This class represents an entry in the `ListMap`.
*/
- @serializable @SerialVersionUID(-6453056603889598734L)
+ @SerialVersionUID(-6453056603889598734L)
protected class Node[B1 >: B](override protected val key: A,
- override protected val value: B1) extends ListMap[A, B1] {
+ override protected val value: B1) extends ListMap[A, B1] with Serializable {
/** Returns the number of mappings in this map.
*
* @return number of mappings.