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

SpreadMap is horribly broken - isEmpty, containsKey, keySet etc. all fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.9, 2.2.0-beta-1, 2.1.7
    • 2.2.0-rc-3
    • None
    • None

    Description

      groovy.lang.SpreadMap implementation is incorrect.
      Of the Map contract, it correctly implements:
      size() get() equals() hashCode()

      The rest of the Map methods have incorrect (missing) implementations:
      isEmpty() keySet() containsKey() ..etc.

      Also, List.toSpreadMap() is broken since it returns an instance of SpreadMap.

      Attachments

        1. spreadmap-patch.txt
          5 kB
          Tim Tiemens

        Activity

          People

            paulk Paul King
            timtiemens Tim Tiemens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: