groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Use `LinkedHashMap` by default to implement `CommonCache`
Date Mon, 11 Dec 2017 02:23:03 GMT
Repository: groovy
Updated Branches:
  refs/heads/master d8b8e9865 -> b2e8aa216


Use `LinkedHashMap` by default to implement `CommonCache`


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

Branch: refs/heads/master
Commit: b2e8aa2167235e0420f8d6e79042f6e978378d8c
Parents: d8b8e98
Author: sunlan <sunlan@apache.org>
Authored: Mon Dec 11 10:22:57 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Mon Dec 11 10:22:57 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/b2e8aa21/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