Community
Participate
Working Groups
In a main method, I have two lines: System.out.println("GEyte"); throw new NullPointerException(); Select the throw statement Source-> Surrond with try/catch block Click yes Problem: the progress monitor is null Thread [main] (Suspended (exception NullPointerException)) CompilationUnitChange(TextFileChange).perform(ChangeContext, IProgressMonitor) line: 194 PerformChangeOperation$1.run(IProgressMonitor) line: 173 BatchOperation.executeOperation() line: 34 BatchOperation(JavaModelOperation).execute() line: 326 BatchOperation(JavaModelOperation).run(IProgressMonitor) line: 626 Workspace.run(IWorkspaceRunnable, IProgressMonitor) line: 1564 JavaCore.run(IWorkspaceRunnable, IProgressMonitor) line: 2571 PerformChangeOperation.executeChange(IProgressMonitor) line: 183 PerformChangeOperation.run(IProgressMonitor) line: 151 BusyIndicatorRunnableContext$BusyRunnable.internalRun(boolean, IRunnableWithProgress) line: 107 BusyIndicatorRunnableContext$BusyRunnable.run() line: 74 BusyIndicator.showWhile(Display, Runnable) line: 65 BusyIndicatorRunnableContext.run(boolean, boolean, IRunnableWithProgress) line: 120 SurroundWithTryCatchAction.run(ITextSelection) line: 110 SurroundWithTryCatchAction(SelectionDispatchAction).dispatchRun (ISelection) line: 193 SurroundWithTryCatchAction(SelectionDispatchAction).run() line: 169 SurroundWithTryCatchAction(Action).runWithEvent(Event) line: 769 ActionContributionItem.handleWidgetSelection(Event) line: 411 ActionContributionItem.handleWidgetEvent(Event) line: 365 ActionContributionItem.access$0(ActionContributionItem, Event) line: 356 ActionContributionItem$ActionListener.handleEvent(Event) line: 48 EventTable.sendEvent(Event) line: 77 MenuItem(Widget).sendEvent(Event) line: 825 Display.runDeferredEvents() line: 1692 Display.readAndDispatch() line: 1410 Workbench.runEventLoop() line: 1467 Workbench.run(Object) line: 1450 InternalBootLoader.run(String, URL, String, String[], Runnable) line: 845 BootLoader.run(String, URL, String, String[], Runnable) line: 462 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 [local variables unavailable] DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 [local variables unavailable] Method.invoke(Object, Object[]) line: 324 [local variables unavailable] Main.basicRun(String[]) line: 247 Main.run(String[]) line: 703 Main.main(String[]) line: 539
*** This bug has been marked as a duplicate of 29151 ***