You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eclipse does not show any errors in the "Problems" view. But the editor falsely flags an alleged error:
The error message is:
The method get(String, Callable<? extends Object>) in the type MemoizeAspect.MyCache<String,Object> is not applicable for the arguments (String, () -> {})
Please note:
As you can see in the third around-advice, when returning a fixed value instead of proceed() or proceed(arg1, args2) there is no problem.
When transforming the aspect into annotation-style, it also works. But in that case, we also need to wrap proceed() into a try-catch block handling Throwable, so the source code looks different.
Factoring out the Callable into a local variable like in the second around-advice works, too.
The text was updated successfully, but these errors were encountered:
kriegaex
changed the title
[AJDT] Eclipse editor falsely flags error when using 'proceed()' in lambda expression
Eclipse editor falsely flags error when using 'proceed()' in lambda expression
Mar 21, 2022
I am not sure if anyone still looks at AJDT Bugzilla, so I am recording this problem here, creating tracker bug #576017 in AJDT Bugzilla only.
While answering StackOverflow #69196740, I noticed the following problem in AJDT.
This aspect compiles and runs fine in Eclipse 2021-06 and AspectJ 1.9.7:
Eclipse does not show any errors in the "Problems" view. But the editor falsely flags an alleged error:
The error message is:
Please note:
proceed()
orproceed(arg1, args2)
there is no problem.proceed()
into a try-catch block handlingThrowable
, so the source code looks different.Callable
into a local variable like in the second around-advice works, too.The text was updated successfully, but these errors were encountered: