Github user revans2 commented on the pull request:

    https://github.com/apache/incubator-storm/pull/73#issuecomment-40658465
  
    I am fine with trying to do reflection to get the types, but that does not 
fit with lists and maps like you said.  Why don't we just use JSON, like we do 
on other parts of the config?  It is not strictly backwards compatible, but it 
allows for fairly arbitrary complexity, and the null check allows for things 
that JSON cannot parse to still be treated as a string.
    
    ```
    diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java 
b/storm-core/src/jvm/backtype/storm/utils/Utils.java
    index 7979e4b..6c8d2cf 100644
    --- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
    +++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
    @@ -168,9 +168,13 @@ public class Utils {
                 commandOptions = commandOptions.replaceAll("%%%%", " ");
                 String[] configs = commandOptions.split(",");
                 for (String config : configs) {
    -                String[] options = config.split("=");
    +                String[] options = config.split("=", 2);
                     if (options.length == 2) {
    -                    ret.put(options[0], options[1]);
    +                    Object val = JSONValue.parse(options[1]);
    +                    if (val == null) {
    +                      val = options[1];
    +                    }
    +                    ret.put(options[0], val);
                     }
                 }
             }
    ``` 


---
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