Repository: groovy
Updated Branches:
  refs/heads/master 29727ea0c -> d66bbd754


Trivial refactoring


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/d66bbd75
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/d66bbd75
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/d66bbd75

Branch: refs/heads/master
Commit: d66bbd75473df54cdab95975a7dc151a8039fb49
Parents: 29727ea
Author: sunlan <[email protected]>
Authored: Mon Dec 11 23:16:22 2017 +0800
Committer: sunlan <[email protected]>
Committed: Mon Dec 11 23:16:22 2017 +0800

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/d66bbd75/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java 
b/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
index dd29d5b..a98e3d5 100644
--- a/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
+++ b/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
@@ -114,14 +114,14 @@ public class CommonCache<K, V> implements 
EvictableCache<K, V> {
     }
 
     public V getAndPut(K key, ValueProvider<K, V> valueProvider, boolean 
shouldCache) {
-        V value = map.get(key);
+        V value = get(key);
         if (null != value) {
             return value;
         }
 
         value = null == valueProvider ? null : valueProvider.provide(key);
         if (shouldCache && null != value) {
-            map.put(key, value);
+            put(key, value);
         }
 
         return value;

Reply via email to