groovy

'in' with an array always returns false

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.5.1
  • Fix Version/s: 1.5.2
  • Component/s: None
  • Labels:
    None
  • Environment:
    java 6, Windows XP SP2
  • Number of attachments :
    0

Description

'in' always returns false with an array:

String[] array1 = [ "test1", "test2" ]
assert !( "test1" in array1 )
assert !( "test3" in array1 )

Activity

Hide
Guillaume Laforge added a comment -

Right, arrays should behave like collections.

Show
Guillaume Laforge added a comment - Right, arrays should behave like collections.
Hide
Paul King added a comment -

now isCase(Object, value) is array aware

Show
Paul King added a comment - now isCase(Object, value) is array aware
Hide
Paul King added a comment -

close off release 1.5.4

Show
Paul King added a comment - close off release 1.5.4

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: