Github user paulk-asert commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/679#discussion_r178421035
  
    --- Diff: 
src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java ---
    @@ -199,20 +208,35 @@ public int size() {
             return doWithReadLock(c -> c.size());
         }
     
    +    @Override
    +    public boolean isEmpty() {
    +        return commonCache.isEmpty();
    +    }
    +
         /**
          * {@inheritDoc}
          */
         @Override
    -    public V remove(final K key) {
    +    public V remove(final Object key) {
             return doWithWriteLock(c -> c.remove(key));
         }
     
    +    @Override
    +    public void putAll(Map<? extends K, ? extends V> m) {
    +
    --- End diff --
    
    Oops, I was wondering whether to lock for the whole putAll or loop and lock 
per entry and then forgot to supply either! I'll do the former for now.


---

Reply via email to