groovy
  1. groovy
  2. GROOVY-6304 Configslurper Issues
  3. GROOVY-3334

ConfigSlurper Fails when ordering of Nested Elements changes

    Details

    • Type: Sub-task Sub-task
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.6, 1.6-rc-2
    • Fix Version/s: None
    • Component/s: groovy-jdk
    • Labels:
      None
    • Environment:
      Windows
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      Config Slurper fails with nested elements depending on the order specified. For example:

      This Fails
              def config = new ConfigSlurper().parse('''
              foo {
                  fruit.citrus="orange"
                  bar {
                      fruit.citrus="lemon"
                  }
              }
              ''')
      
              assertEquals "lemon", config.foo.bar.fruit.citrus
              assertEquals "orange", config.foo.fruit.citrus
      
      This Passes
              def config = new ConfigSlurper().parse('''
              foo {
                  bar {
                      fruit.citrus="lemon"
                  }
                  fruit.citrus="orange"
              }
              ''')
      
              assertEquals "lemon", config.foo.bar.fruit.citrus
              assertEquals "orange", config.foo.fruit.citrus
      

        Activity

        Guillaume Laforge made changes -
        Field Original Value New Value
        Assignee Graeme Rocher [ graemerocher ]
        Pascal Schumacher made changes -
        Assignee Graeme Rocher [ graemerocher ]
        Pascal Schumacher made changes -
        Parent GROOVY-6304 [ 148075 ]
        Issue Type Bug [ 1 ] Sub-task [ 7 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Fairless
          • Votes:
            8 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: