author | wenzelm |
Wed, 15 Jan 2020 19:49:13 +0100 | |
changeset 71382 | 6316debd3a9f |
parent 71381 | b9ea2467c929 |
child 71383 | 8313dca6dee9 |
--- a/src/Pure/General/cache.scala Wed Jan 15 19:46:04 2020 +0100 +++ b/src/Pure/General/cache.scala Wed Jan 15 19:49:13 2020 +0100 @@ -24,11 +24,7 @@ { val ref = table.get(x) if (ref == null) None - else { - val y = ref.asInstanceOf[WeakReference[A]].get - if (y == null) None - else Some(y) - } + else Option(ref.asInstanceOf[WeakReference[A]].get) } protected def store[A](x: A): A =