Bug #2200
ApplicationThreadPoolImpl does not set caller's context class loader and not reset it after
Start date:
22.07.2025
Due date:
% Done:
0%
Estimated time:
origin:
Description
Currently the built-in thread pool does not reset the context class loader of a thread that performs work so that a unit of work may have an arbitrary context class loader set while performing its work, given that some other piece of work set a context class loader and omitted to unset it again.
Acceptance Criteria¶
- Before and after performing any application work, the context class loader of the executing pool thread is set to the caller's context class loader and set back to null after execution.
- In the case of getAs/runAs, the context class loader is simply not altered