groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [5/6] groovy git commit: Use `LinkedHashMap` by default to implement `CommonCache`
Date Mon, 11 Dec 2017 02:50:05 GMT
Use `LinkedHashMap` by default to implement `CommonCache`

(cherry picked from commit b2e8aa2)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: fecd7a641f5199b7ae66c7cd611da221d709d0c8
Parents: 7888286
Author: sunlan <sunlan@apache.org>
Authored: Mon Dec 11 10:22:57 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Mon Dec 11 10:49:47 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/groovy/blob/fecd7a64/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 f24706c..f9cd925 100644
--- a/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
+++ b/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
@@ -21,7 +21,6 @@ package org.codehaus.groovy.runtime.memoize;
 import java.lang.ref.SoftReference;
 import java.lang.ref.WeakReference;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
@@ -48,7 +47,7 @@ public class CommonCache<K, V> implements EvictableCache<K, V>
{
      * A cache with unlimited size
      */
     public CommonCache() {
-        this(new HashMap<K, V>());
+        this(new LinkedHashMap<K, V>());
     }
 
     /**


Mime
View raw message