[GRADLE-2045] Regression: odd NPE from findAll()/each() Created: 12/Jan/12  Updated: 04/Jan/13  Resolved: 12/Jan/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-6, 1.0-milestone-7
Fix Version/s: None

Type: Bug
Reporter: Peter Ledbrook Assignee: Luke Daley
Resolution: Not A Bug Votes: 0

Attachments: Zip Archive grails-howtos.zip    


This bug affects both the Grails user guide project build and the new Grails HOWTOs one. Basically, I have a task that uses a version of the Radeox DocEngine to produce HTML. With Gradle 1.0 M4, this worked fine if that task ran multiple times (once for each supported language). However, starting at least with 1.0 M6 the second execution of the task threw a NullPointerException.

Interestingly, this NPE appears to come from Groovy's findAll() and each() methods, which are supposed to be null-safe (they're implemented via a category after all).

I've attached a sample project that reproduces the problem. Simply run ./gradlew clean docs. I can fix my build by editing HowToDocEngine.groovy and using the null-safe operator on the engineProperties property.

Comment by Luke Daley [ 12/Jan/12 ]

This is a problem with Groovy 1.8.5. I've spoken to Jochen about it.

Comment by Peter Ledbrook [ 24/Jan/12 ]

The Groovy issue: http://jira.codehaus.org/browse/GROOVY-5248

Generated at Wed Jun 30 12:11:18 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.