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/06/08 08:24:36 UTC

[GitHub] [pulsar] yangl commented on a change in pull request #10850: maxTopicsPerNamespace check should exclude system topic.

yangl commented on a change in pull request #10850:
URL: https://github.com/apache/pulsar/pull/10850#discussion_r647219725



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java
##########
@@ -272,7 +272,7 @@ public static int getPartitionIndex(String topic) {
         int partitionIndex = -1;
         if (topic.contains(PARTITIONED_TOPIC_SUFFIX)) {
             try {
-                partitionIndex = Integer.parseInt(topic.substring(topic.lastIndexOf('-') + 1));
+                partitionIndex = Integer.parseInt(StringUtils.substringAfterLast(topic, PARTITIONED_TOPIC_SUFFIX));

Review comment:
       ok, rollback first. 




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