Bug when using lambdas in ITD methods

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bug when using lambdas in ITD methods

Alexander Kriegisch-2
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
_______________________________________________
aspectj-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bug when using lambdas in ITD methods

Andy Clement
I see you did raise this as an issue (I’ve been out for a few days) - yes your proposed solutions make sense. I’ll try to do one more 1.8.X release soon before I dive into the 1.9 work.

Andy

> On Mar 12, 2017, at 6:07 AM, Alexander Kriegisch <[hidden email]> wrote:
>
> 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
> _______________________________________________
> aspectj-users mailing list
> [hidden email]
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Loading...