Bindings have never been removed from the cache in ProvisionListenerCallbackStore.remove() because the key of the cache were KeyBinding objects, while it was attempted to remove Binding objects.
Additionally use a standard Java ConcurrentHashMap instead of a simple Guava Cache, which also allows to remove the now unnecessary KeyBinding helper class. Instead of a new KeyBinding object a new new lambda object is created for each cache lookup.
Bindings have never been removed from the cache in
ProvisionListenerCallbackStore.remove()
because the key of the cache wereKeyBinding
objects, while it was attempted to remove Binding objects.Additionally use a standard Java
ConcurrentHashMap
instead of a simple Guava Cache, which also allows to remove the now unnecessaryKeyBinding
helper class. Instead of a newKeyBinding
object a new new lambda object is created for each cache lookup.This also helps for https://github.com/google/guice/issues/1785.