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 2022/09/05 21:04:59 UTC

[GitHub] [pulsar] nicoloboschi opened a new pull request, #17479: [improve][cli] Pulsar shell: fix custom commands execution

nicoloboschi opened a new pull request, #17479:
URL: https://github.com/apache/pulsar/pull/17479

   ### Motivation
   
   In Pulsar shell the custom commands don't work (PIP-201)
   
   ```
   java.lang.NullPointerException: Cannot invoke "java.lang.Class.getConstructor(java.lang.Class[])" because the return value of "java.util.Map$Entry.getValue()" is null
           at org.apache.pulsar.admin.cli.PulsarAdminTool.addCommand(PulsarAdminTool.java:218)
           at org.apache.pulsar.admin.cli.PulsarAdminTool.setupCommands(PulsarAdminTool.java:164)
           at org.apache.pulsar.admin.cli.PulsarAdminTool.setupAndRun(PulsarAdminTool.java:224)
           at org.apache.pulsar.admin.cli.PulsarAdminTool.run(PulsarAdminTool.java:229)
           at org.apache.pulsar.shell.AdminShell.runCommand(AdminShell.java:72)
           at org.apache.pulsar.shell.PulsarShell.run(PulsarShell.java:436)
           at org.apache.pulsar.shell.PulsarShell.run(PulsarShell.java:220)
           at org.apache.pulsar.shell.PulsarShell.main(PulsarShell.java:209)
   
   ```
   We just need to avoid the NPE because sometimes the setupCommands is called twice for prepare Pulsar shell commands for the autocompletion
   
   ### Modifications
   
   * Avoid NPE
   
   
   ### Verifying this change
   Verify both autocompletion and execution work correctly
   
   ### Documentation
   
   - [x] `doc-not-needed` 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- merged pull request #17479: [improve][cli] Pulsar shell: fix custom commands execution

Posted by GitBox <gi...@apache.org>.
Technoboy- merged PR #17479:
URL: https://github.com/apache/pulsar/pull/17479


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org