Skip to main content

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

FTR, for anyone paying attention, I was attempting to introduce an ITD method marked as "private" in the declaring aspect into a class that had the same method but that was marked "public" and the compiler was not emitting a warning or an error, so it went bang at runtime.


On Mon, Apr 1, 2013 at 10:29 AM, Matthew Adams <matthew@xxxxxxxxxxxxxxx> wrote:

On Mon, Apr 1, 2013 at 10:13 AM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
Hmmm, I had to fix up some of your sample code there as it doesn't actually work as it is. (Is Go an annotation or an aspect - you've used it as both...)

Sorry for the "Go" confusion.  I was giving the shape of the problem and needed an annotation to drive the aspect and didn't realize that name collision.
 
I changed it to this:
... [snip] ...
That looks correct.
 
Compiles and runs fine for me:

> ajc -1.5 *.java -showWeaveInfo
Type 'GoA$I' (GoA.java) has intertyped method from 'GoA' (GoA.java:'void GoA$I.go()')
Extending interface set for type 'Foo' (Foo.java) to include 'GoA$I' (GoA.java)

> java TestFoo
go

As we discussed a little the other day. An ITD on an interface is considered a 'default implementation' as the implementation a class will get that implements the interface if it does not provide its own.

Agreed, as I understood. 

If I could recreate your problem I could investigate...

I'm seeing this in my real codebase.  I gave repro steps for the codebase you have access to at https://bugs.eclipse.org/bugs/show_bug.cgi?id=404601.  Note that it's on a branch called "ajc-404601". The exception is still reproducible for me (JDK 1.6).

I'd appreciate a look. I'll review what I'm doing to ensure that I've correctly reflected the shape of the problem as well.

-matthew
--
mailto:matthew@xxxxxxxxxxxxxxx 



--
mailto:matthew@xxxxxxxxxxxxxxx 
skype:matthewadams12
googletalk:matthew@xxxxxxxxxxxxxxx
http://matthewadams.me
http://www.linkedin.com/in/matthewadams

Back to the top