Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.8.1
-
Component/s: groovy-jdk
-
Labels:None
-
Environment:This box right here.
-
Testcase included:yes
-
Number of attachments :
Description
[ null, 'ah' ].findAll()
throws a NullPointerException with no error message which is a bit odd because I can write [][1] and get null back.
Essentially, Groovy is very lax (in a good way) in most parts but not here.
I'd implement a default Closure that just casts each argument to boolean, which i think [ null, 'ah' ].findAll
{ it }would.
This might apply to more methods than just findAll(). ![]()
Due to
GROOVY-4893, this is now fixed