Skip to content

Commit 0755a21

Browse files
authored
Merge pull request scala/scala#8619 from rorygraves/mike/2.12.x_quickHashSetWriteReplace
remove dead code
2 parents 04a7837 + 9d68149 commit 0755a21

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

library/src/scala/collection/immutable/HashSet.scala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -488,21 +488,6 @@ object HashSet extends ImmutableSetFactory[HashSet] {
488488
override def iterator: Iterator[A] = ks.iterator
489489
override def foreach[U](f: A => U): Unit = ks.foreach(f)
490490

491-
private def writeObject(out: java.io.ObjectOutputStream) {
492-
// this cannot work - reading things in might produce different
493-
// hash codes and remove the collision. however this is never called
494-
// because no references to this class are ever handed out to client code
495-
// and HashTrieSet serialization takes care of the situation
496-
sys.error("cannot serialize an immutable.HashSet where all items have the same 32-bit hash code")
497-
//out.writeObject(kvs)
498-
}
499-
500-
private def readObject(in: java.io.ObjectInputStream) {
501-
sys.error("cannot deserialize an immutable.HashSet where all items have the same 32-bit hash code")
502-
//kvs = in.readObject().asInstanceOf[ListSet[A]]
503-
//hash = computeHash(kvs.)
504-
}
505-
506491
}
507492

508493
/**

0 commit comments

Comments
 (0)