Bug 30023 - NPE when performing Surround with try-catch on multiple lines
Summary: NPE when performing Surround with try-catch on multiple lines
Status: RESOLVED DUPLICATE of bug 29151
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-22 16:58 EST by Michael Valenta CLA
Modified: 2003-01-23 03:52 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 Michael Valenta CLA 2003-01-22 16:58:56 EST
I slelected multi lines and tried to perform a "surround with try catch". 
Nothing happend and the following NPE was in the log.

!ENTRY org.eclipse.ui 4 0 Jan 22, 2003 17:26:20.216
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.corext.refactoring.changes.TextFileChange.perform
(TextFileChange.java:203)
	at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation$1.run
(PerformChangeOperation.java:173)
	at org.eclipse.jdt.internal.core.BatchOperation.executeOperation
(BatchOperation.java:34)
	at org.eclipse.jdt.internal.core.JavaModelOperation.execute
(JavaModelOperation.java:326)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run
(JavaModelOperation.java:626)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1580)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2621)
	at 
org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.executeChange
(PerformChangeOperation.java:183)
	at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run
(PerformChangeOperation.java:151)
	at 
org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.inter
nalRun(BusyIndicatorRunnableContext.java:107)
	at 
org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.run
(BusyIndicatorRunnableContext.java:74)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:65)
	at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext.run
(BusyIndicatorRunnableContext.java:120)
	at org.eclipse.jdt.ui.actions.SurroundWithTryCatchAction.run
(SurroundWithTryCatchAction.java:110)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun
(SelectionDispatchAction.java:193)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run
(SelectionDispatchAction.java:169)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:804)
	at org.eclipse.ui.actions.RetargetAction.runWithEvent
(RetargetAction.java:177)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent
(WWinPluginAction.java:207)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:422)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:374)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:368)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:69)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1508)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
	at org.eclipse.core.launcher.Main.run(Main.java:703)
	at org.eclipse.core.launcher.Main.main(Main.java:539)
Comment 1 Michael Valenta CLA 2003-01-22 16:59:22 EST
Forgot to mention that I'm using build I20030122
Comment 2 Dirk Baeumer CLA 2003-01-23 03:52:24 EST

*** This bug has been marked as a duplicate of 29151 ***