Use CacheBuilder returned from CacheBuilder.removalListener(...)
The JavaDoc of CacheBuilder.removalListener(...) states that after invoking this method this CacheBuilder should not be used anymore but only the returned CacheBuilder. Change-Id: Ibe7cb90624ca29e3492dbc84d029758bed0055c3 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
parent
1d947bf77c
commit
dcab15ebed
@ -85,7 +85,7 @@ public class DefaultCacheFactory implements MemoryCacheFactory {
|
||||
"cache", def.name(), "memoryLimit",
|
||||
def.maximumWeight()));
|
||||
|
||||
builder.removalListener(forwardingRemovalListenerFactory.create(def.name()));
|
||||
builder = builder.removalListener(forwardingRemovalListenerFactory.create(def.name()));
|
||||
|
||||
Weigher<K, V> weigher = def.weigher();
|
||||
if (weigher != null && unwrapValueHolder) {
|
||||
|
Loading…
Reference in New Issue
Block a user