Skip to content

Commit

Permalink
Fix NPE in cmdTopics (apache#13450)
Browse files Browse the repository at this point in the history
  • Loading branch information
315157973 authored Dec 23, 2021
1 parent 37e6021 commit 76f3566
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,10 @@ private class GetInternalInfo extends CliCommand {
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));
Expand Down

0 comments on commit 76f3566

Please sign in to comment.