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

Add @ClosureParams to each/eachWithIndex methods in DefaultGroovyMethods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not A Bug
    • 2.6.0-alpha-3, 3.0.0-alpha-2, 2.4.15, 2.5.0-rc-2
    • None
    • None
    • None

    Description

      Category methods each(T,Closure) and eachWithIndex(T,Closure) are missing @ClosureParams annotations.

      From some cursory testing, it looks like these are the necessary additions:

      public static <T> T each(T self, @ClosureParams(value=FromString.class, options={"T"}) Closure closure)
      
      public static <T> T eachWithIndex(T self, @ClosureParams(value=FromString.class, options="T,Integer") Closure closure)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: