vyommani commented on code in PR #1382:
URL: https://github.com/apache/ranger/pull/1382#discussion_r4690061021


##########
security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java:
##########
@@ -860,27 +871,97 @@ private void collectAccessTypes(RangerPolicy policy, 
RangerServiceDef serviceDef
     }
 
     private void collectAccessTypes(Map<String, Collection<String>> 
expandedAccesses, List<? extends RangerPolicy.RangerPolicyItem> policyItems, 
Map<String, Set<String>> userAccesses, Map<String, Set<String>> groupAccesses, 
Map<String, Set<String>> roleAccesses) {
+        collectAccessTypes(expandedAccesses, null, policyItems, userAccesses, 
groupAccesses, roleAccesses);
+    }
+
+    private void collectAccessTypes(Map<String, Collection<String>> 
expandedAccesses, String itemType, List<? extends 
RangerPolicy.RangerPolicyItem> policyItems, Map<String, Set<String>> 
userAccesses, Map<String, Set<String>> groupAccesses, Map<String, Set<String>> 
roleAccesses) {
         for (RangerPolicy.RangerPolicyItem item : policyItems) {

Review Comment:
   The setters already turn a null list into an empty one (nullSafeList), and 
the constructor calls them. Same as the loops in getAllAccessTypes().



-- 
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