groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <mg...@arscreat.com>
Subject @CompileStatic null iteration
Date Mon, 11 Dec 2017 23:45:38 GMT
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