Bug 262154 - MissingImplementationException at EclipseSourceType.java:705
Summary: MissingImplementationException at EclipseSourceType.java:705
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P2 major (vote)
Target Milestone: 1.6.4   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-23 07:37 EST by iwein@fuld.net CLA
Modified: 2009-01-23 13:28 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iwein@fuld.net CLA 2009-01-23 07:37:38 EST
On experimenting with aspectj I was suddenly asked politely by ajdt to log a bug here:

steps:

Take code snippet (rename classes, autogenerate code, i.e make it compile):
@Aspect
@SuppressWarnings("unchecked")
public class DeliveryCallbackInterceptor {
	@Pointcut("execution(boolean org.springframework.integration.message.MessageHandler+.handleMessage(Message))&& args(message)")
	public void handleMethod(Message message){}
	
	@AfterThrowing(pointcut="handleMethod(message)", throwing="e")
	public void invokeDeliveryCallback(Message message, Throwable e){
		((DeliveryFailureCallback) message.getHeaders().get("errorcallback")).onDeliveryFailed(message, e);
	}
}

1. place the cursor after 'pointcut="handleMethod(message'
2. type ', e'
3. save
RESULT:
org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType$MissingImplementationException
at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.generateElementValue(EclipseSourceType.java:705)
at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.generateAnnotation(EclipseSourceType.java:682)
at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.convertEclipseAnnotation(EclipseSourceType.java:636)
at org.aspectj.a ... urceType$MissingImplementationException thrown: Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value ["unchecked"]

I can reproduce this consistently by closing the error dialog and repeating the steps (saving after each change).
Comment 1 Andrew Eisenberg CLA 2009-01-23 11:39:54 EST
Seems related to Bug 255555
Comment 2 Andrew Clement CLA 2009-01-23 12:05:45 EST
It isnt quite the same as 255555 - that was the problems of:
- asking an EclipseType to hold an annotation, which should never be asked.
- including extra parentheses around a declare annotation.

This bug is similar to bug 238992, comment 11.

Annotation conversion logic is not 100% fleshed out in some places - due to their being so many combinations.  So the common ones are implemented and others are implemented as they come up.  I am surprised that array annotation values are not behaving.  I'll get on it.

Comment 3 Andrew Clement CLA 2009-01-23 12:50:28 EST
Surprising, but the problem was due to it being unable to promote the string to an array (for SuppressWarnings). I'd have thought that would have been hit before - but I guess it does require a particular combination of files to be built on an incremental compile to trigger it, and I imagine @SuppressWarning(["abc"]) would work ok.

Fixed for 1.6.4 - thanks for the testcase and recreation instructions.  Still quite a few MissingImplementation exceptions in that code - glad I didn't flesh it out originally since some of these paths must be rather uncommon...
Comment 4 iwein@fuld.net CLA 2009-01-23 13:28:57 EST
If only more bugs were as easy to report as this one...