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

Make CompilerConfiguration copying version independent

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-rc-3
    • 1.1-rc-3
    • None
    • None
    • Patch

    Description

      With the current interface, a CompilerConfiguration cannot be modified in a version independent manner because the user code must know all of the properties in the class. This improvement adds a copy constructor so that an existing CompilerConfiguration can be duplicated so that the user code can then set the particular properties they need to.

      As part of this improvement, a 'getConfigurationProperties' method is added which returns a Properties value that is suitable for the CompilerConfiguration(Properties) constructor.

      While coding this change a bug was uncovered. The "groovy.recompile.minimumInterval" property is misspelled as "groovy.recompile.minimumIntervall" (note the extra "l"). That is fixed by the patch as well.

      A fairly thorough test case is included to ensure no harm is done by this change.

      Attachments

        1. compiler-config.patch
          13 kB
          James P. White

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              jimwhite James P. White
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: