Skip to content

Commit

Permalink
[EJBCLIENT-539] wrap the call to ContextManager.setGlobalDefaultSuppl…
Browse files Browse the repository at this point in the history
…ier with privileged block
  • Loading branch information
soul2zimate committed Oct 10, 2024
1 parent f954f2a commit 533753c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public final class JBossEJBProperties implements Contextual<JBossEJBProperties>

static {
final AtomicReference<JBossEJBProperties> onceRef = new AtomicReference<>();
CONTEXT_MANAGER.setGlobalDefaultSupplier(() -> {
CONTEXT_MANAGER.setGlobalDefaultSupplier(() -> doPrivileged((PrivilegedAction<JBossEJBProperties>) () -> {
JBossEJBProperties value = onceRef.get();
if (value == null) {
synchronized (onceRef) {
Expand All @@ -146,7 +146,7 @@ public final class JBossEJBProperties implements Contextual<JBossEJBProperties>
}
}
return value;
});
}));
}

// Remoting-specific properties
Expand Down

0 comments on commit 533753c

Please sign in to comment.