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

add DGM variant for Map#subMap supporting an array of keys

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1.0-beta-1
    • groovy-jdk
    • None
    • MAC OSX Leopard

    Description

      This snipset of groovy:

      def options = [deep: true, fields: true, other: true]
      def deep = "deep,fields".split(',')
      options.subMap(deep)
      

      fails with error:

      No signature of method: java.util.LinkedHashMap.subMap() is applicable for argument types: ([Ljava.lang.String;) values: [[deep, fields]]
      Possible solutions: subMap(java.util.Collection), dump(), spread(), sleep(long)
      

      Attachments

        Activity

          People

            paulk Paul King
            fbn79 Fabiano Taioli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: