Skip to content

Commit

Permalink
Don't cast to URLClassLoader unconditionally - #186
Browse files Browse the repository at this point in the history
Signed-off-by: Thiago Henrique Hüpner <thihup@gmail.com>
  • Loading branch information
Thihup committed Oct 6, 2020
1 parent 085a68e commit 0963627
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ public ClassLoader getClassLoader() {
}

public void setClassLoader(URLClassLoader loader) {
setClassLoader((ClassLoader) loader);
}

public void setClassLoader(ClassLoader loader) {
this.loader = loader;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,7 @@ private Class loadTagFile(Compiler compiler,
rctxt.addWrapper(tagFilePath,wrapper);

// Use same classloader and classpath for compiling tag files
wrapper.getJspEngineContext().setClassLoader(
(URLClassLoader) ctxt.getClassLoader());
wrapper.getJspEngineContext().setClassLoader(ctxt.getClassLoader());
wrapper.getJspEngineContext().setClassPath(ctxt.getClassPath());
}
else {
Expand Down

0 comments on commit 0963627

Please sign in to comment.