Skip to content

Commit

Permalink
Do not use context classloader (#256)
Browse files Browse the repository at this point in the history
The default is already `true` so I am not sure why this `binding` was present, but changing it to `false` seems to prevent some edge case classloader issues for tests that use fork/join thread pools and `reify` or `proxy` new classes in those threads.

Co-authored-by: Joakim Tengstrand <[email protected]>
  • Loading branch information
seancorfield and tengstrand authored Nov 1, 2022
1 parent dba0f0d commit f15e08a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ext))

(defmacro with-classloader [class-loader & body]
`(binding [*use-context-classloader* true]
`(binding [*use-context-classloader* false]
(let [cl# (.getContextClassLoader (Thread/currentThread))]
(try (.setContextClassLoader (Thread/currentThread) ~class-loader)
~@body
Expand Down

0 comments on commit f15e08a

Please sign in to comment.