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

    https://github.com/apache/storm/pull/1094#discussion_r52656968
  
    --- Diff: storm-core/src/jvm/org/apache/storm/utils/Utils.java ---
    @@ -330,7 +330,11 @@ public static Map readCommandLineOpts() {
             Map ret = new HashMap();
             String commandOptions = System.getProperty("storm.options");
             if (commandOptions != null) {
    -            String[] configs = commandOptions.split(",");
    +            /*
    +             below regex uses negative lookahead to not split in the 
middle of
    +             json objects '{}' or json arrays '[]'
    +              */
    +            String[] configs = 
commandOptions.split(",(?![^\\[\\]{}]*(]|}))");
    --- End diff --
    
    Sorry about the long pause.  I thought I had replied already, but I guess I 
didn't hit the merge comment button.  I forgot that the python was escaping all 
of the JSON characters, so like you said this works.
    
    I am OK with merging this in, but I would like an explanation by the REGEX 
explaining about the escaping in most cases and that this is not perfect for 
windows.
    
    It would also be good to have a follow on JIRA to solve this correctly with 
url encoding the parameters, but I don't know enough about windows to suggest 
how to do that.


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