From aa357a4a22db95ed6782bfc0ef492d18feb8f7af Mon Sep 17 00:00:00 2001 From: Marcus Ilgner Date: Wed, 29 Nov 2023 20:58:25 +0100 Subject: [PATCH] refactor: always use supplied parent class loader when loading pre-compiled template classes --- .../java/gg/jte/runtime/RuntimeTemplateLoader.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/jte-runtime/src/main/java/gg/jte/runtime/RuntimeTemplateLoader.java b/jte-runtime/src/main/java/gg/jte/runtime/RuntimeTemplateLoader.java index 2d83f831..6e645de4 100644 --- a/jte-runtime/src/main/java/gg/jte/runtime/RuntimeTemplateLoader.java +++ b/jte-runtime/src/main/java/gg/jte/runtime/RuntimeTemplateLoader.java @@ -9,15 +9,7 @@ public class RuntimeTemplateLoader extends TemplateLoader { public RuntimeTemplateLoader(Path classDirectory, ClassLoader parentClassLoader, String packageName) { super(classDirectory, packageName); - this.singleClassLoader = createClassLoader(parentClassLoader); - } - - @Override - protected ClassLoader createClassLoader(ClassLoader parentClassLoader) { - if (classDirectory == null) { - return Thread.currentThread().getContextClassLoader(); - } - return super.createClassLoader(parentClassLoader); + this.singleClassLoader = parentClassLoader; } @Override