Bug 103267 - Runtime detection of bad extra argument to proceed
Summary: Runtime detection of bad extra argument to proceed
Status: RESOLVED INVALID
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-10 01:44 EDT by Ron Bodkin CLA
Modified: 2005-07-10 01:53 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Bodkin CLA 2005-07-10 01:44:47 EDT
C:\devel\scratch\worker>ajc WorkerExample.aj

C:\devel\scratch\worker>java WorkerExample
java.lang.NoSuchMethodError: makeESJP
        at ConcreteAlpha.<clinit>(WorkerExample.aj:23)
        at WorkerExample$1.run(WorkerExample.aj:1)
        at WorkerExample.main(WorkerExample.aj:19)

From this test program:

public abstract aspect WorkerExample {

    after() returning (RequestContext newContext) : call(RequestContext+.new
(..)) {        
        System.out.println("constructing "+newContext+" 
at "+thisJoinPoint.toLongString()+" 
from "+thisEnclosingJoinPointStaticPart+":");
    }

    public abstract class RequestContext {
        public final Object execute() {
            return doExecute();
        }
        
        /** template method */
        public abstract Object doExecute();
    }

    public static void main(String args[]) {
        new Runnable() {
            public void run() {}
        }.run();
    };
}

aspect ConcreteAlpha extends WorkerExample {

    Object around(final Object runnable) : execution(void Runnable.run()) && 
this(runnable) {
        System.out.println("monitoring operation: "+runnable+" 
at "+thisJoinPoint+", for "+thisJoinPoint.getThis());
        RequestContext requestContext = new RequestContext() {
            public Object doExecute() {
                return proceed(runnable);
            }
            
        };
        return requestContext.execute();
    }
    
}

aspect ConcreteBeta extends WorkerExample {
    
    Object around() : call(void awqeyuwqer()) {
        RequestContext requestContext = new RequestContext() {
            public Object doExecute() {                
                return proceed();
            }
            
        };
        return requestContext.execute();
    }

    
}
Comment 1 Ron Bodkin CLA 2005-07-10 01:53:32 EDT
looks like this was an environment problem trying to isolate on the command 
line ... the real bug report is next