@CompileStatic null iteration

2017-12-11 Thread MG
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

Re: Groovy code with Function or Predicate

2017-12-11 Thread Paul King
that or: wait.until(application as Function) Cheers, Paul. On Mon, Dec 11, 2017 at 8:46 PM, Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > I posted this too soon. > > This line > > Function application = { wd -> > wd.findElement(By.name("q"))} > > removes

Re: Groovy code with Function or Predicate

2017-12-11 Thread Mohan Radhakrishnan
I posted this too soon. This line Function application = { wd -> wd.findElement(By.name("q"))} removes that error. Hope this is the right way. Thanks, Mohan On 11 December 2017 at 15:06, Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > Hi, > > When I try to

Groovy code with Function or Predicate

2017-12-11 Thread Mohan Radhakrishnan
Hi, When I try to pass a lambda to a Selenium API call I see this error. Believe this version of Selenium uses Guava lambdas. I understand that I need to be explicit and specify whether it is a Function or a Predicate. But don't know how to do this with groovy. So here I may have to explicitly

Re: Is it possible to add GroovyObject methods via a category?

2017-12-11 Thread Paul King
3.0 is still some time away from being feature complete. On Mon, Dec 11, 2017 at 6:26 PM, Ruben Laguna wrote: > I see, thank you very much. > > I'll take a look at how to implement the methodMissing support since > I'm really interested on having this at some point in

Re: Is it possible to add GroovyObject methods via a category?

2017-12-11 Thread Ruben Laguna
I see, thank you very much. I'll take a look at how to implement the methodMissing support since I'm really interested on having this at some point in Groovy. Is there any chance to see this in Groovy 3.0 if you receive a satisfactory patch? or is too late for 3.0? Best regards/Rubén On Fri,