Project: AspectJ
Bug 339974 NPE when accessing static class inside of an ITIT
Reported: 2011-03-15 00:21:25 | Status: resolved fixed

This code: public class City { private String name; private Country country; } And separate file: public aspect TrafficCalculator { public static class City.TrafficCalculator { Function<City, Time> EXTREME = createExtremeTraffic(); Function<City, Time> BASIC = createBasicTraffic(); } private static Function<City, Time> createExtremeTraffic() { return null; } private static Function<City, Time> createBasicTraffic() { return null; } public static class Time { } } Try full build and the following exception: java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.ast.IntertypeMemberClassDeclaration.resolveOnType(IntertypeMemberClassDeclaration.java:238) at org.aspectj.ajdt.internal.compiler.ast.IntertypeMemberClassDeclaration.build(IntertypeMemberClassDeclaration.java:246) at org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration.processIntertypeMemberTypes(AspectDeclaration.java:1039) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.processInterTypeMemberTypes(AjLookupEnvironment.java:523) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:197) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) 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)

Files changed in fix:
tests/bugs1612/pr339974/City.java tests/bugs1612/pr339974/TrafficCalculator.java tests/bugs1612/pr342605/Code.java tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java