Bug 88845 - NPE in codeComplete for supertype that extends invisible type
Summary: NPE in codeComplete for supertype that extends invisible type
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 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-23 08:48 EST by Markus Keller CLA
Modified: 2005-03-30 15:06 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2005-03-23 08:48:55 EST
v_542

Set up the two CUs below and invoke content assist.

- xy/Testing.java:
package xy;
class Testing extends X.//<- ContentAssist after .
{}

- xy/X.java:
package xy;

import java.util.ArrayList;

public class X {
	private class Private {}
	public class Inn extends Private { }
	public class Inn2 extends ArrayList<Private> { }
}

-> Error:

Error 2005-03-23 14:43:54.69 The command for the key you pressed failed
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.canBeSeenBy(ReferenceBinding.java:116)
	at
org.eclipse.jdt.internal.codeassist.CompletionEngine.findMemberTypes(CompletionEngine.java:2455)
	at
org.eclipse.jdt.internal.codeassist.CompletionEngine.findMemberTypes(CompletionEngine.java:2555)
	at
org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:755)
	at
org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:1257)
	at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:119)
	at
org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:298)
	at
org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:291)
	at
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.internalComputeCompletionProposals(JavaCompletionProcessor.java:358)
	at
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletionProposals(JavaCompletionProcessor.java:332)
	at
org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1470)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:250)
	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:1319)
	at
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:183)
	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:1003)
	at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:182)
	at
org.eclipse.ui.internal.commands.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:107)
	at org.eclipse.core.commands.Command.execute(Command.java:336)
	at
org.eclipse.core.commands.ParameterizedCommand.execute(ParameterizedCommand.java:395)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:418)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:695)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:738)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:509)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$2(WorkbenchKeyboard.java:452)
	at
org.eclipse.ui.internal.keys.WorkbenchKeyboard$1.handleEvent(WorkbenchKeyboard.java:219)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:777)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:841)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:866)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:851)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:879)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:875)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1182)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3121)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:3024)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3466)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1624)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2525)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1520)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1484)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:305)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:338)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:151)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
	at java.lang.reflect.Method.invoke(Method.java:391)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:268)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:260)
	at org.eclipse.core.launcher.Main.run(Main.java:887)
	at org.eclipse.core.launcher.Main.main(Main.java:871)
Comment 1 David Audel CLA 2005-03-24 05:51:19 EST
Fixed and test added
  CompletionTests_1_5#test0144()
Comment 2 Olivier Thomann CLA 2005-03-30 15:06:03 EST
Verified in I20050330-0500