Bug 138143 - NullPointerException when duplicated method name is used
Summary: NullPointerException when duplicated method name is used
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: IDE (show other bugs)
Version: 1.5.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.2   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-23 12:03 EDT by Moritz Post CLA
Modified: 2006-04-26 08:09 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 Moritz Post CLA 2006-04-23 12:03:05 EDT
When developing aspects as annotations, i get a NullPointerException when saving a source file which has duplicated method names. Obviously that also breaks the java code itself but it also pops up an aspectj message info.

Here is a sample code:

@Aspect
public class AspectClass{
	
	@Pointcut("call(@Incoming * *(..))")
	public void incomingMessage() {
	}

	
	@Pointcut("call(@Activity * *(..))")
	public void incomingMessage() {
	}
	
}

The npe is the following:

java.lang.NullPointerException
at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.makeResolvedPointcutDefinition(EclipseSourceType.java:217)
at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.fillDeclaredMembers(EclipseSourceType.java:188)
at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.getDeclaredPointcuts(EclipseSourceType.java:250)
at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.checkPointcutDeclarations(EclipseSourceType.java:267)
at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.resolvePointcutDeclarations(AjLookupEnvironment.java:433)
at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:236)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:301)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:315)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:862)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:269)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:168)
at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:117)
at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)

NullPointerException thrown: null

regards
Moritz Post
Comment 1 Andrew Clement CLA 2006-04-24 10:52:00 EDT
testcase and fix committed. thanks for the clear bug report.
Comment 2 Andrew Clement CLA 2006-04-26 08:09:56 EDT
fix available in latest AJ, will be in AJDT in a few days.