[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Problem with generic aspects
|
A verifyerror is a bug - you should raise an AspectJ bug. If you were
doing something wrong it should be an error message at compile time,
not an error at runtime.
cheers,
Andy.
On 06/04/2008, Ivar Rummelhoff <ivarru@xxxxxxxxx> wrote:
> Hello,
> I do not know if this is a known bug/limitation or I am doing
> something wrong, but I get a runtime exception when I try the
> following example:
>
>
> public abstract aspect GenAsp<T> {
> public abstract T transform(T x);
> T around() : execution(T *(*)) {return transform(proceed());}
> }
> public aspect IntAsp extends GenAsp<Integer> {
> public Integer transform(Integer x) {return x;} // identity transformation
> }
> public class IntAspTest {
> static Integer mylength(String x) {return x.length();}
> public static void main(String[] args) {System.out.println(mylength(""));}
> }
>
>
> The exception I get is:
> java.lang.VerifyError: (class: IntAsp, method: transform signature:
> (Ljava/lang/Integer;)Ljava/lang/Integer;) Wrong return type in
> function
> I believe I am using the latest versions of Java (1.6.0_05) and
> AspectJ (1.6.0m2).
>
> Kind regards,
>
> Ivar Rummelhoff
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>