Bug 93695 NPE performing code assist
Build N20050504 I got the following exception after pressing ctrl+space and choosing a method from the presentation. The method I choose had a single parameter, which was an array of objects of a certain type. No objects of this type existed in my current context. java.lang.NullPointerException at org.eclipse.jdt.internal.ui.text.java.ParameterGuesser$Variable.computeFQN(ParameterGuesser.java:176) at org.eclipse.jdt.internal.ui.text.java.ParameterGuesser$Variable.getFQN(ParameterGuesser.java:170) at org.eclipse.jdt.internal.ui.text.java.ParameterGuesser$Variable.isArrayType(ParameterGuesser.java:198) at org.eclipse.jdt.internal.ui.text.java.ParameterGuesser.parameterProposals(ParameterGuesser.java:564) at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.guessParameters(ParameterGuessingProposal.java:233) at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.computeGuessingCompletion(ParameterGuessingProposal.java:276) at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.apply(ParameterGuessingProposal.java:121) at org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.apply(LazyJavaCompletionProposal.java:319) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:452) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.selectProposalWithMask(CompletionProposalPopup.java:399) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(CompletionProposalPopup.java:822) at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey(ContentAssistant.java:630) at org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey(TextViewer.java:415) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:55) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:891) at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5135) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4870) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1048) at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:612) at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:1961) at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:555) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1348) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3329) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:4739) at org.eclipse.swt.widgets.Display.eventProc(Display.java:969) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1138) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1572) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1536) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306) 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:230) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:345) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:158) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:328) at org.eclipse.core.launcher.Main.basicRun(Main.java:272) at org.eclipse.core.launcher.Main.run(Main.java:964) at org.eclipse.core.launcher.Main.main(Main.java:948)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ParameterGuesser.java
ITypeHierarchy hierarchy= SuperTypeHierarchyCache.getTypeHierarchy(varType);
			return hierarchy.contains(paramType);
		}
		boolean isAutoBoxingAssignable(Variable rhs) {
			
			if (isPrimitive()) {
				String unboxedVariable= ParameterGuesser.getAutoUnboxedType(rhs.getFQN());
				return ParameterGuesser.isPrimitiveAssignable(typeName, unboxedVariable);
			}
		
			
			if (rhs.isPrimitive()) {
				String unboxedType= ParameterGuesser.getAutoUnboxedType(getFQN());
				return ParameterGuesser.isPrimitiveAssignable(unboxedType, rhs.typeName);
			}
		
			return false;
		}
		/**
		 * Return true if <code>rhs</code> is assignable to the receiver
		 */
		boolean isAssignable(Variable rhs) throws JavaModelException {
		
			
			
			if (typePackage.length() == 0 || rhs.typePackage.length() == 0) {
		
				if (rhs.typeName.equals(typeName))
					return true;