Bug 87376 - NPE when unresolved type of a bound var in a pointcut expression (EclipseFactory.java:224)
Summary: NPE when unresolved type of a bound var in a pointcut expression (EclipseFact...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0 M2   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 86051 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-08 10:11 EST by Adrian Colyer CLA
Modified: 2005-03-24 11:40 EST (History)
2 users (show)

See Also:


Attachments
contents of an AJ project "Bug" with 2 source files that reproduce the problem. (1.40 KB, application/octet-stream)
2005-03-08 10:12 EST, Adrian Colyer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Colyer CLA 2005-03-08 10:11:13 EST
see attached mini-project to reproduce
Comment 1 Adrian Colyer CLA 2005-03-08 10:12:16 EST
Created attachment 18534 [details]
contents of an AJ project "Bug" with 2 source files that reproduce the problem.
Comment 2 Matt Chapman CLA 2005-03-08 10:52:55 EST
I'm passing this back over the fence, as it happens from the command line
(although only when building the structure model):

E:\Bug>ajc -emacssym @.generated.lst
E:\Bug\a\b\d\NPE.aj [error] Internal compiler error
java.lang.NullPointerException
        at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.makeResolved
Member(EclipseFactory.java:224)
        at org.aspectj.ajdt.internal.core.builder.AsmHierarchyBuilder.getPointcu
tDeclaration(AsmHierarchyBuilder.java:384)
        at org.aspectj.ajdt.internal.core.builder.AsmHierarchyBuilder.addUsesPoi
ntcutRelationsForNode(AsmHierarchyBuilder.java:369)
        at org.aspectj.ajdt.internal.core.builder.AsmHierarchyBuilder.visit(AsmH
ierarchyBuilder.java:343)
        at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.t
raverse(MethodDeclaration.java:167)
        at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.tra
verse(TypeDeclaration.java:1133)
        at org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDecl
aration.traverse(CompilationUnitDeclaration.java:314)
        at org.aspectj.ajdt.internal.core.builder.AsmHierarchyBuilder.internalBu
ild(AsmHierarchyBuilder.java:141)
        at org.aspectj.ajdt.internal.core.builder.AsmHierarchyBuilder.buildStruc
tureForCompilationUnit(AsmHierarchyBuilder.java:81)
        at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.finishedComp
ilationUnit(EclipseFactory.java:354)
        at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.afterProcessing(
AjCompilerAdapter.java:139)
        at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compil
er.java:373)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilat
ion(AjBuildManager.java:682)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuild
Manager.java:168)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBu
ildManager.java:102)
        at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:109)
        at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
        at org.aspectj.tools.ajc.Main.run(Main.java:291)
        at org.aspectj.tools.ajc.Main.runMain(Main.java:227)
        at org.aspectj.tools.ajc.Main.main(Main.java:80)

(no source information available)
E:\Bug\a\b\d\NPE.aj:9 [error] I cannot be resolved to a type
pointcut ii(I i) : execution(* I.*(..)) && this(i);

E:\Bug\a\b\d\NPE.aj:11 [error] I cannot be resolved to a type
after(I i) returning : ii(i) {

ABORT

Exception thrown from AspectJ DEVELOPMENT



E:\Bug>ajc -version
AspectJ Compiler DEVELOPMENT built on Friday Feb 18, 2005 at 17:12:57 GMT
Comment 3 Matt Chapman CLA 2005-03-09 06:04:27 EST
*** Bug 86051 has been marked as a duplicate of this bug. ***
Comment 4 Adrian Colyer CLA 2005-03-10 08:33:39 EST
fix committed in tree, will close bug once available in a published build.
Comment 5 Adrian Colyer CLA 2005-03-23 09:55:37 EST
this will be in m2
Comment 6 Andrew Clement CLA 2005-03-24 11:40:56 EST
Fix available, see download page:

aspectj-DEVELOPMENT-20050324155000.jar