poorbarcode commented on code in PR #23052:
URL: https://github.com/apache/pulsar/pull/23052#discussion_r1685786473
##########
pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java:
##########
@@ -79,11 +78,7 @@ public static TopicName get(String domain, String tenant,
String cluster, String
}
public static TopicName get(String topic) {
- try {
- return cache.get(topic);
- } catch (ExecutionException | UncheckedExecutionException e) {
- throw (RuntimeException) e.getCause();
- }
+ return cache.computeIfAbsent(topic, k -> new TopicName(k));
Review Comment:
Answered
[here](https://github.com/apache/pulsar/pull/23052#issuecomment-2241487669)
--
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]