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

[ [a:1, b:2, c:3] ].flatten() -> [ 1, 2, 3 ], but should be [ [a:1, b:2, c:3] ]

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-beta-1
    • 1.6-rc-2, 1.5.8, 1.7-beta-1
    • None
    • None
    • Patch relative to SVN revision 12775.
    • Patch

    Description

      Updated list#flatten/set#flatten so that maps are unadulterated.

      Going with this approach means that maps can safely be used in lists. This is commonly done as a kind of "pseudobean" for unit testing – it's how I first encountered this behavior.

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              robertfischer Robert Fischer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: