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

Bug 354758

Summary: NPE when publishing comments
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 0.9   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Steffen Pingel CLA 2011-08-15 14:49:17 EDT
What steps will reproduce the problem?
1. Open http://egit.eclipse.org/r/#change,3939
2. Press Publish Comment

I get the exception below.


-- Error Details --
Date: Mon Aug 15 20:47:54 CEST 2011
Message: Unhandled event loop exception
Severity: Error
Product: Eclipse SDK 3.8.0.v201108031800 (org.eclipse.sdk.ide)
Plugin: org.eclipse.ui
Session Data:
eclipse.buildId=I20110803-1800
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_CA

Exception Stack Trace:
java.lang.NullPointerException
	at com.google.gerrit.common.data.PatchSetPublishDetail.getAllowed(PatchSetPublishDetail.java:96)
	at org.eclipse.mylyn.internal.gerrit.ui.operations.PublishDialog.doRefresh(PublishDialog.java:128)
	at org.eclipse.mylyn.internal.gerrit.ui.operations.GerritOperationDialog.createDialogArea(GerritOperationDialog.java:137)
	at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:155)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
	at org.eclipse.jface.window.Window.open(Window.java:790)
	at org.eclipse.mylyn.internal.gerrit.ui.editor.AbstractGerritSection.openOperationDialog(AbstractGerritSection.java:60)
	at org.eclipse.mylyn.internal.gerrit.ui.editor.PatchSetSection.doPublish(PatchSetSection.java:331)
	at org.eclipse.mylyn.internal.gerrit.ui.editor.PatchSetSection$1.widgetSelected(PatchSetSection.java:190)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 1 Steffen Pingel CLA 2011-09-08 05:14:16 EDT
Added a check in case the user does not have permission to vote.
Comment 2 Steffen Pingel CLA 2011-09-08 05:14:18 EDT
Created attachment 202979 [details]
mylyn/context/zip