Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import static org.apache.commons.lang3.StringUtils.isNotBlank;

import java.io.FileInputStream;
import java.net.MalformedURLException;
import java.util.Arrays;
import java.util.Properties;

Expand Down Expand Up @@ -65,7 +64,7 @@ public class PulsarClientTool {
CmdProduce produceCommand;
CmdConsume consumeCommand;

public PulsarClientTool(Properties properties) throws MalformedURLException {
public PulsarClientTool(Properties properties) {
this.serviceURL = StringUtils.isNotBlank(properties.getProperty("brokerServiceUrl"))
? properties.getProperty("brokerServiceUrl") : properties.getProperty("webServiceUrl");
// fallback to previous-version serviceUrl property to maintain backward-compatibility
Expand All @@ -90,7 +89,7 @@ public PulsarClientTool(Properties properties) throws MalformedURLException {
commandParser.addCommand("consume", consumeCommand);
}

private void updateConfig() throws UnsupportedAuthenticationException, MalformedURLException {
private void updateConfig() throws UnsupportedAuthenticationException {
ClientBuilder clientBuilder = PulsarClient.builder();
Authentication authentication = null;
if (isNotBlank(this.authPluginClassName)) {
Expand Down Expand Up @@ -121,10 +120,6 @@ public int run(String[] args) {
try {
this.updateConfig(); // If the --url, --auth-plugin, or --auth-params parameter are not specified,
// it will default to the values passed in by the constructor
} catch (MalformedURLException mue) {
System.out.println("Unable to parse URL " + this.serviceURL);
commandParser.usage();
return -1;
} catch (UnsupportedAuthenticationException exp) {
System.out.println("Failed to load an authentication plugin");
commandParser.usage();
Expand Down