Community
Participate
Working Groups
Using 3.1M1 I get the following Internal Compiler Error when trying to build using the 1.5 "Compiler compliance level": java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.Scope.minimalErasedCandidate([Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;Ljava.util.List;)Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;(Scope.java:2409) at org.eclipse.jdt.internal.compiler.lookup.Scope.lowerUpperBound([Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;)Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;(Scope.java:2283) at org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding.computeCompatibleMethod(Lorg.eclipse.jdt.internal.compiler.lookup.MethodBinding;[Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;Lorg.eclipse.jdt.internal.compiler.lookup.Scope;Lorg.eclipse.jdt.internal.compiler.lookup.InvocationSite;)Lorg.eclipse.jdt.internal.compiler.lookup.MethodBinding;(ParameterizedGenericMethodBinding.java:100) at org.eclipse.jdt.internal.compiler.lookup.Scope.computeCompatibleMethod(Lorg.eclipse.jdt.internal.compiler.lookup.MethodBinding;[Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;Lorg.eclipse.jdt.internal.compiler.lookup.InvocationSite;)Lorg.eclipse.jdt.internal.compiler.lookup.MethodBinding;(Scope.java:152) at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Lorg.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;[C[Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;Lorg.eclipse.jdt.internal.compiler.lookup.InvocationSite;)Lorg.eclipse.jdt.internal.compiler.lookup.MethodBinding;(Scope.java:837) at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;[C[Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;Lorg.eclipse.jdt.internal.compiler.lookup.InvocationSite;)Lorg.eclipse.jdt.internal.compiler.lookup.MethodBinding;(Scope.java:1719) at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(Lorg.eclipse.jdt.internal.compiler.lookup.BlockScope;)Lorg.eclipse.jdt.internal.compiler.lookup.TypeBinding;(MessageSend.java:294) at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Lorg.eclipse.jdt.internal.compiler.lookup.BlockScope;)V(Expression.java:668) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements()V(AbstractMethodDeclaration.java:400) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements()V(MethodDeclaration.java:139) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(Lorg.eclipse.jdt.internal.compiler.lookup.ClassScope;)V(AbstractMethodDeclaration.java:378) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve()V(TypeDeclaration.java:938) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(Lorg.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope;)V(TypeDeclaration.java:987) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve()V(CompilationUnitDeclaration.java:280) at org.eclipse.jdt.internal.compiler.Compiler.process(Lorg.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;I)V(Compiler.java:508) at org.eclipse.jdt.internal.compiler.Compiler.compile([Lorg.eclipse.jdt.internal.compiler.env.ICompilationUnit;)V(Compiler.java:335) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile([Lorg.eclipse.jdt.internal.core.builder.SourceFile;[Lorg.eclipse.jdt.internal.core.builder.SourceFile;)V(AbstractImageBuilder.java:209) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile([Lorg.eclipse.jdt.internal.core.builder.SourceFile;)V(AbstractImageBuilder.java:159) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build()V(BatchImageBuilder.java:49) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll()V(JavaBuilder.java:212) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(ILjava.util.Map;Lorg.eclipse.core.runtime.IProgressMonitor;)[Lorg.eclipse.core.resources.IProject;(JavaBuilder.java:135) at org.eclipse.core.internal.events.BuildManager$2.run()V(BuildManager.java:564) at org.eclipse.core.internal.runtime.InternalPlatform.run(Lorg.eclipse.core.runtime.ISafeRunnable;)V(InternalPlatform.java:615) at org.eclipse.core.runtime.Platform.run(Lorg.eclipse.core.runtime.ISafeRunnable;)V(Platform.java:747) at org.eclipse.core.internal.events.BuildManager.basicBuild(ILorg.eclipse.core.resources.IncrementalProjectBuilder;Ljava.util.Map;Lorg.eclipse.core.runtime.MultiStatus;Lorg.eclipse.core.runtime.IProgressMonitor;)V(BuildManager.java:157) at org.eclipse.core.internal.events.BuildManager.basicBuild(Lorg.eclipse.core.resources.IProject;ILjava.lang.String;Ljava.util.Map;Lorg.eclipse.core.runtime.MultiStatus;Lorg.eclipse.core.runtime.IProgressMonitor;)V(BuildManager.java:249) at org.eclipse.core.internal.events.BuildManager.basicBuild(Lorg.eclipse.core.resources.IProject;I[Lorg.eclipse.core.resources.ICommand;Lorg.eclipse.core.runtime.MultiStatus;Lorg.eclipse.core.runtime.IProgressMonitor;)V(BuildManager.java:202) at org.eclipse.core.internal.events.BuildManager$1.run()V(BuildManager.java:229) at org.eclipse.core.internal.runtime.InternalPlatform.run(Lorg.eclipse.core.runtime.ISafeRunnable;)V(InternalPlatform.java:615) at org.eclipse.core.runtime.Platform.run(Lorg.eclipse.core.runtime.ISafeRunnable;)V(Platform.java:747) at org.eclipse.core.internal.events.BuildManager.basicBuild(Lorg.eclipse.core.resources.IProject;ILorg.eclipse.core.runtime.MultiStatus;Lorg.eclipse.core.runtime.IProgressMonitor;)V(BuildManager.java:232) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop([Lorg.eclipse.core.resources.IProject;[Lorg.eclipse.core.resources.IProject;ILorg.eclipse.core.runtime.MultiStatus;Lorg.eclipse.core.runtime.IProgressMonitor;)V(BuildManager.java:268) Unforturnately the project in which this is triggered is proprietary, so I can't let you look at it, but if you think it helps I can upload the source file in which the error is triggered.
Created attachment 14171 [details] File in which this error is triggered
Can you please provide a complete testcase ? Yours is missing some referenced types. Please reopen once info is available.
Intended to be closed as REMIND
Created attachment 14645 [details] Manually constructed testcase with missing types
Please reopen once info is available.
Unforturnately I didn't take any snapshot of my code at the time of this error, so I don't have that information anymore. In case you can't resolve this with the information currently in this bug report, you'll have to close this an WONTFIX.
Can't you reproduce it anymore ?
Nope. I haven't upgraded to anything newer than M1, so the bug is still there though. It's just that whatever it was in my code that triggered it isn't there anymore.
I'm getting this in the source workspace from b64 on the type EventListenerList.
Reproduced with EventListenerList. Fixed by adding a null check. Situation can occur when interface is matched against Object.
Simpler testcase: public class X { static <T> T foo(T t1, T t2){ return t1; } public static void main(String[] args) { IX s = null; IX t = foo(new Object(), s); } } interface IX {}
Added regression test: GenericTypeTest#test307
Verified in I200409231635.
*** Bug 75540 has been marked as a duplicate of this bug. ***