Fix NPE in cmdTopics
@@ -638,6 +638,10 @@ public class CmdTopics extends CmdBase {
void run() throws PulsarAdminException {
String topic = validateTopicName(params);
String internalInfo = getTopics().getInternalInfo(topic);
+ if (internalInfo == null) {
+ System.out.println("Did not find any internal metadata info");
+ return;
+ }
JsonObject result = JsonParser.parseString(internalInfo).getAsJsonObject();
Gson gson = new GsonBuilder().setPrettyPrinting().create();
System.out.println(gson.toJson(result));
