diff options
author | Paul Phillips <paulp@improving.org> | 2012-07-27 02:40:13 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-07-27 05:42:17 -0700 |
commit | 785c4ddedd68914f7b5667d0e9733e3fddebe1a0 (patch) | |
tree | 8b44ff47a2edb920f23e111ea1cf120d3a54d2e3 /src/library | |
parent | bc719cb8e4957a80e423350d8e993f1fa6a2a997 (diff) | |
download | scala-785c4ddedd68914f7b5667d0e9733e3fddebe1a0.tar.gz scala-785c4ddedd68914f7b5667d0e9733e3fddebe1a0.tar.bz2 scala-785c4ddedd68914f7b5667d0e9733e3fddebe1a0.zip |
Cleared the remaining unchecked warnings in trunk.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/concurrent/TrieMap.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scala/collection/concurrent/TrieMap.scala b/src/library/scala/collection/concurrent/TrieMap.scala index 2d8217551a..3d0aa6fd07 100644 --- a/src/library/scala/collection/concurrent/TrieMap.scala +++ b/src/library/scala/collection/concurrent/TrieMap.scala @@ -188,7 +188,7 @@ private[collection] final class INode[K, V](bn: MainNode[K, V], g: Gen) extends if (sn.hc == hc && equal(sn.k, k, ct)) { if (GCAS(cn, cn.updatedAt(pos, new SNode(k, v, hc), gen), ct)) Some(sn.v) else null } else None - case otherv: V => + case otherv => if (sn.hc == hc && equal(sn.k, k, ct) && sn.v == otherv) { if (GCAS(cn, cn.updatedAt(pos, new SNode(k, v, hc), gen), ct)) Some(sn.v) else null } else None @@ -200,7 +200,7 @@ private[collection] final class INode[K, V](bn: MainNode[K, V], g: Gen) extends val ncnode = rn.insertedAt(pos, flag, new SNode(k, v, hc), gen) if (GCAS(cn, ncnode, ct)) None else null case INode.KEY_PRESENT => None - case otherv: V => None + case otherv => None } case sn: TNode[K, V] => clean(parent, ct, lev - 5) @@ -224,9 +224,9 @@ private[collection] final class INode[K, V](bn: MainNode[K, V], g: Gen) extends case Some(v0) => if (insertln()) Some(v0) else null case None => None } - case otherv: V => + case otherv => ln.get(k) match { - case Some(v0) if v0 == otherv => if (insertln()) Some(otherv) else null + case Some(v0) if v0 == otherv => if (insertln()) Some(otherv.asInstanceOf[V]) else null case _ => None } } |