Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2358

ConfigSlurper does not process nested closures correctly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      windows xp, jdk 1.6,

      Description

      I have questions regarding the equivalence or non-equivalence of nesting vs '.' notation for config items
      and why braces do not appear to result in 'nested' values ...
      for example:

      foo {
          bar {
              password="value"
          }
          fruit="orange"
      }
      

      produces a ConfigObject containing foo.bar

      {password="value",fruit="orange"}

      (i.e., the 'fruit' item is nested under 'bar')

      while

      foo {
          bar.password="value"
          fruit="orange"
      }
      

      produces a ConfigObject containing foo{bar

      {password="value"}

      ,fruit="orange"}
      'bar' and 'fruit' are siblings, with bar having a child (password) ...

        Attachments

          Activity

            People

            • Assignee:
              graemerocher Graeme Rocher
              Reporter:
              brassrat Jay Goldman
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: