cbornet commented on code in PR #20658:
URL: https://github.com/apache/pulsar/pull/20658#discussion_r1247697835
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -306,7 +306,7 @@ private CompletableFuture<Optional<URL>>
internalGetWebServiceUrl(Optional<Servi
}
CompletableFuture<Optional<LookupResult>> future =
ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)
- ? loadManager.get().findBrokerServiceUrl(topic, bundle) :
+ ?
loadManager.get().findBrokerServiceUrl(Optional.ofNullable(topic), bundle) :
Review Comment:
I think so.
`@Nullable` indicates to the caller the topic can be null.
Since it can be null we need to use `Optional.ofNullable()` when wrapping it
into an Optional.
--
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]