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 2021/08/13 09:08:16 UTC

[GitHub] [pulsar] Technoboy- commented on a change in pull request #11656: Use getIfValid to avoid handleMetadataStoreNotification swallow exception

Technoboy- commented on a change in pull request #11656:
URL: https://github.com/apache/pulsar/pull/11656#discussion_r688363676



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/common/naming/NamespaceBundleFactory.java
##########
@@ -159,14 +159,16 @@ private NamespaceBundles readBundles(NamespaceName namespace, byte[] value, long
 
     private void handleMetadataStoreNotification(Notification n) {
         if (n.getPath().startsWith(LOCAL_POLICIES_ROOT)) {
-            final NamespaceName namespace = NamespaceName.get(getNamespaceFromPoliciesPath(n.getPath()));

Review comment:
       n.getPath() may return "/admin/local-policies" or "/admin/local-policies/aaa" that not satisfied with 6 slashes.
   getNamespaceFromPoliciesPath(n.getPath()) may return "".  and cause NamespaceName.get() throw IllegalArgumentException.




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