Adding "&& execution(* *(..))" to my pointcut definition solves the VerifyError. I haven't completely verified, that the modification does not cause any undesired side effects on the business modules, but it looks promising.
Executing the unit test in my example project using aspectj 1.8.2 rather than 1.7.4 makes no difference - the VerifyError still exists.
I have, as you suggested, raised a bug describing the issue, mainly because in my humble opinion, the aspectj compiler should not produce bytecode that is considered invalid by the oracle JVM. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=443477).
Jochen Kohler | Software Architect | Managed & Personalized HealthCare
InterComponentWare AG | Altrottstraße 31 | 69190 Walldorf (Baden) | Germany
Tel.: +49 (0) 6227 385 38 86 | Fax: +49 (0) 6227 385 471
jochen.kohler@xxxxxx |
www.icw.deTo: aspectj-users@xxxxxxxxxxx
From: Andy Clement
Sent by: aspectj-users-bounces@xxxxxxxxxxx
Date: 09/05/2014 06:25PM
Subject: Re: [aspectj-users] "java.lang.VerifyError: Bad <init> method call from after the start of a try block" with jdk_1.7.0_67
A quick observation, the use of cflow(within(...)) is going to advise a lot of places with calls to increment/decrement flow counters, perhaps too many. Do you think this variant would capture your intent?
pointcut insideTrustedPackage():
within(com.icw.ehf.aspectj.lab.service..*) && execution(* *(..));