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

    https://github.com/apache/storm/pull/1142#discussion_r53898826
  
    --- 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 --
    
    replace `cl.getOptionValues(opt.shortName)` with `strings` to avoid 
duplicate getOptionValues


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to