summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/immutable/HashMap.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-06 21:33:18 +0000
committerPaul Phillips <paulp@improving.org>2011-03-06 21:33:18 +0000
commit603c3dae0f74ccb9d9b34c9c004713ca3d0e8847 (patch)
treea02a7bd8b39879a328dfcdd7b148870b37ada6f9 /src/library/scala/collection/immutable/HashMap.scala
parent64660068dd89813c7c7a09db1e783177ac31f158 (diff)
downloadscala-603c3dae0f74ccb9d9b34c9c004713ca3d0e8847.tar.gz
scala-603c3dae0f74ccb9d9b34c9c004713ca3d0e8847.tar.bz2
scala-603c3dae0f74ccb9d9b34c9c004713ca3d0e8847.zip
And extempore's original plan carries the day: ...
And extempore's original plan carries the day: null.## no longer throws an NPE. Took advantage of feature to simplify a bunch of sharp-sharp calculations. Closes #4311, no review.
Diffstat (limited to 'src/library/scala/collection/immutable/HashMap.scala')
-rw-r--r--src/library/scala/collection/immutable/HashMap.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/collection/immutable/HashMap.scala b/src/library/scala/collection/immutable/HashMap.scala
index e0f15f67da..d44791c2eb 100644
--- a/src/library/scala/collection/immutable/HashMap.scala
+++ b/src/library/scala/collection/immutable/HashMap.scala
@@ -59,7 +59,7 @@ class HashMap[A, +B] extends Map[A,B] with MapLike[A, B, HashMap[A, B]] with Par
def - (key: A): HashMap[A, B] =
removed0(key, computeHash(key), 0)
- protected def elemHashCode(key: A) = if (key == null) 0 else key.##
+ protected def elemHashCode(key: A) = key.##
protected final def improve(hcode: Int) = {
var h: Int = hcode + ~(hcode << 9)