Skip to content

Commit

Permalink
[tests] Prevent Tomcat Illegal reflective access for java.lang.Thread…
Browse files Browse the repository at this point in the history
….threadLocals
  • Loading branch information
grgrzybek committed Mar 23, 2023
1 parent a7ab895 commit 09738d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public PaxWebStandardContext(Default404Servlet defaultServlet, OsgiSessionAttrib
this.osgiSessionsBridge = osgiSessionsBridge;
this.setClearReferencesObjectStreamClassCaches(false);
this.setClearReferencesRmiTargets(false);
this.setClearReferencesThreadLocals(false);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,7 @@ private void ensureServletContextStarted(PaxWebStandardContext context) {
ParallelWebappClassLoader loaderInstance = new ParallelWebappClassLoader(highestRankedContext.getClassLoader());
loaderInstance.setClearReferencesObjectStreamClassCaches(false);
loaderInstance.setClearReferencesRmiTargets(false);
loaderInstance.setClearReferencesThreadLocals(false);
tomcatLoader.setLoaderInstance(loaderInstance);
context.setParentClassLoader(highestRankedContext.getClassLoader());
context.setLoader(tomcatLoader);
Expand Down

0 comments on commit 09738d3

Please sign in to comment.