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/11/09 03:17:33 UTC

[GitHub] [pulsar] Jason918 commented on a change in pull request #12663: Optimize isValidPath check in MetadataStore

Jason918 commented on a change in pull request #12663:
URL: https://github.com/apache/pulsar/pull/12663#discussion_r745257972



##########
File path: pulsar-metadata/src/test/java/org/apache/pulsar/metadata/LocalMemoryMetadataStoreTest.java
##########
@@ -92,4 +75,15 @@ public void testSharedInstance() throws Exception {
             assertFalse(store1.exists("/test").join());
         });
     }
+
+    @Test
+    public void testPathValid() {
+        assertFalse(AbstractMetadataStore.isValidPath(null));
+        assertFalse(AbstractMetadataStore.isValidPath(""));
+        assertFalse(AbstractMetadataStore.isValidPath(" "));
+        assertFalse(AbstractMetadataStore.isValidPath("/"));

Review comment:
       It's intentional false in previous code.
   I think it's because all valid path comes with some prefix like "/admin/xxx", and the root node is not used.




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