fateh288 commented on code in PR #595:
URL: https://github.com/apache/ranger/pull/595#discussion_r2338037498
##########
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:
There were a couple of reasons I changed this code:
The getServiceConfigs method is being used by hbase plugin wherein there was
no null check and could have thrown NPE.
While there is an effort in the setServiceConfigs method to set it as a new
hashmap when the underying service config is null, there is a possibility that
this setter is not reached in the flow.
In order for the callers of the getServiceConfig (I am not sure but there
could be other callers other than hbase plugin too) method to not face NPE, I
am returning new hashmap to the caller of this method instead 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]