Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Bug when using lambdas in ITD methods

Hi Andy.

I wanted to create a bug ticket, but Eclipse Bugzilla has been down for hours. I notified the webmaster wvia e-mail, but until now there was no reaction.

Meanwhile, would you mind taking a look at http://stackoverflow.com/a/42747116/1082681? There is sample code reproducing the problem. In addition to what I wrote there, here is some javap output:

  private static boolean lambda$0(de.scrum_master.app.Apple);
    Code:
       0: aload_0
       1: invokevirtual #90                 // Method de/scrum_master/app/Apple.isSweet:()Z
       4: ifeq          11
       7: iconst_0
       8: goto          12
      11: iconst_1
      12: ireturn

As you can see, the lambda is declared private. This is why the aspect's ITD method dispatcher cannot call it. So the solution would be to either declare the lambda within the aspect like the dispatcher or to make the lambda public.

Regards
-- 
Alexander Kriegisch
https://scrum-master.de


Back to the top