mneethiraj commented on code in PR #595:
URL: https://github.com/apache/ranger/pull/595#discussion_r2305788153


##########
agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java:
##########
@@ -1490,7 +1490,7 @@ private static final class LogHistory {
     private boolean isSynchronousPolicyRefresh() {
         boolean ret = false;
         if (this.getServiceConfigs() != null && this.pluginConfig != null && 
this.pluginConfig.getServiceType() != null) {
-            String synchronousPolicyRefreshConfigName = 
"ranger.plugins.conf.policy.refresh.synchronous";
+            String synchronousPolicyRefreshConfigName = 
String.format("ranger.plugin.%s.policy.refresh.synchronous", 
this.pluginConfig.getServiceType());
             if 
(this.getServiceConfigs().containsKey(synchronousPolicyRefreshConfigName)) {
                 boolean synchronousPolicyRefreshConfigValue = 
Boolean.parseBoolean(this.getServiceConfigs().get(synchronousPolicyRefreshConfigName).trim().toLowerCase());
                 if (synchronousPolicyRefreshConfigValue) {

Review Comment:
   `this.getServiceConfigs().get(synchronousPolicyRefreshConfigName)` would 
return null if the configuration is not present in the map 
`this.getServiceConfigs()` right? In that case line 1495 will hit NPE. Can you 
review and update?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to