Bug 39626 - Compiler error when compiling a buggy class
Summary: Compiler error when compiling a buggy class
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows NT
: P2 minor (vote)
Target Milestone: 1.1.1   Edit
Assignee: Mik Kersten CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-04 05:26 EDT by Arno CLA
Modified: 2003-08-28 06:38 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 Arno CLA 2003-07-04 05:26:04 EDT
I use AspectJ 1.1 from within eclipse.
After some time of developing, I get following stack trace (Wrapped in the 
eclipse gui), when I try to compile a java file with a huge amount of syntax 
errors, missing variables, and other problems.

As soon as I have fixed these issues, I can comnpile normally as ever.

Unfortunatly I can not provide any more detailed information because:
this errors pops up randomly,
disappears when the bug is fixed, 
I have neither the time nor the permission to create a more accurate sample

java.lang.NullPointerException
    at java.lang.String.<init>(String.java:214)
    at org.aspectj.ajdt.internal.core.builder.AsmBuilder.visit
(AsmBuilder.java:231)
    at org.aspectj.ajdt.internal.core.builder.AsmBuilder.visit
(AsmBuilder.java:259)
    at 
org.eclipse.jdt.internal.compiler.ast.AnonymousLocalTypeDeclaration.traverse
(AnonymousLocalTypeDeclaration.java:138)
    at 
org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.traverse
(QualifiedAllocationExpression.java:342)
    at org.eclipse.jdt.internal.compiler.ast.MessageSend.traverse
(MessageSend.java:299)
    at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:147)
    at org.eclipse.jdt.internal.compiler.ast.ForStatement.traverse
(ForStatement.java:347)
    at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse
(MethodDeclaration.java:157)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse
(TypeDeclaration.java:946)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse
(CompilationUnitDeclaration.java:303)
    at org.aspectj.ajdt.internal.core.builder.AsmBuilder.internalBuild
(AsmBuilder.java:169)
    at org.aspectj.ajdt.internal.core.builder.AsmBuilder.build
(AsmBuilder.java:66)
    at 
org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.finishedCompilationUnit
(EclipseFactory.java:303)
    at org.aspectj.ajdt.internal.compiler.AjCompiler.process(AjCompiler.java:67)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:338)
    at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation
(AjBuildManager.java:372)
    at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild
(AjBuildManager.java:133)
    at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild
(AjBuildManager.java:78)
    at org.aspectj.ajde.internal.CompilerAdapter.compile
(CompilerAdapter.java:117)
    at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run
(AspectJBuildManager.java:164)
    LoadTest.java   CrefoClient/src/com/dcbank/scoring/socketserver 
 
kind regards
   Arno Schmidmeier
Comment 1 Jim Hugunin CLA 2003-07-22 20:34:32 EDT
This appears to be caused by an invalid local type declaration causing the asm 
builder to be confused.  I'm assigning this to Mik in the hopes that he'll 
have the time to isolate this into a test case.  The fix is almost certainly 
to add a null check on AsmBuilder.java:231; however, I'd like to get a test 
case that reproduces the bug before fixing it.
Comment 2 Mik Kersten CLA 2003-07-30 05:07:10 EDT
Added AsmBuilderTest class that tests handling for this and related null 
parameters.