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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to