You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/15 13:11:33 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #16076: [fix][broker] Fix NPE when get /admin/v2/namespaces/public/default/maxTopicsPerNamespace

codelipenghui commented on code in PR #16076:
URL: https://github.com/apache/pulsar/pull/16076#discussion_r897961799


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -2692,7 +2692,7 @@ protected OffloadPoliciesImpl internalGetOffloadPolicies() {
         return (OffloadPoliciesImpl) policies.offload_policies;
     }
 
-    protected int internalGetMaxTopicsPerNamespace() {
+    protected Integer internalGetMaxTopicsPerNamespace() {

Review Comment:
   Looks like we can't return a null value to the admin client
   
   admin/Namespaces.java
   
   ```java
   int getMaxTopicsPerNamespace(String namespace) throws PulsarAdminException;
   ```
   
   I think we can return 0 instead.
   
   And please add UT for the new change.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org