codelipenghui commented on code in PR #21885:
URL: https://github.com/apache/pulsar/pull/21885#discussion_r1449494752


##########
pulsar-common/src/main/java/org/apache/pulsar/common/topics/TopicList.java:
##########
@@ -78,4 +81,16 @@ public static Set<String> minus(Collection<String> list1, 
Collection<String> lis
         s1.removeAll(list2);
         return s1;
     }
+
+    public static String removeTopicDomainSchema(String originalRegexp) {

Review Comment:
   It should be private?



##########
pulsar-common/src/main/java/org/apache/pulsar/common/topics/TopicList.java:
##########
@@ -47,13 +47,16 @@ public static List<String> filterTopics(List<String> 
original, String regex) {
     }
     public static List<String> filterTopics(List<String> original, Pattern 
topicsPattern) {
 
-        final Pattern shortenedTopicsPattern = 
topicsPattern.toString().contains(SCHEME_SEPARATOR)
-                ? 
Pattern.compile(SCHEME_SEPARATOR_PATTERN.split(topicsPattern.toString())[1]) : 
topicsPattern;
+        final Pattern shortenedTopicsPattern = 
Pattern.compile(removeTopicDomainSchema(topicsPattern.toString()));

Review Comment:
   It's interesting. @poorbarcode Do you know why we need to remove the topic 
domain scheme? 



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