You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gi...@git.apache.org on 2017/08/12 01:00:26 UTC

[GitHub] rdhabalia commented on a change in pull request #634: PIP-3 : Introduce message-dispatch rate limiting

rdhabalia commented on a change in pull request #634: PIP-3 : Introduce message-dispatch rate limiting
URL: https://github.com/apache/incubator-pulsar/pull/634#discussion_r132805842
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/cache/LocalZooKeeperCacheService.java
 ##########
 @@ -144,10 +144,11 @@ private void initZK() throws PulsarServerException {
      */
     @SuppressWarnings("deprecation")
     public CompletableFuture<Optional<LocalPolicies>> createPolicies(String path, boolean readFromGlobal) {
-        checkNotNull(path, "path can't be null");
-        checkArgument(path.startsWith(LOCAL_POLICIES_ROOT), "Invalid path of local policies");
-
         CompletableFuture<Optional<LocalPolicies>> future = new CompletableFuture<>();
+        if (path == null || !path.startsWith(LOCAL_POLICIES_ROOT)) {
 
 Review comment:
   actually, this method returns `CompletableFuture<>` so, we should fail the future rather throwing runtime exception.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services