groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: align protected field types between 2.5/2.6 with 3.0 for binary compatibility (port for 2.5/2.6)
Date Fri, 30 Mar 2018 08:22:32 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X cdb1b3e07 -> 114a951e7


align protected field types between 2.5/2.6 with 3.0 for binary compatibility (port for 2.5/2.6)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 114a951e79d47fb86496cb959acd2a053f0001ea
Parents: cdb1b3e
Author: Paul King <paulk@asert.com.au>
Authored: Fri Mar 30 18:17:08 2018 +1000
Committer: Paul King <paulk@asert.com.au>
Committed: Fri Mar 30 18:20:43 2018 +1000

----------------------------------------------------------------------
 gradle/pomconfigurer.gradle                        |  3 +++
 src/main/groovy/groovy/lang/GroovyClassLoader.java | 13 +++----------
 2 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/114a951e/gradle/pomconfigurer.gradle
----------------------------------------------------------------------
diff --git a/gradle/pomconfigurer.gradle b/gradle/pomconfigurer.gradle
index 1ebe9ed..d6ee1df 100644
--- a/gradle/pomconfigurer.gradle
+++ b/gradle/pomconfigurer.gradle
@@ -550,6 +550,9 @@ project.ext.pomConfigureClosureWithoutTweaks = {
                 name 'Peter Ledbrook'
             }
             contributor {
+                name 'Scott Stirling'
+            }
+            contributor {
                 name 'Thibault Kruse'
             }
             contributor {

http://git-wip-us.apache.org/repos/asf/groovy/blob/114a951e/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..116c55d 100644
--- a/src/main/groovy/groovy/lang/GroovyClassLoader.java
+++ b/src/main/groovy/groovy/lang/GroovyClassLoader.java
@@ -81,13 +81,6 @@ import java.util.Map;
  * to keep anything like a "class not found" information for that class name.
  * This includes possible parent loaders. Classes that are not cached are always
  * reloaded.
- *
- * @author <a href="mailto:james@coredevelopers.net">James Strachan</a>
- * @author Guillaume Laforge
- * @author Steve Goetze
- * @author Bing Ran
- * @author <a href="mailto:scottstirling@rcn.com">Scott Stirling</a>
- * @author <a href="mailto:blackdrag@gmx.org">Jochen Theodorou</a>
  */
 public class GroovyClassLoader extends URLClassLoader {
     private static final URL[] EMPTY_URL_ARRAY = new URL[0];
@@ -102,12 +95,12 @@ public class GroovyClassLoader extends URLClassLoader {
      * This cache contains mappings of file name to class. It is used
      * to bypass compilation.
      */
-    protected final ConcurrentCommonCache<String, Class> sourceCache = new ConcurrentCommonCache<String,
Class>();
+    protected final EvictableCache<String, Class> sourceCache = new ConcurrentCommonCache<String,
Class>();
 
     private final CompilerConfiguration config;
     private String sourceEncoding;
     private Boolean recompile;
-    // use 1000000 as offset to avoid conflicts with names form the GroovyShell
+    // use 1000000 as offset to avoid conflicts with names from the GroovyShell
     private static int scriptNameCounter = 1000000;
 
     private GroovyResourceLoader resourceLoader = new GroovyResourceLoader() {
@@ -320,7 +313,7 @@ public class GroovyClassLoader extends URLClassLoader {
      * @return the main class defined in the given script
      */
     public Class parseClass(final GroovyCodeSource codeSource, boolean shouldCacheSource)
throws CompilationFailedException {
-        return sourceCache.getAndPut(
+        return ((StampedCommonCache<String, Class>) sourceCache).getAndPut(
                 codeSource.getName(),
                 new EvictableCache.ValueProvider<String, Class>() {
                     @Override


Mime
View raw message