Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350509

Summary: Null pointer exception when adding review items (Create Delta Elements active)
Product: z_Archived Reporter: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Component: MylynAssignee: Sebastien Dubois <sebastien.dubois>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: lmcbout
Version: unspecified   
Target Milestone: 0.9   
Hardware: All   
OS: All   
Whiteboard:

Description Alvaro Sanchez-Leon CLA 2011-06-27 21:35:25 EDT
The following exception was caught while adding a review item when the preference is set to "Create Delta Elements"
used commit on jgit project, 2011-May-31 15:09:30, id: a390456...

!ENTRY org.eclipse.ui 4 0 2011-06-27 21:30:01.963
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.texteditor.DocumentProviderRegistry.getDocumentProvider(DocumentProviderRegistry.java:311)
	at org.eclipse.compare.SharedDocumentAdapter.getDocumentProvider(SharedDocumentAdapter.java:40)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.utils.DiffUtils.getDocument(DiffUtils.java:223)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.utils.DiffUtils.doDiff(DiffUtils.java:74)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.commands.FindReviewItemsHandler.createReviewItem(FindReviewItemsHandler.java:230)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.commands.FindReviewItemsHandler.execute(FindReviewItemsHandler.java:142)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Comment 1 Sebastien Dubois CLA 2011-06-28 12:17:43 EDT
The problem happens when the base file does not exist.  In this case, there will be no comparisons and no delta generated