Skip to content

Commit

Permalink
Fix resource-level audit w/expressions
Browse files Browse the repository at this point in the history
There was an (obvious) bug leading to MID-9382.

Tested manually by running MiscSyncTest (there's no
easy way of parsing logs to automate the checks).
  • Loading branch information
mederly committed Jan 16, 2024
1 parent e207b1b commit 7cfd930
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ public AuditEventRecord evaluateRecordingExpression(ExpressionType expression, A
? (AuditEventRecord) returnValue.getRealValue()
: null;
} finally {
ExpressionEnvironmentThreadLocalHolder.popExpressionEnvironment();
if (expressionEnvironmentSupplier != null) {
ExpressionEnvironmentThreadLocalHolder.popExpressionEnvironment();
}
}
} catch (Throwable t) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't evaluate audit recording expression", t);
Expand Down

0 comments on commit 7cfd930

Please sign in to comment.