Technoboy- commented on code in PR #20478:
URL: https://github.com/apache/pulsar/pull/20478#discussion_r1216004548


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java:
##########
@@ -263,7 +263,10 @@ public CompletableFuture<Void> 
revokePermissionAsync(TopicName topicName, String
                         policies.auth_policies.getTopicAuthentication()
                                 .computeIfPresent(topicName.toString(), (k, v) 
-> {
                                         v.remove(role);
-                                        return null;
+                                        if (v.isEmpty()) {
+                                            return  null;
+                                        }
+                                        return v;

Review Comment:
   I have added some tests for this. you can see the modification in 
`AuthorizationProducerConsumerTest.java`



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