Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336136 - Exception when using ITIT that has compile error
Summary: Exception when using ITIT that has compile error
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.11   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 1.6.11   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 14:43 EST by Andrew Eisenberg CLA
Modified: 2011-02-02 19:05 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Eisenberg CLA 2011-02-02 14:43:37 EST
I just got this exception thrown from the aj compiler.  To reproduce:
1. create an empty AJ project.
2. Pasted this class into an empty aspect:

{code}
import com.foo.op4j.Country;
import java.lang.Object;
import org.javaruntype.type.Types;
import org.op4j.functions.Function;
import org.op4j.functions.Get;

privileged aspect Country_Roo_Op4j {
    
    public static class Country.Keys {

        public static final Function<Object, Country> COUNTRY = Get.attrOf(Types.forClass(Country.class),"country");
    }
}
{code}
 

3. Incremental compile
4. Boom!


Want me to raise an bug for this?

java.lang.NullPointerException
        at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.findMemberType(Scope.java:979)
        at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2377)
        at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2220)
        at org.aspectj.org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveType(ParameterizedSingleTypeReference.java:98)
        at org.aspectj.org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.resolveType(ParameterizedSingleTypeReference.java:218)
        at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypeFor(SourceTypeBinding.java:1359)
        at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields(SourceTypeBinding.java:649)
        at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:627)
        at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:631)
        at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:433)
        at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:629)
        at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:392)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1021)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:305)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:185)
        at org.aspectj.ajde.core.internal.AjdeCoreBuildManager.performBuild(AjdeCoreBuildManager.java:127)
        at org.aspectj.ajde.core.AjCompiler.build(AjCompiler.java:91)
        at org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:257)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
        at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
        at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Andrew Clement CLA 2011-02-02 19:05:31 EST
fixed - some errors coming out are a little cryptic, but no crashes.