Skip to content

Commit

Permalink
Only allow core to set the ExecutionContext
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed May 30, 2024
1 parent 3506973 commit f8cf238
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public class ExecutionContext {
private final ThreadLocal<String> context = new ThreadLocal<>();

public void set(String value) {
if (context.get() != null) {
throw new IllegalArgumentException("ExecutionContext already present");
}
context.set(value);
}

Expand Down

0 comments on commit f8cf238

Please sign in to comment.