You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/04 21:53:46 UTC
[GitHub] [pulsar] merlimat commented on a change in pull request #9782: Add NPE check for PulsarService#getAdminClient
merlimat commented on a change in pull request #9782:
URL: https://github.com/apache/pulsar/pull/9782#discussion_r587853284
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -1166,7 +1166,13 @@ public synchronized PulsarAdmin getAdminClient() throws PulsarServerException {
if (this.adminClient == null) {
try {
ServiceConfiguration conf = this.getConfiguration();
- String adminApiUrl = conf.isBrokerClientTlsEnabled() ? webServiceAddressTls : webServiceAddress;
+ final String adminApiUrl = conf.isBrokerClientTlsEnabled() ? webServiceAddressTls : webServiceAddress;
+ if (adminApiUrl == null) {
+ throw new IllegalArgumentException("Web service address does not set properly "
Review comment:
```suggestion
throw new IllegalArgumentException("Web service address was not set properly "
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org