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

CLONE - ConfigObject is unexpectedly no longer Cloneable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.6, 2.1.0-beta-1
    • 2.1.0-rc-1, 2.0.7
    • None
    • None

    Description

      The reimplementation of ConfigObject is no longer Cloneable. So if your code relied on being able to clone a ConfigObject, it now throws an exception.

      Sample program which used to work and doesn't anymore:

      ConfigSlurper slurper = new ConfigSlurper();
      ConfigObject conf = slurper.parse("""
      foo {
         bar = "baz"
      }
      """);
      println conf.foo.bar
      ConfigObject conf2 = conf.clone()
      conf2.foo.bar = "quux"
      println conf2.foo.bar
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            johnrengelman John Engelman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: