Community
Participate
Working Groups
I20041201-1139 Open type Collections from an 1.5 JDK. Select type name and enable Mark Occurrences. Error 2004-12-02 09:38:08.547 An internal error occurred during: "Java AST creation". java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.WildcardBinding.signature(WildcardBinding.java:220) at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.signature(MethodBinding.java:630) at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.computeUniqueKey(MethodBinding.java:290) at org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding.computeUniqueKey(ParameterizedMethodBinding.java:56) at org.eclipse.jdt.core.dom.MethodBinding.getKey(MethodBinding.java:286) at org.eclipse.jdt.internal.corext.dom.Bindings.equals(Bindings.java:60) at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.match(OccurrencesFinder.java:224) at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.visit(OccurrencesFinder.java:161) at org.eclipse.jdt.core.dom.SimpleName.accept0(SimpleName.java:147) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2497) at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:244) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2520) at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:245) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2497) at org.eclipse.jdt.core.dom.PrefixExpression.accept0(PrefixExpression.java:261) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2497) at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:188) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2497) at org.eclipse.jdt.core.dom.ForStatement.accept0(ForStatement.java:228) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2520) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2497) at org.eclipse.jdt.core.dom.ForStatement.accept0(ForStatement.java:228) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2497) at org.eclipse.jdt.core.dom.LabeledStatement.accept0(LabeledStatement.java:166) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2520) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2497) at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:189) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2520) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2497) at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:504) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2520) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:486) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2520) at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:291) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2450) at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.perform(OccurrencesFinder.java:81) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updateOccurrenceAnnotations(JavaEditor.java:2907) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$6.selectionChanged(JavaEditor.java:2936) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:173) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:142) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Only the DOM is asking for WildcardBinding.signature(). It is indeed doomed in the case of unbound wildcard.
Made WildcardBinding#signature() answer the genericTypeSignature instead, but this is likely an issue in DOM key computation which shouldn't perform on the parameterized (generic) method, and rather use the original method (and record type arguments separately).
Actually, made the signature for wildcards not answer any generic information (bound or matching variable signature).
Fixed MethodBinding#computeUniqueKey() to use the original method for the signature. Need a regression test.
Added regression test ASTConverter15Test#test0089()
Verified for 3.1 M4 using build I200412142000.