diff options
author | Paul Phillips <paulp@improving.org> | 2011-03-06 21:33:18 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-03-06 21:33:18 +0000 |
commit | 603c3dae0f74ccb9d9b34c9c004713ca3d0e8847 (patch) | |
tree | a02a7bd8b39879a328dfcdd7b148870b37ada6f9 /src/library/scala/collection/immutable/HashSet.scala | |
parent | 64660068dd89813c7c7a09db1e783177ac31f158 (diff) | |
download | scala-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/HashSet.scala')
-rw-r--r-- | src/library/scala/collection/immutable/HashSet.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/collection/immutable/HashSet.scala b/src/library/scala/collection/immutable/HashSet.scala index c47186b27b..7d31f20e14 100644 --- a/src/library/scala/collection/immutable/HashSet.scala +++ b/src/library/scala/collection/immutable/HashSet.scala @@ -60,7 +60,7 @@ class HashSet[A] extends Set[A] def par = ParHashSet.fromTrie(this) - 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) |