diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-15 14:47:37 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-15 14:47:37 -0800 |
commit | 81e12bdb26b75e0a8c289662d02cc6551268f7d3 (patch) | |
tree | afea36e06e039f202224764cf1976830a1c920e2 /src | |
parent | be475e16295409cdd7218bb971b7e80048e3ee4f (diff) | |
parent | a63193c1a89e51636aa917d486fd954a7bd9b074 (diff) | |
download | scala-81e12bdb26b75e0a8c289662d02cc6551268f7d3.tar.gz scala-81e12bdb26b75e0a8c289662d02cc6551268f7d3.tar.bz2 scala-81e12bdb26b75e0a8c289662d02cc6551268f7d3.zip |
Merge pull request #3528 from Ichoran/issue/6908
SI-6908 FlatHashTable and things that depend on it can't store nulls
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala b/src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala index afc2d6e987..62165ae0d2 100644 --- a/src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala +++ b/src/library/scala/collection/parallel/mutable/ParFlatHashTable.scala @@ -28,12 +28,12 @@ trait ParFlatHashTable[T] extends scala.collection.mutable.FlatHashTable[T] { extends IterableSplitter[T] with SizeMapUtils { import scala.collection.DebugUtils._ - private var traversed = 0 - private val itertable = table + private[this] var traversed = 0 + private[this] val itertable = table if (hasNext) scan() - private def scan() { + private[this] def scan() { while (itertable(idx) eq null) { idx += 1 } @@ -44,7 +44,7 @@ trait ParFlatHashTable[T] extends scala.collection.mutable.FlatHashTable[T] { def remaining = totalsize - traversed def hasNext = traversed < totalsize def next() = if (hasNext) { - val r = itertable(idx).asInstanceOf[T] + val r = entryToElem(itertable(idx)) traversed += 1 idx += 1 if (hasNext) scan() |