You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2018/03/01 15:22:47 UTC
[2/2] groovy git commit: Use `UnlimitedConcurrentCache` to cache
classes
Use `UnlimitedConcurrentCache` to cache classes
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/7ab1bd2b
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/7ab1bd2b
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/7ab1bd2b
Branch: refs/heads/master
Commit: 7ab1bd2bcf8301a76c85d61b1f95402561e68373
Parents: 94bba38
Author: danielsun1106 <re...@hotmail.com>
Authored: Thu Mar 1 23:21:30 2018 +0800
Committer: danielsun1106 <re...@hotmail.com>
Committed: Thu Mar 1 23:21:30 2018 +0800
----------------------------------------------------------------------
src/main/groovy/groovy/lang/GroovyClassLoader.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/7ab1bd2b/src/main/groovy/groovy/lang/GroovyClassLoader.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/GroovyClassLoader.java b/src/main/groovy/groovy/lang/GroovyClassLoader.java
index 8581879..07d946f 100644
--- a/src/main/groovy/groovy/lang/GroovyClassLoader.java
+++ b/src/main/groovy/groovy/lang/GroovyClassLoader.java
@@ -45,6 +45,7 @@ import org.codehaus.groovy.runtime.IOGroovyMethods;
import org.codehaus.groovy.runtime.InvokerHelper;
import org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache;
import org.codehaus.groovy.runtime.memoize.EvictableCache;
+import org.codehaus.groovy.runtime.memoize.UnlimitedConcurrentCache;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
@@ -96,7 +97,7 @@ public class GroovyClassLoader extends URLClassLoader {
/**
* this cache contains the loaded classes or PARSING, if the class is currently parsed
*/
- protected final EvictableCache<String, Class> classCache = new ConcurrentCommonCache<String, Class>();
+ protected final EvictableCache<String, Class> classCache = new UnlimitedConcurrentCache<String, Class>();
/**
* This cache contains mappings of file name to class. It is used