This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 26aa85378f5 Fix NPE for audit func. (#16556)
26aa85378f5 is described below
commit 26aa85378f5561c8906b506d6855d166446675b6
Author: wenyanshi-123 <[email protected]>
AuthorDate: Sat Oct 11 15:03:39 2025 +0800
Fix NPE for audit func. (#16556)
---
.../org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java
index 9c514979e4b..dc105068be0 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java
@@ -3246,7 +3246,7 @@ public class ClientRPCServiceImpl implements
IClientRPCServiceWithHandler {
IClientSession session = SESSION_MANAGER.getCurrSession();
if (session != null) {
TSCloseSessionReq req = new TSCloseSessionReq();
- if (!session.getUsername().contains("null")) {
+ if (session.getUsername() != null &&
!session.getUsername().contains("null")) {
AUDIT_LOGGER.log(
new AuditLogFields(
session.getUserId(),