File tree 1 file changed +5
-4
lines changed
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3675,6 +3675,11 @@ protected CompletableFuture<Void> internalRemoveMaxConsumers(boolean isGlobal) {
3675
3675
}
3676
3676
3677
3677
protected CompletableFuture <MessageId > internalTerminateAsync (boolean authoritative ) {
3678
+ if (SystemTopicNames .isSystemTopic (topicName )) {
3679
+ return FutureUtil .failedFuture (new RestException (Status .METHOD_NOT_ALLOWED ,
3680
+ "Termination of a system topic is not allowed" ));
3681
+ }
3682
+
3678
3683
CompletableFuture <Void > ret ;
3679
3684
if (topicName .isGlobal ()) {
3680
3685
ret = validateGlobalNamespaceOwnershipAsync (namespaceName );
@@ -3689,10 +3694,6 @@ protected CompletableFuture<MessageId> internalTerminateAsync(boolean authoritat
3689
3694
throw new RestException (Status .METHOD_NOT_ALLOWED ,
3690
3695
"Termination of a partitioned topic is not allowed" );
3691
3696
}
3692
- if (SystemTopicNames .isSystemTopic (topicName )) {
3693
- throw new RestException (Status .METHOD_NOT_ALLOWED ,
3694
- "Termination of a system topic is not allowed" );
3695
- }
3696
3697
})
3697
3698
.thenCompose (__ -> getTopicReferenceAsync (topicName ))
3698
3699
.thenCompose (topic -> {
You can’t perform that action at this time.
0 commit comments