Skip to content

Commit e88dd75

Browse files
committed
Revert unnecessary changes
1 parent 9aec03a commit e88dd75

2 files changed

Lines changed: 1 addition & 78 deletions

File tree

microbench/src/main/java/org/apache/pulsar/broker/qos/TopicNameBenchmark.java

Lines changed: 0 additions & 69 deletions
This file was deleted.

pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,8 @@ public static String getPattern(String topic) {
110110
return "^" + Pattern.quote(get(topic).getPartitionedTopicName().toString()) + "$";
111111
}
112112

113-
/**
114-
* The constructor from a topic name string. The difference from {@link TopicName#get(String)} is that the `get`
115-
* method can leverage the built-in cache mechanism, which can be slightly faster, but at the cost of higher JVM
116-
* memory usage that could lead to unnecessary GC, as well as potentially OOM in extreme cases.
117-
* You can benchmark `TopicName.get(topic)` and `new TopicName(topic)` to see the actual performance gap.
118-
*
119-
* @param completeTopicName the topic name
120-
*/
121113
@SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION")
122-
public TopicName(String completeTopicName) {
114+
private TopicName(String completeTopicName) {
123115
try {
124116
// The topic name can be in two different forms, one is fully qualified topic name,
125117
// the other one is short topic name

0 commit comments

Comments
 (0)