Github user danielsun1106 commented on a diff in the pull request: https://github.com/apache/groovy/pull/679#discussion_r178419950 --- Diff: src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java --- @@ -175,6 +174,11 @@ private V compute(K key, ValueProvider<? super K, ? extends V> valueProvider, bo return doWithReadLock(c -> c.values()); } + @Override + public Set<Entry<K, V>> entrySet() { + return commonCache.entrySet(); --- End diff -- The code should be protected by `doWithReadLock`, we should do same thing for `isEmpty` `containsValue`, etc.
---