Re: anonymous classes versus lambda expression

2019-10-11 Thread Babak Vahdat
Yeah you’re right. I had to ask in dev mailing list before starting with this task. My fault. Babak > On 11 Oct 2019, at 11:47, Claus Ibsen wrote: > > On Fri, Oct 11, 2019 at 11:32 AM Luca Burgazzoli > wrote: >> >> I would evaluate to replace anonymous classes w

Re: anonymous classes versus lambda expression

2019-10-11 Thread Zoran Regvart
Hi Babak, On Fri, Oct 11, 2019 at 11:16 AM Babak Vahdat wrote: > Which IDE do you make use of? I tried it using eclipse which is a bit buggy > and I had to manually fix a lot of changes it made by hand (I wish I had > tried it with IntelliJ first). Currently more than 3K outgoing changes in my

Re: anonymous classes versus lambda expression

2019-10-11 Thread Andrea Cosentino
I don't think it is the best moment to do this while on RC sequence before GA. Il giorno ven 11 ott 2019 alle ore 10:12 Babak Vahdat < babak.vah...@swissonline.ch> ha scritto: > Hi > > Would it make sense to you if we would change all the anonymous classes in > Camel codebase to lambda expression

Re: anonymous classes versus lambda expression

2019-10-11 Thread Claus Ibsen
On Fri, Oct 11, 2019 at 11:32 AM Luca Burgazzoli wrote: > > I would evaluate to replace anonymous classes with lambda as per case by > case as i.e. capturing lambdas may be a source of massive allocations, also > we need to take into account how they impact meta space allocations. > Yes be a bit

Re: anonymous classes versus lambda expression

2019-10-11 Thread Claus Ibsen
On Fri, Oct 11, 2019 at 11:16 AM Babak Vahdat wrote: > > Hi Zoran > > Which IDE do you make use of? I tried it using eclipse which is a bit buggy > and I had to manually fix a lot of changes it made by hand (I wish I had > tried it with IntelliJ first). Currently more than 3K outgoing changes in

Re: anonymous classes versus lambda expression

2019-10-11 Thread Luca Burgazzoli
I would evaluate to replace anonymous classes with lambda as per case by case as i.e. capturing lambdas may be a source of massive allocations, also we need to take into account how they impact meta space allocations. --- Luca Burgazzoli On Fri, Oct 11, 2019 at 11:16 AM Babak Vahdat wrote: > H

Re: anonymous classes versus lambda expression

2019-10-11 Thread Babak Vahdat
Hi Zoran Which IDE do you make use of? I tried it using eclipse which is a bit buggy and I had to manually fix a lot of changes it made by hand (I wish I had tried it with IntelliJ first). Currently more than 3K outgoing changes in my workspace with all tests & checkstyle rules passing locally.

Re: anonymous classes versus lambda expression

2019-10-11 Thread Zoran Regvart
Hi Babak, I like lambdas as a concise way of writing callbacks and short stateless functions. I have my IDE auto replace inner classes with lambdas where applicable. I wouldn't use them on hot paths as they incur a deeper stack. On hot paths I'd prefer that we use stateless anonymous classes and a

Re: anonymous classes versus lambda expression

2019-10-11 Thread Omar Al-Safi
It will pretty nice indeed to have a lambda instead of the anonymous classes, not sure how much of the existing code will it break though. On Fri, 11 Oct 2019 at 10:12, Babak Vahdat wrote: > Hi > > Would it make sense to you if we would change all the anonymous classes in > Camel codebase to lam