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

Inconsistency when generating sets

    XMLWordPrintableJSON

Details

    Description

      The following code:

      def set = [] as Set
      

      will generate a LinkedHashSet, but this one:

      Set set = []
      

      generates a simple HashSet. For consistency, it would be better if both created a LinkedHashSet.

      Attachments

        Activity

          People

            paulk Paul King
            melix Cédric Champeau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: