Bug 40722 - "add arguement to match" throws NPE [quick fix]
Summary: "add arguement to match" throws NPE [quick fix]
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-24 11:51 EDT by Nikolay Metchev CLA
Modified: 2003-07-25 12:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Metchev CLA 2003-07-24 11:51:19 EDT
---------------Z.java-----------------
public class Z extends X
{
   public Z()
   {
      super(); //<-- use quickfix here
   }
}

class X
{
   public X(int i)
   {
      
   }
}

-------------------------------------
if you use quick fix where mentioned above to add arguements you get NPE:

java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.ui.text.correction.AddArgumentCorrectionProposal.getRew
rite(AddArgumentCorrectionProposal.java:53)
	at 
org.eclipse.jdt.internal.ui.text.correction.ASTRewriteCorrectionProposal.createC
ompilationUnitChange(ASTRewriteCorrectionProposal.java:49)
	at 
org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal.getChange
(CUCorrectionProposal.java:90)
	at 
org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal.getCompilationU
nitChange(CUCorrectionProposal.java:291)
	at 
org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal.apply
(CUCorrectionProposal.java:202)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal
(CompletionProposalPopup.java:328)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.selectProposalWithM
ask(CompletionProposalPopup.java:292)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey
(CompletionProposalPopup.java:581)
	at 
org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey
(ContentAssistant.java:599)
	at org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey
(TextViewer.java:368)
	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:848)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:872)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:857)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:665)
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5208)
	at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:4957)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:872)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:857)
	at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1675)
	at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1671)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:2993)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:2872)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:2713)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1338)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1876)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1680)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1663)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:858)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	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:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
Comment 1 Martin Aeschlimann CLA 2003-07-25 12:19:01 EDT
fixed > 20030725