From commits-return-6001-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Fri Mar 30 10:22:34 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 39113180647 for ; Fri, 30 Mar 2018 10:22:34 +0200 (CEST) Received: (qmail 10208 invoked by uid 500); 30 Mar 2018 08:22:33 -0000 Mailing-List: contact commits-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list commits@groovy.apache.org Received: (qmail 10198 invoked by uid 99); 30 Mar 2018 08:22:33 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2018 08:22:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DD7BBDFF80; Fri, 30 Mar 2018 08:22:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: paulk@apache.org To: commits@groovy.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Fri Mar 30 18:17:08 2018 +1000 Committer: Paul King 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 James Strachan - * @author Guillaume Laforge - * @author Steve Goetze - * @author Bing Ran - * @author Scott Stirling - * @author Jochen Theodorou */ 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 sourceCache = new ConcurrentCommonCache(); + protected final EvictableCache sourceCache = new ConcurrentCommonCache(); 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) sourceCache).getAndPut( codeSource.getName(), new EvictableCache.ValueProvider() { @Override