Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Compile error

Hi Joel,

That is certainly fixed in more recent builds, I just tried it:

C:\temp\canoworms>ajc -version
AspectJ Compiler 1.5.4 built on Thursday Dec 20, 2007 at 13:44:10 GMT

C:\temp\canoworms>ajc Ev*.java -1.5

C:\temp\canoworms\ [error] The type new EventListener<Ev.SomeEvent>(){}
 must implement the inherited abstract method EventListener<Ev.SomeEvent>.handle
EventListener<SomeEvent> s = new EventListener<SomeEvent>() {

1 error


C:\temp\canoworms>set ASPECTJ_HOME=c:\aspectj161

C:\temp\canoworms>ajc -version
AspectJ Compiler 1.6.1 (1.6.1 - Built: Thursday Jul 3, 2008 at 18:35:41 GMT) - Eclipse Compiler 0.785_R33x, 3.3

C:\temp\canoworms>ajc Ev*.java -1.5

no errors.

However, I don't know how to adjust your maven stuff...


2008/8/13 <joel@xxxxxxxxxxx>
I have an interface like this:

public interface EventListener<EVENTTYPE>
       <EV extends EVENTTYPE> void handle(EV event);

And I'm creating a class that implements it such as:

EventListener<SomeEvent> s = new EventListener<SomeEvent>() {
                       public <V extends SomeEvent> void handle(final V event)
// ...

I have tried it in non-anonymous case as well.
Compilation gives an error saying:

The type new EventListener<SomeEvent>(){} must implement the inherited
abstract method EventListener<SomeEvent>.handle(EV)

When using the eclipse or javac compiler, there is no error.

To complicate the question, I'm using maven for build, this for the compiler:

And I think that results in aspectj 1.5.4 being used, though if you
know how to change it so it will use more recent, please tell me.

aspectj-users mailing list

Back to the top