groovy

Object.collect(Closure) fails to work on Set

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1-beta-2
  • Component/s: None
  • Labels:
    None
  • Environment:
    Debian GNU/Linux ; JDK 1.5.0_05 ; Groovy CVS 2005-11-28T11:00
  • Number of attachments :
    0

Description

The following script:

def a = [ 'a' , 'b' , 'c' , 'd' ] as Set
def c = a.collect { it + it }
println c.getClass ( ).getName ( ) + ": " + c

results in:

Caught: java.lang.ClassCastException: java.util.ArrayList
at kolesa.run(kolesa.groovy:8)
at kolesa.main(kolesa.groovy)

Activity

Hide
blackdrag blackdrag added a comment -

fixed

Show
blackdrag blackdrag added a comment - fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: