Skip to content

Commit

Permalink
add explicit type
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Sep 16, 2023
1 parent 081a190 commit 2420ea2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ case class ConcurrentHashMapCache(map: ConcurrentHashMap[AnyRef, Eval[Any]] = ne
def get[V](key: AnyRef): Option[V] =
Option(map.get(key)).map(_.value.asInstanceOf[V])

def reset(key: AnyRef) = {
def reset(key: AnyRef): C = {
map.remove(key)
this
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class ConcurrentWeakIdentityHashMap[K, V] extends ConcurrentMap[K, V] {
next
}

override def remove() = throw new UnsupportedOperationException()
override def remove(): Unit = throw new UnsupportedOperationException()

def extract(u: U): T
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ case class ConcurrentWeakIdentityHashMapCache(
def get[V](key: AnyRef): Option[V] =
Option(map.get(key)).map(_.value.asInstanceOf[V])

def reset(key: AnyRef) = {
def reset(key: AnyRef): C = {
map.remove(key.hashCode)
this
}
Expand Down

0 comments on commit 2420ea2

Please sign in to comment.