You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by pr...@apache.org on 2022/04/15 00:42:51 UTC

[ranger] branch ranger-2.3 updated: RANGER-3709: Fix NullPointerException in getSecureServicePoliciesIfUpdated call of ServiceRest

This is an automated email from the ASF dual-hosted git repository.

pradeep pushed a commit to branch ranger-2.3
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/ranger-2.3 by this push:
     new 7a8af6cf0 RANGER-3709: Fix NullPointerException in getSecureServicePoliciesIfUpdated call of ServiceRest
7a8af6cf0 is described below

commit 7a8af6cf0b5ffa9f126f68c7d58feb09e8da734e
Author: pradeep <pr...@apache.org>
AuthorDate: Thu Apr 14 21:45:49 2022 +0530

    RANGER-3709: Fix NullPointerException in getSecureServicePoliciesIfUpdated call of ServiceRest
---
 .../main/java/org/apache/ranger/common/RangerServicePoliciesCache.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security-admin/src/main/java/org/apache/ranger/common/RangerServicePoliciesCache.java b/security-admin/src/main/java/org/apache/ranger/common/RangerServicePoliciesCache.java
index 061b14cbd..ba38836ac 100644
--- a/security-admin/src/main/java/org/apache/ranger/common/RangerServicePoliciesCache.java
+++ b/security-admin/src/main/java/org/apache/ranger/common/RangerServicePoliciesCache.java
@@ -228,7 +228,7 @@ public class RangerServicePoliciesCache {
 						}
 					}
 				} else {
-					LOG.error("Could not get lock in [" + waitTimeInSeconds + "] seconds, returning cached ServicePolicies and wait Queue Length:[" +lock.getQueueLength() + "], servicePolicies version:[" + servicePolicies.getPolicyVersion() + "]");
+					LOG.error("Could not get lock in [" + waitTimeInSeconds + "] seconds, returning cached ServicePolicies and wait Queue Length:[" +lock.getQueueLength() + "], servicePolicies version:[" + (servicePolicies != null ? servicePolicies.getPolicyVersion() : -1L) + "]");
 					ret = this.servicePolicies;
 				}
 			} catch (InterruptedException exception) {