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

ConfigObject is unexpectedly no longer Cloneable

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 2.1.0-beta-1, 1.8.9
    • Fix Version/s: 2.1.0-rc-1, 2.0.7
    • Component/s: None
    • Labels:
      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

            • Assignee:
              pschumacher Pascal Schumacher
              Reporter:
              dhdaines David Huggins Daines
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: