This is an automated email from the ASF dual-hosted git repository.
abhi pushed a commit to branch ranger-2.8
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/ranger-2.8 by this push:
new 2fe519540 RANGER-5299: Fix AuditHandler with null exception
2fe519540 is described below
commit 2fe51954010eca4a61819432ee1856c06d87a267
Author: Alex <[email protected]>
AuthorDate: Sun Aug 31 11:55:13 2025 -0700
RANGER-5299: Fix AuditHandler with null exception
---
.../ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
b/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
index 96a36abe9..ec662883e 100644
---
a/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
+++
b/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
@@ -300,7 +300,9 @@ private Collection<RangerAccessResult>
callRangerPlugin(List<RangerAccessRequest
logger.error("Error while calling isAccessAllowed(). requests={}",
rangerRequests, t);
return null;
} finally {
- auditHandler.flushAudit();
+ if (auditHandler != null) {
+ auditHandler.flushAudit();
+ }
}
}