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

Bug 368526

Summary: CCE in GitHistoryPage$1.propertyChange(GitHistoryPage.java:600)
Product: [Technology] EGit Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, jens.baumgart, markus.duft, matthias.sohn, robin.rosenberg
Version: 1.3   
Target Milestone: 1.3-M1   
Hardware: All   
OS: All   
Whiteboard:

Description Dani Megert CLA 2012-01-13 05:07:29 EST
1.3.0.201201122014.

1. make sure History view is shown with content
2. open the Git > Views preference page
3. if 'Relative Dates' is checked: uncheck it and click 'Apply'
4. click 'Restore Defaults'
5. click 'Apply'

==>


!ENTRY org.eclipse.ui.workbench 4 2 2012-01-13 11:00:25.747
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
	at org.eclipse.egit.ui.internal.history.GitHistoryPage$1.propertyChange(GitHistoryPage.java:600)
	at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:375)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:372)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.setToDefault(ScopedPreferenceStore.java:667)
	at org.eclipse.jface.preference.FieldEditor.store(FieldEditor.java:678)
	at org.eclipse.jface.preference.FieldEditorPreferencePage.performOk(FieldEditorPreferencePage.java:343)
	at org.eclipse.jface.preference.PreferencePage.performApply(PreferencePage.java:432)
	at org.eclipse.jface.preference.PreferencePage$2.widgetSelected(PreferencePage.java:281)
	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:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215)
	at org.eclipse.ui.internal.handlers.ShowPreferencePageHandler.execute(ShowPreferencePageHandler.java:54)
	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.actions.CommandAction.runWithEvent(CommandAction.java:157)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	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:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:352)
	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:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
	at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 Dani Megert CLA 2012-01-13 05:44:49 EST
http://egit.eclipse.org/r/4950 pushed for review.
Comment 2 Jens Baumgart CLA 2012-01-13 08:12:14 EST
Thanks for the fix, Dani
Comment 3 Dani Megert CLA 2012-01-16 06:19:54 EST
When verifying the fix in 1.3.0.201201151914 I found that the fix was not there. It looks like the merge for http://egit.eclipse.org/r/#change,4439 was not correct.
Comment 4 Dani Megert CLA 2012-01-16 06:20:40 EST
Robin or Jens, could you please fix the merge.
Comment 5 Jens Baumgart CLA 2012-01-16 06:57:33 EST
The fix is in (merged as 8f6eb35661ca7c32696e436c34270e8586249d3d).
It seems 92d060c95cb1c3e754d9fef360fb82ea4f5d1867 (Use GitDateFormatter from JGit for formatting) has re-introduced the bug.
Comment 6 Robin Rosenberg CLA 2012-01-16 18:14:16 EST
Re-fix in http://egit.eclipse.org/r/#change,4964
Comment 7 Matthias Sohn CLA 2012-01-16 18:36:06 EST
merged as f8730574ff3c697b3cfe6de75c0fbeb9dd7c24bb
Comment 8 Dani Megert CLA 2012-01-17 04:16:40 EST
(In reply to comment #7)
> merged as f8730574ff3c697b3cfe6de75c0fbeb9dd7c24bb

Thanks!

Verified in 1.3.0.201201162014.
Comment 9 Dani Megert CLA 2012-01-17 12:11:26 EST
(In reply to comment #8)
> (In reply to comment #7)
> > merged as f8730574ff3c697b3cfe6de75c0fbeb9dd7c24bb
> 
> Thanks!
> 
> Verified in 1.3.0.201201162014.

Argh! The merge is not done right (again). You removed the 'if' around "graph.setRelativeDate(isShowingRelativeDates());" which was there in my page and older versions. This now causes IAEs, see bug 368804.
Comment 10 Markus Duft CLA 2012-01-17 13:58:52 EST
ah, you mean that the table.refresh() should only be called when graph.setRelativeDate returns true? but as i read the exception and the according code in my version, the graph.setRelativeDate already causes the IAE, not the actual refresh(). am i wrong?
Comment 11 Robin Rosenberg CLA 2012-01-17 17:29:04 EST
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > merged as f8730574ff3c697b3cfe6de75c0fbeb9dd7c24bb
> > 
> > Thanks!
> > 
> > Verified in 1.3.0.201201162014.
> 
> Argh! The merge is not done right (again). You removed the 'if' around
> "graph.setRelativeDate(isShowingRelativeDates());" which was there in my page
> and older versions. This now causes IAEs, see bug 368804.

That was quite intentional as the format wasn't in sync with the settings
and a refresh solved that. bbl.
Comment 12 Dani Megert CLA 2012-01-18 03:10:59 EST
(In reply to comment #11)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > merged as f8730574ff3c697b3cfe6de75c0fbeb9dd7c24bb
> > > 
> > > Thanks!
> > > 
> > > Verified in 1.3.0.201201162014.
> > 
> > Argh! The merge is not done right (again). You removed the 'if' around
> > "graph.setRelativeDate(isShowingRelativeDates());" which was there in my page
> > and older versions. This now causes IAEs, see bug 368804.
> 
> That was quite intentional as the format wasn't in sync with the settings
> and a refresh solved that. bbl.

See bug 368804 comment 5.
Comment 13 Dani Megert CLA 2012-01-19 03:46:47 EST
Fixed now, see bug 368804 comment 10.
Comment 14 Dani Megert CLA 2012-01-19 03:47:19 EST
Verified in 1.3.0.201201181724.