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

CLONE - ConfigObject is unexpectedly no longer Cloneable

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.6, 2.1.0-beta-1
    • 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:
              Unassigned
              Reporter:
              johnrengelman John Engelman

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment