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

Bug 364506

Summary: Cancelling review group creation impacts next group creations
Product: z_Archived Reporter: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Component: MylynAssignee: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: lmcbout
Version: unspecified   
Target Milestone: 0.9   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Alvaro Sanchez-Leon CLA 2011-11-22 14:07:07 EST
If a Review Group creation is cancelled, 
later review group creations will cause the following exception.
  A selection on the navigator of the created reviews group will also trigger the same exception.
  
!ENTRY org.eclipse.ui.views.properties.tabbed 4 2 2011-11-22 13:58:26.990
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.views.properties.tabbed".
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
	at org.eclipse.swt.SWT.error(SWT.java:4064)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.SWT.error(SWT.java:3969)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
	at org.eclipse.swt.widgets.Text.setText(Text.java:1951)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.properties.tabbed.ReviewGroupTabPropertySection.refresh(ReviewGroupTabPropertySection.java:465)
	at org.eclipse.ui.views.properties.tabbed.TabContents$6.run(TabContents.java:217)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.ui.views.properties.tabbed.TabContents.refresh(TabContents.java:220)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:222)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2162)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1699)
	at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:392)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:736)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:555)
	at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:365)
	at org.eclipse.ui.internal.AbstractSelectionService.firePostSelection(AbstractSelectionService.java:179)
	at org.eclipse.ui.internal.AbstractSelectionService$2.selectionChanged(AbstractSelectionService.java:71)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:867)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:865)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1700)
	at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1139)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.navigator.ReviewNavigatorView.updateView(ReviewNavigatorView.java:840)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.utils.UIUtils.setNavigatorViewFocus(UIUtils.java:602)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.commands.NewChildElementHandler$1.runInUIThread(NewChildElementHandler.java:90)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	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 Alvaro Sanchez-Leon CLA 2011-11-22 14:12:22 EST
After troubleshooting the issue, 
the problems lies on ReviewGroupInputDialog.java#buttonPressed(int), 
see last "else" statement. if the button pressed was not ok, several field values are reset to "null"
however the default values for this fields are empty strings.  
  This causes new groups to be created e.g. null default entry criteria.
  
 When the properties are being read and the null is applied to a text box, the exception will occur.
 
 the solution is to reset the fields to their empty string default.
Comment 2 Alvaro Sanchez-Leon CLA 2011-11-22 14:44:48 EST
Implemented as mentioned in comment above