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

ConfigSlurper does not process nested closures correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: