groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Di Tommaso <paolo.ditomm...@gmail.com>
Subject Re: @CompileStatic null iteration
Date Fri, 15 Dec 2017 07:28:48 GMT
Just found the same problem. This difference can introduce subtle bugs when
refactoring groovy code to CompileStatic.

I suggest to report a bug for that.


Cheers, Paolo


On Tue, Dec 12, 2017 at 12:45 AM, MG <mgbiz@arscreat.com> wrote:

> Hi guys,
>
> just a quick question since we came across it today when testing code that
> had been converted from dynamic to static Groovy: Is the behavior that
> statically compiled Groovy throws a NPE when the iterable to be iterated
> over is null (same as Java), while dynamically compiled Groovy uses the
> NullObject.iterator(), i.e. does not throw but instead iterates over an
> empty collection by design ?
>
> Cheers,
> mg
>
>
>

Mime
View raw message