Bug 102284 - [5.0 ] CCE in ParameterizedTypeBinding [code assist]
Summary: [5.0 ] CCE in ParameterizedTypeBinding [code assist]
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-30 05:45 EDT by Tobias Widmer CLA
Modified: 2005-09-27 15:27 EDT (History)
0 users

See Also:


Attachments
Proposed patch (2.98 KB, text/plain)
2005-08-31 07:39 EDT, David Audel CLA
no flags Details
Patch for 3.1.1 (2.99 KB, text/plain)
2005-09-02 08:27 EDT, David Audel CLA
no flags Details
Regression test for 3.1.1 (1.66 KB, text/plain)
2005-09-02 08:28 EDT, David Audel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Widmer CLA 2005-06-30 05:45:53 EDT
3.1

Steps to reproduce:
- Consider following snippet:

package p;

public class Anon {
	void test() {
		class Type<S, T> {
			Type<String, String> t= new Type<String, String> 
(<Caret>)
		}
	}
}

- Invoke content assist
-> Following exception occurs:

java.lang.ClassCastException: 
org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding
at org.eclipse.jdt.internal.codeassist.impl.Engine.getSignature
(Engine.java:334)
at org.eclipse.jdt.internal.codeassist.CompletionEngine.findConstructors
(CompletionEngine.java:2025)
at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete
(CompletionEngine.java:1022)
at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete
(CompletionEngine.java:1533)
at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:128)
at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete
(CompilationUnit.java:301)
at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete
(CompilationUnit.java:294)
at 
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.internalComputeCo
mpletionProposals(JavaCompletionProcessor.java:336)
at 
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletion
Proposals(JavaCompletionProcessor.java:313)
at 
org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposal
s(ContentAssistant.java:1503)
at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals
(CompletionProposalPopup.java:261)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7
(CompletionProposalPopup.java:258)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run
(CompletionProposalPopup.java:221)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals
(CompletionProposalPopup.java:216)
at 
org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions
(ContentAssistant.java:1352)
at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewe
r.doOperation(CompilationUnitEditor.java:188)
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:996)
at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:182)
at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute
(LegacyHandlerWrapper.java:108)
at org.eclipse.core.commands.Command.execute(Command.java:311)
at org.eclipse.core.commands.ParameterizedCommand.execute
(ParameterizedCommand.java:396)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand
(WorkbenchKeyboard.java:459)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press
(WorkbenchKeyboard.java:781)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent
(WorkbenchKeyboard.java:828)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings
(WorkbenchKeyboard.java:550)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3
(WorkbenchKeyboard.java:493)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent
(WorkbenchKeyboard.java:117)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:917)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:867)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:852)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:880)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:876)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1190)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3135)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3038)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3706)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1656)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2711)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
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:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Comment 1 David Audel CLA 2005-08-31 07:36:44 EDT
Engine.getSignature() does not take into account parameterized local types.
Comment 2 David Audel CLA 2005-08-31 07:39:01 EDT
Created attachment 26692 [details]
Proposed patch
Comment 3 David Audel CLA 2005-08-31 09:08:22 EDT
Fixed in HEAD and test added
  CompletionTests_1_5#test0246()
Comment 4 Philipe Mulet CLA 2005-09-02 06:51:21 EDT
+1 for 3.1.1
Comment 5 David Audel CLA 2005-09-02 08:27:49 EDT
Created attachment 26797 [details]
Patch for 3.1.1
Comment 6 David Audel CLA 2005-09-02 08:28:23 EDT
Created attachment 26798 [details]
Regression test for 3.1.1
Comment 7 Olivier Thomann CLA 2005-09-20 14:29:03 EDT
Verified using I20050920-0010 for 3.2M2.
Opened bug 110072 for NPE in JDT/UI.
Comment 8 Olivier Thomann CLA 2005-09-20 14:33:22 EDT
Reopen to close as FIXED. Will be closed as VERIFIED once verified in 3.1.1.
Comment 9 Olivier Thomann CLA 2005-09-20 14:33:34 EDT
Fixed.
Comment 10 David Audel CLA 2005-09-26 10:34:56 EDT
Fixed in 3.1 maintenance branch (fixed in build > 3.1.1rc2) and test added
  CompletionTests_1_5#test0246()
Comment 11 Olivier Thomann CLA 2005-09-27 15:27:59 EDT
Verified in  M20050923-1430 + JDT/Core 3.1.1RC3 candidate