Bug 78801 - [assist] NPE attempting to code assist for parameters
Summary: [assist] NPE attempting to code assist for parameters
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 78833 79182 80337 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-16 17:33 EST by Darin Swanson CLA
Modified: 2004-12-14 11:00 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2004-11-16 17:33:35 EST
I was code assiting (ctrl-space) within (cursor in the parens for the Stack 
constructor):
   Stack tasks= new Stack();

java.lang.NullPointerException
	at java.lang.String.<init>(String.java:166)
	at 
org.eclipse.jdt.internal.codeassist.InternalCompletionProposal.findMethodParame
terNames(InternalCompletionProposal.java:185)
	at org.eclipse.jdt.core.CompletionProposal.findParameterNames
(CompletionProposal.java:1197)
	at 
org.eclipse.jdt.internal.codeassist.CompletionRequestorWrapper.accept
(CompletionRequestorWrapper.java:223)
	at 
org.eclipse.jdt.internal.codeassist.CompletionEngine.findConstructors
(CompletionEngine.java:1367)
	at 
org.eclipse.jdt.internal.codeassist.CompletionEngine.findAnonymousType
(CompletionEngine.java:1175)
	at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete
(CompletionEngine.java:706)
	at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete
(CompletionEngine.java:1060)
	at org.eclipse.jdt.internal.core.Openable.codeComplete
(Openable.java:119)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete
(CompilationUnit.java:287)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete
(CompilationUnit.java:202)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete
(CompilationUnit.java:192)
	at 
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.internalComputeCo
mpletionProposals(JavaCompletionProcessor.java:358)
	at 
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletion
Proposals(JavaCompletionProcessor.java:332)
	at 
org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposal
s(ContentAssistant.java:1472)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals
(CompletionProposalPopup.java:251)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7
(CompletionProposalPopup.java:247)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run
(CompletionProposalPopup.java:206)
	at org.eclipse.swt.custom.BusyIndicator.showWhile
(BusyIndicator.java:69)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals
(CompletionProposalPopup.java:201)
	at 
org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions
(ContentAssistant.java:1320)
	at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewe
r.doOperation(CompilationUnitEditor.java:182)
	at org.eclipse.ui.texteditor.ContentAssistAction$1.run
(ContentAssistAction.java:82)
	at org.eclipse.swt.custom.BusyIndicator.showWhile
(BusyIndicator.java:69)
	at org.eclipse.ui.texteditor.ContentAssistAction.run
(ContentAssistAction.java:80)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:989)
	at org.eclipse.ui.commands.ActionHandler.execute
(ActionHandler.java:188)
	at org.eclipse.ui.internal.commands.Command.execute(Command.java:130)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand
(WorkbenchKeyboard.java:445)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press
(WorkbenchKeyboard.java:724)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent
(WorkbenchKeyboard.java:767)
	at 
org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings
(WorkbenchKeyboard.java:536)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$2
(WorkbenchKeyboard.java:479)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard$1.handleEvent
(WorkbenchKeyboard.java:221)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:752)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:817)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:855)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:851)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1193)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3037)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:2947)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3370)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1514)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2446)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1573)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1544)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:279)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:102)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:220)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:273)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:129)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
	at org.eclipse.core.launcher.Main.run(Main.java:710)
	at org.eclipse.core.launcher.Main.main(Main.java:694)
Comment 1 David Audel CLA 2004-11-19 04:50:37 EST
*** Bug 78833 has been marked as a duplicate of this bug. ***
Comment 2 David Audel CLA 2004-11-19 09:26:48 EST
Fixed and tests added
  CompletionTest#testCompletionFindConstructor2()
  CompletionTest#testCompletionFindConstructor3()
  CompletionTest#testCompletionFindConstructor4()
  CompletionTest#testCompletionFindConstructor5()
Comment 3 David Audel CLA 2004-11-23 10:10:29 EST
*** Bug 79182 has been marked as a duplicate of this bug. ***
Comment 4 David Audel CLA 2004-12-08 12:15:29 EST
*** Bug 80337 has been marked as a duplicate of this bug. ***
Comment 5 Frederic Fusier CLA 2004-12-14 11:00:08 EST
Verified for 3.1 M4 using build I200412140800.