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 2020/06/04 15:30:29 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #7164: fix get partitioned metadata throws NullPointerException

merlimat commented on a change in pull request #7164:
URL: https://github.com/apache/pulsar/pull/7164#discussion_r435348955



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -1918,6 +1918,9 @@ private void createPendingLoadTopic() {
     }
 
     public CompletableFuture<PartitionedTopicMetadata> fetchPartitionedTopicMetadataCheckAllowAutoCreationAsync(TopicName topicName) {
+        if(pulsar.getNamespaceService() == null){
+            return CompletableFuture.completedFuture(null);

Review comment:
       We should return an error in the future at this point, otherwise we're moving the NPE somewhere else




----------------------------------------------------------------
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:
users@infra.apache.org