Skip to content

Commit

Permalink
.remove() does not need to trigger the cleanup()
Browse files Browse the repository at this point in the history
  • Loading branch information
jdereg committed Jun 23, 2024
1 parent 411cd8b commit b456931
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/cedarsoftware/util/LRUCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public V put(K key, V value) {
public V remove(Object key) {
Node<K, V> node = cache.remove(key);
if (node != null) {
scheduleCleanup();
return node.value;
}
return null;
Expand Down Expand Up @@ -170,7 +169,7 @@ public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Map)) return false;
Map<?, ?> other = (Map<?, ?>) o;
return this.entrySet().equals(other.entrySet());
return entrySet().equals(other.entrySet());
}

@Override
Expand Down

0 comments on commit b456931

Please sign in to comment.