This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new 02dfe8b78d GROOVY-11478: Enable GroovyClassLoader to be ParallelCapable
02dfe8b78d is described below
commit 02dfe8b78d0b205eaafaa477913743ffaacfbda8
Author: Paul King <[email protected]>
AuthorDate: Wed Sep 25 18:54:50 2024 +1000
GROOVY-11478: Enable GroovyClassLoader to be ParallelCapable
---
src/main/java/groovy/lang/GroovyClassLoader.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main/java/groovy/lang/GroovyClassLoader.java
b/src/main/java/groovy/lang/GroovyClassLoader.java
index f76d77c003..fc3c1bfde4 100644
--- a/src/main/java/groovy/lang/GroovyClassLoader.java
+++ b/src/main/java/groovy/lang/GroovyClassLoader.java
@@ -107,6 +107,10 @@ public class GroovyClassLoader extends URLClassLoader {
// use 1000000 as offset to avoid conflicts with names from the GroovyShell
private static int scriptNameCounter = 1000000;
+ static {
+ registerAsParallelCapable();
+ }
+
private GroovyResourceLoader resourceLoader = new GroovyResourceLoader() {
@Override
@SuppressWarnings("removal") // TODO a future Groovy version should
perform the operation not as a privileged action