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/08/04 03:17:15 UTC

[GitHub] [pulsar] 315157973 commented on a change in pull request #11545: add test for auto-created partitioned system topic

315157973 commented on a change in pull request #11545:
URL: https://github.com/apache/pulsar/pull/11545#discussion_r682255373



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/events/EventsTopicNames.java
##########
@@ -45,12 +45,6 @@
             Collections.unmodifiableSet(Sets.newHashSet(NAMESPACE_EVENTS_LOCAL_NAME, TRANSACTION_BUFFER_SNAPSHOT));
 
     public static boolean checkTopicIsEventsNames(TopicName topicName) {
-        String name;
-        if (topicName.isPartitioned()) {
-            name = TopicName.get(topicName.getPartitionedTopicName()).getLocalName();
-        } else {
-            name = topicName.getLocalName();
-        }
-        return EVENTS_TOPIC_NAMES.contains(name);
+        return EVENTS_TOPIC_NAMES.contains(TopicName.get(topicName.getPartitionedTopicName()).getLocalName());

Review comment:
       Please add a unit test to cover partitionedTopic and non-partitionedTopic




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