Community
Participate
Working Groups
Created attachment 280509 [details] Sample project reproducing the problem Sorry to be so unspecific with the topic description, but I do not know what is happening here and what exactly causes the error. The problem was reported here first: https://stackoverflow.com/questions/58626598 I am attaching a sample project reproducing the problem. It starts occurring in AspectJ 1.9.3 and persists in 1.9.4. Downgrading to 1.9.2 solves the problem, so something that was changed in the compiler after 1.9.2 must cause the issue. First I thought it was related to JUnit 5 (Jupiter), but it is not, it also occurs when running the woven code with a sample main(..) method. So you have a choice running 'mvn clean test' or just compiling manually from CLI or IDE with AspectJ 1.9.4 and then running AspectSimple.main(..) and check the end of the log output (NullPointerException instead of the expected CustomException). It looks as if something was off with thrown exception propagation to another around advice, but this is just speculation.
I think this was due to a tweak I put in to 1.9.3: https://bugs.eclipse.org/bugs/show_bug.cgi?id=333274 In there I wrote: I did have to tweak the code gen to inject that finally block, probably the bit of code I'm most nervous about but all existing tests are passing. I'll keep an eye on feedback once the release is out. Then in 1.9.4 someone raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=547808 which I have fixed already. And indeed trying 1.9.5.BUILD-SNAPSHOT with this test project works for me (phew). So I think it is already fixed. I've finished the upgrade to Java13, I just want to address one more thing before putting out 1.9.5.
My retest with 1.9.5 was successful, thanks Andy. :-)