Understanding findAll in Groovy
<p>Consider the following code:</p>

<pre><code>String emptyString = '''

        '''
println "After trimming empty string has size: " + emptyString.trim().size()
println "Number of non empty elements in array: " + ([emptyString, 'kshitiz'].findAll({ it.trim() != 0}).size())
</code></pre>

<p>I expect the output to be <code>1</code>. However the output is:</p>

<pre><code>After trimming empty string has size: 0
Number of non empty elements in array: 2
</code></pre>

<p>I suspect that I may be missing something basic here but can't quite figure out what.</p>