Skip to content

Commit

Permalink
ARTEMIS-4499 fix ThreadCreateAction so it works properly with Securit…
Browse files Browse the repository at this point in the history
…yManager

Issue: https://issues.apache.org/jira/browse/ARTEMIS-4499

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
  • Loading branch information
ehsavoie committed Nov 13, 2023
1 parent 4838cb7 commit 922f12a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ public void run() {
};
t.setDaemon(daemon);
t.setPriority(threadPriority);
t.setContextClassLoader(tccl);
if (acc != null) {
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
t.setContextClassLoader(tccl);
return null; // nothing to return
});
} else {
t.setContextClassLoader(tccl);
}
return t;
}

Expand Down

0 comments on commit 922f12a

Please sign in to comment.