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


##########
agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java:
##########
@@ -1209,6 +1237,11 @@ private void setServiceConfigs(Map<String, String> 
serviceConfigs) {
         if (authContext != null && !Objects.equals(oldServiceConfigs, 
this.serviceConfigs)) {
             authContext.onServiceConfigsUpdate(this.serviceConfigs);
         }
+        String isSyncPolicyRefresh = this.pluginConfig == null ? null : 
this.serviceConfigs.get(this.pluginConfig.getPropertyPrefix() + 
".policy.refresh.synchronous");
+        if (Boolean.parseBoolean(isSyncPolicyRefresh)) {
+            this.synchronousPolicyRefresh = true;

Review Comment:
   When `this.synchronousPolicyRefresh` is `true`, and the new value is `false` 
the `if` at 1241 will result in  `this.synchronousPolicyRefresh` not updated. I 
suggest replacing 1241 - 1243 with the following line:
   ```
     this.synchronousPolicyRefresh = Boolean.parseBoolean(isSyncPolicyRefresh);
   ```



##########
agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java:
##########
@@ -1186,6 +1211,9 @@ public GdsPolicyEngine getGdsPolicyEngine() {
     }
 
     public Map<String, String> getServiceConfigs() {
+        if (serviceConfigs == null) {

Review Comment:
   Why is it necessary to return a new map in case of `null`?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to