Skip to content

Commit

Permalink
GROOVY-11478: Enable GroovyClassLoader to be ParallelCapable
Browse files Browse the repository at this point in the history
  • Loading branch information
paulk-asert committed Sep 25, 2024
1 parent bc0de3d commit 02dfe8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/groovy/lang/GroovyClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 02dfe8b

Please sign in to comment.