Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.2
-
None
-
None
Description
The issue was created out of the following discussion from the Groovy dev mailing-list:
http://www.nabble.com/Inconsistency-in-GPath-td23427805.html
The following code fails with an NPE:
def data = [ [a: null], [a: [b: 1]], [a: [b: 2]] ] assert data.a.b.sum() == 3
On a DOM that would have been parsed out of some XML feed, the result would have been 3, as expected, but on a normal object graph (or here with nested lists/maps) it fails with an NPE.