Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5
-
Fix Version/s: 1.5.2
-
Component/s: groovy-jdk
-
Labels:None
-
Number of attachments :
Description
This would make computation more convenient, as I wouldn't have to explicitly check for the empty list.
GroovyMethodsTest currently asserts that [].sum() does in fact return null.
Is there some history to that? I think it makes sense for sum() to return zero for an empty list and that probably also makes sense for [null].