Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AbstractMethodError calling method defined on class receiving ITD of same method

Hi all,

I want to make sure I haven't misunderstood AspectJ's treatment of the
following scenario, as I'm getting an AbstractMethodError in 1.7.2. 
Conceptual code example follows.

@Go
public class Foo {
  public void go() { System.out.println("go"); }
}
=====
public aspect Go {
  public interface I {}
  declare parents: (@Go *) implements I;
  public void I.go() { System.out.println("aspect-go"); }
}
=====
public void TestFoo {
  @Test
  public void testGo() { new Foo().go(); } // throws AbstractMethodError
}

My current understanding is that AspectJ sees that the method "public void
go()" is already defined on a class matching the "declare parents" clause
and simply doesn't introduce the method from the aspect.  If that's correct,
then I think I'm seeing a bug.

I'm getting no compiler warnings or errors from ajc, leading me to believe
that everything is hunky dorey, then I get an AbstractMethodError upon the
call to go().

Thanks,
Matthew




--
View this message in context: http://aspectj.2085585.n4.nabble.com/AbstractMethodError-calling-method-defined-on-class-receiving-ITD-of-same-method-tp4650821.html
Sent from the AspectJ - users mailing list archive at Nabble.com.


Back to the top