[ 
https://issues.apache.org/jira/browse/STORM-1572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163289#comment-15163289
 ] 

ASF GitHub Bot commented on STORM-1572:
---------------------------------------

Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1142#discussion_r53965439
  
    --- Diff: storm-core/src/jvm/org/apache/storm/command/CLI.java ---
    @@ -238,10 +238,13 @@ public CLIBuilder arg(String name, Parse parse, Assoc 
assoc) {
                 DefaultParser parser = new DefaultParser();
                 CommandLine cl = parser.parse(options, rawArgs);
                 HashMap<String, Object> ret = new HashMap<>();
    -            for (Opt opt: opts) {
    +            for (Opt opt : opts) {
                     Object current = null;
    -                for (String val: cl.getOptionValues(opt.shortName)) {
    -                    current = opt.process(current, val);
    +                String[] strings = cl.getOptionValues(opt.shortName);
    +                if (strings != null) {
    +                    for (String val : cl.getOptionValues(opt.shortName)) {
    --- End diff --
    
    The change is minor so I will do it as I merge it in.


> throw NPE when parsing the command line arguments by CLI
> --------------------------------------------------------
>
>                 Key: STORM-1572
>                 URL: https://issues.apache.org/jira/browse/STORM-1572
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: John Fang
>            Assignee: John Fang
>            Priority: Blocker
>
> $ storm kill test
> Running: /data/nfs_share/soft/jdk1.7.0_79/bin/java -client -Ddaemon.name= 
> -Dstorm.options= -Dstorm.home=/data/nfs_share/soft/storm 
> -Dstorm.log.dir=/home/admin/storm_logs -Djava.library.path=/usr/local/lib 
> -Dstorm.conf.file= -cp 
> /data/nfs_share/soft/storm/lib/servlet-api-2.5.jar:/data/nfs_share/soft/storm/lib/slf4j-api-1.7.7.jar:/data/nfs_share/soft/storm/lib/log4j-over-slf4j-1.6.6.jar:/data/nfs_share/soft/storm/lib/reflectasm-1.07-shaded.jar:/data/nfs_share/soft/storm/lib/log4j-api-2.1.jar:/data/nfs_share/soft/storm/lib/storm-core-2.0.0-SNAPSHOT.jar:/data/nfs_share/soft/storm/lib/log4j-core-2.1.jar:/data/nfs_share/soft/storm/lib/kryo-2.21.jar:/data/nfs_share/soft/storm/lib/clojure-1.7.0.jar:/data/nfs_share/soft/storm/lib/log4j-slf4j-impl-2.1.jar:/data/nfs_share/soft/storm/lib/minlog-1.2.jar:/data/nfs_share/soft/storm/lib/disruptor-3.3.2.jar:/data/nfs_share/soft/storm/lib/asm-4.0.jar:/home/admin/.storm:/data/nfs_share/soft/storm/bin
>  org.apache.storm.command.KillTopology test
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.storm.command.CLI$CLIBuilder.parse(CLI.java:243)
>         at org.apache.storm.command.KillTopology.main(KillTopology.java:33)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to