Community
Participate
Working Groups
0321 Stable Win32 I was typing in the editor when an Internal Error pop-up appeared: java.lang.NullPointerException at org.eclipse.jdt.internal.ui.text.java.ResultCollector.createMethodCompletion (ResultCollector.java:317) at org.eclipse.jdt.internal.ui.text.java.ResultCollector.createMethodCallCompletio n(ResultCollector.java:329) at org.eclipse.jdt.internal.ui.text.java.ResultCollector.acceptMethod (ResultCollector.java:205) at org.eclipse.jdt.internal.core.CompletionRequestorWrapper.acceptMethod (CompletionRequestorWrapper.java:178) at org.eclipse.jdt.internal.codeassist.CompletionEngine.findLocalMethods (CompletionEngine.java:1675) at org.eclipse.jdt.internal.codeassist.CompletionEngine.findIntefacesMethods (CompletionEngine.java:1457) at org.eclipse.jdt.internal.codeassist.CompletionEngine.findMethods (CompletionEngine.java:1898) at org.eclipse.jdt.internal.codeassist.CompletionEngine.findFieldsAndMethods (CompletionEngine.java:1195) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete (CompletionEngine.java:352) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete (CompletionEngine.java:806) at org.eclipse.jdt.internal.core.Openable.codeComplete (Openable.java:113) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete (CompilationUnit.java:84) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletion Proposals(JavaCompletionProcessor.java:340) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposal s(ContentAssistant.java:1197) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:103) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$3 (CompletionProposalPopup.java:102) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:71) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:56) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:66) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:1132) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$InternalSourceView er.doOperation(CompilationUnitEditor.java:152) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:61) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:103) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:705) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
not clear whether this in the code assist UI or whether we are getting an incorrect completion proposal.
Added guards to ResultCollector. However, the information passed into the result collector should not be null. Moving to JDT core.
Could be a #sourceName() from a type binding (problem one?) ?
method.returnType.qualifiedSourceName() inside CompletionEngine#findLocalMethods return null I can not reproduce this problem and guards was added to ResultCollector. Later.
The problem occur when the return type of a binary method is unresolved.
The bugs is in BinaryTypeBinding#availableMethods. The correct code must be 'return availableMethods;' and not 'return methods;' Fixed.