This is an automated email from the ASF dual-hosted git repository.
dineshkumar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new af63d03f5 RANGER-5398: Handle NullPointerException for
lastGdsUpdateTime in Audit Plugin Status page
af63d03f5 is described below
commit af63d03f544fc91e23e72acaca6a4db006a51ec3
Author: Dineshkumar Yadav <[email protected]>
AuthorDate: Tue Nov 11 12:56:12 2025 +0530
RANGER-5398: Handle NullPointerException for lastGdsUpdateTime in Audit
Plugin Status page
Signed-off-by: Dineshkumar Yadav <[email protected]>
---
.../java/org/apache/ranger/service/RangerPluginInfoService.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java
b/security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java
index bf29f0026..1f110c391 100644
---
a/security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java
+++
b/security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java
@@ -305,13 +305,13 @@ private Map<String, String> jsonStringToMap(String
jsonStr, XXServiceVersionInfo
Date lastGdsUpdateTime =
xxServiceVersionInfo.getGdsUpdateTime();
ret.put(RangerPluginInfo.RANGER_ADMIN_LATEST_POLICY_VERSION,
Long.toString(latestPolicyVersion));
- ret.put(RangerPluginInfo.RANGER_ADMIN_LAST_POLICY_UPDATE_TIME,
Long.toString(lastPolicyUpdateTime.getTime()));
+ ret.put(RangerPluginInfo.RANGER_ADMIN_LAST_POLICY_UPDATE_TIME,
lastPolicyUpdateTime == null ? "" :
Long.toString(lastPolicyUpdateTime.getTime()));
ret.put(RangerPluginInfo.RANGER_ADMIN_LATEST_GDS_VERSION,
Long.toString(latestGdsVersion));
- ret.put(RangerPluginInfo.RANGER_ADMIN_LAST_GDS_UPDATE_TIME,
Long.toString(lastGdsUpdateTime.getTime()));
+ ret.put(RangerPluginInfo.RANGER_ADMIN_LAST_GDS_UPDATE_TIME,
lastGdsUpdateTime == null ? "" : Long.toString(lastGdsUpdateTime.getTime()));
if (hasAssociatedTagService) {
ret.put(RangerPluginInfo.RANGER_ADMIN_LATEST_TAG_VERSION,
Long.toString(latestTagVersion));
-
ret.put(RangerPluginInfo.RANGER_ADMIN_LAST_TAG_UPDATE_TIME,
Long.toString(lastTagUpdateTime.getTime()));
+
ret.put(RangerPluginInfo.RANGER_ADMIN_LAST_TAG_UPDATE_TIME, lastTagUpdateTime
== null ? "" : Long.toString(lastTagUpdateTime.getTime()));
} else {
ret.remove(RangerPluginInfo.RANGER_ADMIN_LATEST_TAG_VERSION);
ret.remove(RangerPluginInfo.RANGER_ADMIN_LAST_TAG_UPDATE_TIME);