Skip to content

Commit

Permalink
refactor: always use supplied parent class loader when loading pre-co…
Browse files Browse the repository at this point in the history
…mpiled template classes
  • Loading branch information
milgner committed Nov 29, 2023
1 parent e83af4f commit aa357a4
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa357a4

Please # to comment.