Bug 258629 - NullPointerException at isAspect(ReferenceType.java:165)
Summary: NullPointerException at isAspect(ReferenceType.java:165)
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 1.6.3   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-12 04:54 EST by Jochen Wuttke CLA
Modified: 2009-01-31 19:57 EST (History)
1 user (show)

See Also:


Attachments
Aspect causing the exception (2.55 KB, application/octet-stream)
2008-12-12 04:55 EST, Jochen Wuttke CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Wuttke CLA 2008-12-12 04:54:35 EST
java.lang.NullPointerException
at org.aspectj.weaver.ReferenceType.isAspect(ReferenceType.java:165)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager$4.acceptResult(AjBuildManager.java:1032)
at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.acceptResult(AjPipeliningCompilerAdapter.java:383)
at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:356)
at org.asp ... AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Compile error: NullPointerException thrown: null
Comment 1 Jochen Wuttke CLA 2008-12-12 04:55:41 EST
Created attachment 120295 [details]
Aspect causing the exception
Comment 2 Jochen Wuttke CLA 2008-12-12 04:59:37 EST
I get this exception every time I rebuild the project in Eclipse. It is unclear whether this is related to some error in the asepct (one of the methods being called does not exist in this example), or a true bug. 

Assuming it is due to a syntax error I would expect a much more helpful error message.
Comment 3 Andrew Clement CLA 2008-12-12 11:18:17 EST
Are you on AspectJ 1.6.2 as it says in the bug report?

This looks like bug 251940 which is already fixed in AspectJ 1.6.3 dev builds, please update.

A NullPointerException is never a sign of intended behaviour, so yes you should be setting a better error if it is a syntax error.
Comment 4 Andrew Clement CLA 2009-01-31 19:57:44 EST
I believe I fixed all code paths that could lead to this NPE during 1.6.3 development.  Please reopen if you see it again on a recent build.