null isn't always null...

The difference of printing and object, or printing an object's toString output...

If you have a Todo() class with a toString() method like this:

String toString(){
return description
}

This code:

class BootStrap {

def init = { servletContext ->
println "bootstrap init start"
def mytask = new Todo(name:"testtask")
assert (mytask != null)
println "mytask is " + mytask
mytask.save()
println "bootstrap init end"
}
def destroy = {
}
}

will always return

bootstrap init start
null
bootstrap init end

and it's not possible to see the difference if the value of mytask is actually null, or the mytask is an object that has a description being null, and therefore this toString output.

Because of this I just ended up debugging for quite a while.