315157973 commented on a change in pull request #9831:
URL: https://github.com/apache/pulsar/pull/9831#discussion_r589136451



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
##########
@@ -827,7 +827,9 @@ protected void checkArgument(boolean b, String 
errorMessage) {
     }
 
     protected void validatePersistencePolicies(PersistencePolicies 
persistence) {
-        checkNotNull(persistence, "persistence policies should not be null");
+        if (persistence == null) {
+            return;
+        }

Review comment:
       In this way, `set` and `delete` can reuse the same method. set null is 
equal to delete. I will wrap a `Delete` method based on the `Set` method




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

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


Reply via email to