I had the same problem today, but in my case it was:
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'true' with class 'java.lang.Boolean' to class 'java.util.List'
The thing is, if you have something like this:
public List<Foo> method(){ methodThatReturnsTrue() }
Since Groovy uses the last return clause as the return value of the method, it tries to pass true to <some_not_boolean_type> , and so we are getting an error.
source share