Skip to content

Commit

Permalink
Make ScriptExprEvalCtx thread-local methods public
Browse files Browse the repository at this point in the history
This is to allow them to be called from custom code.
  • Loading branch information
mederly committed Apr 1, 2020
1 parent f86ef9d commit 92368c6
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -160,13 +160,15 @@ public void setResult(OperationResult result) {
this.result = result;
}

ScriptExpressionEvaluationContext setupThreadLocal() {
@SuppressWarnings("WeakerAccess") // Can be used e.g. from the overlay code
public ScriptExpressionEvaluationContext setupThreadLocal() {
ScriptExpressionEvaluationContext oldContext = THREAD_LOCAL_CONTEXT.get();
THREAD_LOCAL_CONTEXT.set(this);
return oldContext;
}

void cleanupThreadLocal(ScriptExpressionEvaluationContext oldContext) {
@SuppressWarnings("WeakerAccess") // Can be used e.g. from the overlay code
public void cleanupThreadLocal(ScriptExpressionEvaluationContext oldContext) {
THREAD_LOCAL_CONTEXT.set(oldContext);
}

Expand Down

0 comments on commit 92368c6

Please sign in to comment.